|
发表于 2017-5-4 20:14:54
|
显示全部楼层
static void PaintDialog(WM_MESSAGE * pMsg)
{
WM_HWIN hWin = pMsg->hWin;
/* 蓝条纹 */
GUI_DrawBitmap(&bmpic_tiao, 0, 0);
GUI_DrawBitmap(&bmpic_tiao, 0, 454);
/* 机器显示 */
GUI_DrawBitmap(&bmpic_machine, 0, 80);
}
/*****************************************************************
** FunctionName:void InitDialog(WM_MESSAGE * pMsg)
** Function: to initialize the Dialog items
**
** call this function in _cbCallback --> WM_INIT_DIALOG
*****************************************************************/
static void InitDialog(WM_MESSAGE * pMsg)
{
WM_HWIN hWin = pMsg->hWin;
//
//FRAMEWIN
//
FRAMEWIN_SetClientColor(hWin,0xffffff);
FRAMEWIN_SetTitleVis(hWin,0);
//
//GUI_ID_BUTTON0
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON0),BUTTON_CI_UNPRESSED,0xffffff);
BUTTON_SetBitmap(WM_GetDialogItem(hWin,GUI_ID_BUTTON0), BUTTON_BI_UNPRESSED, &bmpic_bt_setup);
//
//GUI_ID_BUTTON2
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),BUTTON_CI_UNPRESSED,0xffffff);
BUTTON_SetBitmap(WM_GetDialogItem(hWin,GUI_ID_BUTTON2), BUTTON_BI_UNPRESSED, &bmpic_bt_open);
}
回调中方法也是一样的:
case GUI_ID_BUTTON2: /* 打开 */
if(NCode==WM_NOTIFICATION_RELEASED)
{
GUI_EndDialog(pMsg->hWin, 0);
MainTask_open();
}
break;
来回调用就死了 |
|