RT:创建一个数字键盘共10个,但是显示时只有7个。。。。定义的ALLOCSize 80k。。。。屏蔽前7个后面的*8*,*9*,*0*就可以显示。。。
请问这是怎么回事,求讲解。。。
static WM_HWIN _CreateNumPad(WM_HWIN hParent)
{
_CreateNumPadButton(_hNumPad, "1", GUI_ID_BUTTON1, 10, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "2", GUI_ID_BUTTON2, 60, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "3", GUI_ID_BUTTON3, 110, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "4", GUI_ID_BUTTON4, 160, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "5", GUI_ID_BUTTON5, 210, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "6", GUI_ID_BUTTON6, 260, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "7", GUI_ID_BUTTON7, 310, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "8", GUI_ID_BUTTON8, 360, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "9", GUI_ID_BUTTON9, 410, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
_CreateNumPadButton(_hNumPad, "0", GUI_ID_BUTTON0, 460, 500, 40, 40,GUI_GREEN, GUI_WHITE, 1, 0);
//_CreateNumPadButton(_hNumPad, ".", GUI_ID_BUTTON1, 510, 500, 40, 40,GUI_BLACK, GUI_WHITE, 1, 0);
//_CreateNumPadButton(_hNumPad, "X", GUI_ID_BUTTON2, 560, 500, 40, 40,GUI_BLACK, GUI_WHITE, 1, 0);
return _hNumPad;
}
//===========================================================================================
static void _Scanning(WM_MESSAGE * pMsg)
{
int NCode, Id;
WM_HWIN htext,hWin,hedit = pMsg->hWin;
switch (pMsg->MsgId)
{
case WM_PAINT:
_PaintFrame();
//WM_SetFocus(hWin);
htext=TEXT_CreateEx(40,260,320,60,WM_HBKWIN,WM_CF_SHOW,0,GUI_ID_TEXT1,"?????????·×???");
TEXT_SetTextAlign(htext, GUI_TA_VCENTER|GUI_TA_CENTER);
TEXT_SetFont(htext, &GUI_FontHZ_SimSun_35);
_CreateNumPad(hWin);【、、、、、、、、、调用 键盘】
hedit= EDIT_CreateEx(370, 260, 100, 60, hWin, WM_CF_SHOW, 0, GUI_ID_EDIT0, 3);
EDIT_SetFont(hedit, &GUI_Font32B_ASCII);
EDIT_SetTextAlign(hedit, GUI_TA_VCENTER|GUI_TA_CENTER);
break; |