本文整理汇总了C++中Dialog::BlitCursor方法的典型用法代码示例。如果您正苦于以下问题:C++ Dialog::BlitCursor方法的具体用法?C++ Dialog::BlitCursor怎么用?C++ Dialog::BlitCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dialog
的用法示例。
在下文中一共展示了Dialog::BlitCursor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawTextInput
void AlliesWhiteboard::DrawTextInput(LPDIRECTDRAWSURFACE DestSurf)
{
Dialog *DialogPTR = (Dialog*)LocalShare->Dialog;
int BFHalfX = (LocalShare->ScreenWidth-128)/2 + 128;
int BFHalfY = (LocalShare->ScreenHeight-64)/2 + 32;
if(CurrentElement)
DialogPTR->DrawText(DestSurf, BFHalfX-InputBoxWidth/2+5, BFHalfY-InputBoxHeight/2-13, "Edit Textmarker");
else
DialogPTR->DrawText(DestSurf, BFHalfX-InputBoxWidth/2+5, BFHalfY-InputBoxHeight/2-13, "Add Textmarker");
DDBLTFX ddbltfx;
DDRAW_INIT_STRUCT(ddbltfx);
ddbltfx.ddckSrcColorkey.dwColorSpaceLowValue = 102;
ddbltfx.ddckSrcColorkey.dwColorSpaceHighValue = 102;
RECT Dest;
Dest.left = BFHalfX-InputBoxWidth/2;
Dest.top = BFHalfY-InputBoxHeight/2;
Dest.right = Dest.left+InputBoxWidth;
Dest.bottom = Dest.top+InputBoxHeight;
if(DestSurf->Blt(&Dest, lpInputBox, NULL, DDBLT_ASYNC | DDBLT_KEYSRCOVERRIDE, &ddbltfx)!=DD_OK)
{
DestSurf->Blt(&Dest, lpInputBox, NULL, DDBLT_WAIT | DDBLT_KEYSRCOVERRIDE, &ddbltfx);
}
DialogPTR->DrawSmallText(DestSurf, BFHalfX-(InputBoxWidth/2)+14, BFHalfY-5, Text);
//draw cursor if textbox overlap
if((MouseX-128)>Dest.left-10 && (MouseX-128)<Dest.right && (MouseY-32)>Dest.top-34 && (MouseY-32)<Dest.bottom)
DialogPTR->BlitCursor(DestSurf, MouseX-128, MouseY-32);
}