本文整理汇总了C++中CWindowGc::Construct方法的典型用法代码示例。如果您正苦于以下问题:C++ CWindowGc::Construct方法的具体用法?C++ CWindowGc::Construct怎么用?C++ CWindowGc::Construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWindowGc
的用法示例。
在下文中一共展示了CWindowGc::Construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConstructL
void CWsGraphicShareBase::ConstructL()
{
User::LeaveIfError(iWs.Connect());
iScreen=new(ELeave) CWsScreenDevice(iWs);
User::LeaveIfError(iScreen->Construct(iScreenNumber));
iGc=new(ELeave) CWindowGc(iScreen);
User::LeaveIfError(iGc->Construct());
iGroupWin=new(ELeave) RWindowGroup(iWs);
iGroupWin->Construct(1);
iWin=new(ELeave) RWindow(iWs);
iWin->Construct(*iGroupWin,ENullWsHandle);
iWin->SetRequiredDisplayMode(EColor256);
iWin->SetExtent(TPoint(0,0),iScreen->SizeInPixels());
iWin->Activate();
iWin->BeginRedraw();
iWin->EndRedraw();
iWs.Flush();
}
示例2: MainL
void MainL()
{
RWsSession ws;
ws.Connect();
CWsScreenDevice* scr = new(ELeave) CWsScreenDevice(ws);
scr->Construct();
CWindowGc* gc = new(ELeave) CWindowGc(scr);
gc->Construct();
RWindowGroup grp(ws);
grp.Construct(0xc0decafe, ETrue);
RWindow win(ws);
win.Construct(grp, 0xbeefcafe);
win.SetExtent(TPoint(20,160), TSize(320,240));
win.Activate();
win.Invalidate();
win.BeginRedraw();
gc->Activate(win);
gc->SetPenStyle(CGraphicsContext::ENullPen);
gc->SetBrushStyle(CGraphicsContext::ESolidBrush);
TBool color = EFalse;
if (Profiler::Start() == KErrNotFound)
{
_LIT(KProfiler,"profiler");
_LIT(KStart,"start -noui -drive=S");
RProcess p;
if (p.Create(KProfiler,KStart) == KErrNone)
{
p.Resume();
p.Close();
}
}
for (TInt col=0; col<KCol; ++col)
{
color = !color;
for (TInt row=0; row<KRow; ++row)
{
TRect rect;
rect.iTl.iX = col * KSize.iWidth;
rect.iTl.iY = row * KSize.iHeight;
rect.SetSize(KSize);
color = !color;
gc->SetBrushColor(color? KRgbBlue : KRgbBlack);
gc->DrawRect(rect);
}
}
gc->Deactivate();
win.EndRedraw();
ws.Flush();
User::After(3000000);
win.Close();
grp.Close();
delete gc;
delete scr;
ws.Close();
Profiler::Stop();
Profiler::Close();
Profiler::Unload();
}