新手上路
- 积分
- 31
- 金钱
- 31
- 注册时间
- 2016-11-24
- 在线时间
- 5 小时
|
用WM_CreateTimer(WM_HBKWIN,0,1000,0)隐藏窗口后在WM_TIMER上无法显示,我想是消息传递出现了问题,但是找不到问题出在哪里?
case WM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch (Id) {
case ID_LISTBOX_0: // Notifications sent by 'Listbox'
switch (NCode) {
case WM_NOTIFICATION_CLICKED:
break;
case WM_NOTIFICATION_RELEASED:
break;
case WM_NOTIFICATION_SEL_CHANGED:
break;
}
break;
case BUTTON_OK: // Notifications sent by 'OK'
switch (NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_RELEASED:
// if(Id == BUTTON_OK)
// 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;
case BUTTON_OFF: // Notifications sent by 'OFF'
switch (NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_RELEASED:
if (Id == BUTTON_OFF)
{
WM_HideWindow(pMsg->hWin);//隐藏窗口
WM_CreateTimer(WM_HBKWIN,0,1000,0);//定时器
}
break;
//背景窗口回调函数
static void cbCallBack(WM_MESSAGE * pMsg)
{
WM_HWIN hItem;
switch (pMsg->MsgId)
{
hItem = WM_GetId(pMsg->hWinSrc);
case WM_PAINT:
GUI_SetBkColor(GUI_GREEN);
GUI_Clear();
GUI_SetColor(GUI_BLACK);
GUI_SetFont(&GUI_Font20_ASCII);
GUI_DispStringHCenterAt("MrHui", 150, 0);
break;
case WM_TIMER:
WM_ShowWindow(pMsg->hWin); //定时器的使用
break;
|
|