/********************************************************************* * * _cbBk */ static void _cbBk(WM_MESSAGE * pMsg) { WM_KEY_INFO * pInfo; switch (pMsg->MsgId) { case WM_PAINT: _pfDrawBk(_DrawLogo); break; case WM_SET_FOCUS: pMsg->Data.v = 0; break; case WM_KEY: pInfo = (WM_KEY_INFO *)pMsg->Data.p; if (pInfo->PressedCnt) { switch (pInfo->Key) { case 'n': _Next = 1; break; } } break; default: WM_DefaultProc(pMsg); break; } }
/********************************************************************* * * GUIDEMO_DrawBk */ void GUIDEMO_DrawBk(int DrawLogo) { _pfDrawBk(DrawLogo); }
/********************************************************************* * * _cbBk */ static void _cbBk(WM_MESSAGE * pMsg) { WM_KEY_INFO * pInfo; switch (pMsg->MsgId) { case WM_PAINT: _pfDrawBk(_DrawLogo); break; case WM_SET_FOCUS: pMsg->Data.v = 0; break; case WM_KEY: pInfo = (WM_KEY_INFO *)pMsg->Data.p; if (pInfo->PressedCnt) { switch (pInfo->Key) { case GUI_KEY_LEFT: //BUTTON_SetFocussable(win_foucus_button[win_foucus_button_x][win_foucus_button_y], 0); if(win_foucus_button_y > 0) win_foucus_button_y --; else win_foucus_button_y = 1; //BUTTON_SetFocussable(win_foucus_button[win_foucus_button_x][win_foucus_button_y], 1); break; case GUI_KEY_RIGHT: //BUTTON_SetFocussable(win_foucus_button[win_foucus_button_x][win_foucus_button_y], 0); if(win_foucus_button_y < 1) win_foucus_button_y ++; else win_foucus_button_y = 0; //BUTTON_SetFocussable(win_foucus_button[win_foucus_button_x][win_foucus_button_y], 1); break; case GUI_KEY_UP: break; case GUI_KEY_DOWN: break; case GUI_KEY_F1: BUTTON_SetFocussable(win_foucus_button[win_foucus_button_x][win_foucus_button_y], 0); if(win_foucus_button_y) { if(win_foucus_button_x == 0) { win_foucus_button_x++; win_foucus_button_y = 0; //WM_DeleteWindow(_hDialogDis); } else { win_foucus_button_x--; win_foucus_button_y = 0; //WM_DeleteWindow(_hDialogControl); } } break; case 'n': _Next = 1; break; default: break; } } break; default: WM_DefaultProc(pMsg); break; } }