本文整理汇总了C++中CFont::StrCopy方法的典型用法代码示例。如果您正苦于以下问题:C++ CFont::StrCopy方法的具体用法?C++ CFont::StrCopy怎么用?C++ CFont::StrCopy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFont
的用法示例。
在下文中一共展示了CFont::StrCopy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawKeysText
// Keys Text
//------------------------------------------------------------------------------------------------------------
void cAmp::DrawKeysText()
{
CFont* cf = cfont[view.cfP]; //~
#define clr(r,g,b) cf->Fclr = D3DXCOLOR(r,g,b,1)
//if (shift) { cf->StrWr("shift", xSize/2,Fy); }
//if (ctrl) { cf->StrWr("ctrl", xSize/2+40,Fy); }
//if (alt) { cf->StrWr("alt", xSize/2+70,Fy); }
/* Edit name */
if (ed==ED_nTab)
{
clr(0.5,0.9,1); int y = yB_pli;
cf->StrWr("Tab name: ", 1,y);
cf->StrWr(sed, cf->xwr+10,y);
int x = cf->xwr+1; // cursor |
fTi+=dt; if (fTi > 0.7f) fTi=0.f; //blink
D3DRECT r= {x, y, x+2, y+cf->Fy}; pDev->Clear(1, &r, clFl, RGB(fTi*200+50,fTi*200,0), 1.f, 0);
}
/* Edit search */
if (ed==ED_nFind)
{
clr(0.3,1,0); int y = yB_pli;
cf->StrWr("Search: ", 1,y);
cf->StrWr(sed, cf->xwr+10,y); //x2
int x = cf->xwr+1; // cursor |
fTi+=dt; if (fTi > 0.7f) fTi=0.f; //blink
D3DRECT r= {x, y, x+2, y+cf->Fy}; pDev->Clear(1, &r, clFl, RGB(0,fTi*200+50,0), 1.f, 0);
}
/// Keys list
if (ed!=ED_Keys) return;
cf = cfont[view.cfG]; //~
int y = yB_gc, x=5;
clr(1,1,1);
cf->StrWr("Global HotKeys", 15, yB_gc-90+15);
cf->StrWr("OK", 150+18, yB_gc-80+2);
clr(0.5,0.8,1.0);
cf->StrWr("Function Shift Ctrl Alt Key", 15, yB_gc-25);
clr(0.6,0.7,0.7);
cf->StrWr("LMB- choose RMB- on/off", x+120, yB_gc-90+40);
for (int i=0; i<FU_ALL; i++)
{
if (vKeys[i].on)
clr(1,1,1); else clr(0.5,0.6,0.7);
cf->StrWr(cswFuns[i], 5+x, y);
if (i == yPickKey && bPickingKey)
{ clr(1,1,1);
cf->StrCopy(" Press new key..."); }
else
strKeyName(vKeys[i].vk, vKeys[i].sc, cf->str);
cf->Write(xB_gck+5+x, y);
y += yH_gc + 16*cyFadd[i]/2;
}
}