【emwin】点击窗口的无效部分来实现一些功能
@2018-07-27
触摸屏幕窗口的无效部分实现 Dropdown 部件的折叠操作
> 具体代码
1 case WM_TOUCH: 2 if (pMsg->Data.p) // Something happened in our area (pressed or released) 3 { 4 const GUI_PID_STATE* pState; 5 pState = (const GUI_PID_STATE*)pMsg->Data.p; 6 7 if (pState->Pressed) 8 { 9 if (WM_GetFocussedWindow() != pMsg->hWin) 10 { 11 hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_0); 12 13 if(0 != DROPDOWN_GetListbox(hItem)) 14 { 15 DROPDOWN_Collapse(hItem); 16 } 17 18 hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_1); 19 20 if(0 != DROPDOWN_GetListbox(hItem)) 21 { 22 DROPDOWN_Collapse(hItem); 23 } 24 25 hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_2); 26 27 if(0 != DROPDOWN_GetListbox(hItem)) 28 { 29 DROPDOWN_Collapse(hItem); 30 } 31 } 32 } 33 } 34 break;
再牛逼的梦想也架不住傻逼似的坚持