static const GUI_WIDGET_CREATE_INFO _aDialogCreateMain[] = {
{ FRAMEWIN_CreateIndirect, "", 0, 0, 0, 320, 240 , 0},
{ BUTTON_CreateIndirect, "Begin", GUI_KEY_F1, 0, 200, 64, 40,0,0},
{ BUTTON_CreateIndirect, "Stop", GUI_KEY_F2, 64, 200, 64, 40,0,0},
{ BUTTON_CreateIndirect, "Left", GUI_KEY_F3, 128, 200, 64, 40,0,0},
{ BUTTON_CreateIndirect, "Right", GUI_KEY_F4, 192, 200, 64, 40,0,0},
{ BUTTON_CreateIndirect, "OK", GUI_KEY_F5, 256, 200, 64, 40,0,0},
};
对话框资源如下,FRAMEWIN大小是320*240,正好是整个屏幕时,用GUI_CreateDialogBox函数创建下面的5个按键可以显示出来;如果把FRAMEWIN的大小改成320*35,那么下面的五个按键就显示不出来;
如果不用GUI_CreateDialogBox函数,直接创建是都可以显示的。
hWin1= FRAMEWIN_Create("Current Time",0,WM_CF_SHOW,0,0,319,35);
_ahButton[0] = BUTTON_Create(0, 200, _ButtonSizeX, _ButtonSizeY, GUI_KEY_F1,
WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
_ahButton[1] = BUTTON_Create(64,200, _ButtonSizeX, _ButtonSizeY, GUI_KEY_F2,
WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
_ahButton[2] = BUTTON_Create(128,200, _ButtonSizeX, _ButtonSizeY, GUI_KEY_F3,
WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
_ahButton[3] = BUTTON_Create(192,200, _ButtonSizeX, _ButtonSizeY, GUI_KEY_F4,
WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV)
_ahButton[4] = BUTTON_Create(256,200, _ButtonSizeX, _ButtonSizeY, GUI_KEY_F5,
WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
有大神知道这是什么原因嘛?求指点!拜谢! |