@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;