研究生
最后登录1970-1-1
在线时间 小时
注册时间2015-4-2
|
楼主 |
发表于 2017-7-3 14:36:59
|
显示全部楼层
我放在WM_PAINT里也不行额。- static void _cbDialogQQ(WM_MESSAGE * pMsg) {
- const void * pData;
- WM_HWIN hItem;
- U32 FileSize;
- int NCode;
- int Id;
- // USER START (Optionally insert additional variables)
- // USER END
- switch (pMsg->MsgId) {
- case WM_INIT_DIALOG:
- //
- // Initialization of 'About'
- //
- hItem = pMsg->hWin;
- FRAMEWIN_SetTitleHeight(hItem, 30);
- FRAMEWIN_SetFont(hItem, GUI_FONT_20B_ASCII);
- FRAMEWIN_AddCloseButton(hItem,FRAMEWIN_BUTTON_RIGHT,0);
-
- //
- // Initialization of 'MCU: STM32F429IGT6'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
- TEXT_SetFont(hItem, GUI_FONT_COMIC18B_ASCII);
- //
- // Initialization of 'RTOS: ucos-III'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
- TEXT_SetFont(hItem, GUI_FONT_COMIC18B_ASCII);
- //
- // Initialization of 'GUI: STemwin 5.28'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
- TEXT_SetFont(hItem, GUI_FONT_COMIC18B_ASCII);
- //
- // Initialization of 'Version: v1.1'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
- TEXT_SetFont(hItem, GUI_FONT_COMIC18B_ASCII);
- //
- // Initialization of 'Developer: tianzhi'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_4);
- TEXT_SetFont(hItem, GUI_FONT_COMIC18B_ASCII);
- //
- // Initialization of 'More...'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
- BUTTON_SetFont(hItem, GUI_FONT_16B_ASCII);
-
- // USER START (Optionally insert additional code for further widget initialization)
- // USER END
- break;
- case WM_NOTIFY_PARENT:
- Id = WM_GetId(pMsg->hWinSrc);
- NCode = pMsg->Data.v;
- switch(Id) {
- case ID_BUTTON_0: // Notifications sent by 'More...'
- switch(NCode) {
- case WM_NOTIFICATION_CLICKED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- case WM_NOTIFICATION_RELEASED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- // USER START (Optionally insert additional code for further notification handling)
- // USER END
- }
- break;
- // USER START (Optionally insert additional code for further Ids)
- // USER END
- }
- break;
- // USER START (Optionally insert additional message handling)
- // USER END
- case WM_PAINT:
- GUI_DrawBitmap(&bmLOGO_PNG,290,300);
- break;
- default:
- WM_DefaultProc(pMsg);
- break;
- }
- }
复制代码 |
|