[C] 纯文本查看 复制代码
void ButtonTest(void){ int key=0; int hWin; GUI_Init(); GUI_SetFont(&GUI_Font8x16); GUI_SetBkColor(GUI_BLUE); GUI_Clear(); hWin=WM_CreateWindow(0,0,ScreenX,ScreenY, WM_CF_SHOW, cbForegroundWin, 0); hButton[0] = BUTTON_Create(10,40 ,ButtonWidth, ButtonHeigth, GUI_ID_OK, WM_CF_SHOW); BUTTON_SetText(hButton[0], "Button1"); hButton[1] = BUTTON_Create(30+ButtonWidth, 40, ButtonWidth, ButtonHeigth, GUI_ID_OK, WM_CF_SHOW); BUTTON_SetText(hButton[1], "Button2"); hButton[2] = BUTTON_Create(10, 60+ButtonHeigth, ButtonWidth, ButtonHeigth, GUI_ID_OK, WM_CF_SHOW); BUTTON_SetText(hButton[2], "Button3"); key = GUI_WaitKey(); for(int i=0;i<3;i++) { BUTTON_Delete(hButton); }}[C] 纯文本查看 复制代码
如果让打开这个界面的时候默认聚焦第一个button,该用什么函数呢?在什么地方用?求教,在线等