case WM_NOTIFY_PARENT:
{
int NCode = pMsg->Data.v; /* Get notification code */
int Id = WM_GetId(pMsg->hWinSrc); /* Get control ID */
switch (NCode) {
case WM_NOTIFICATION_RELEASED: /* React only if released */
case WM_NOTIFICATION_CLICKED: <-----------增加这一句
if (Id == GUI_ID_OK) {
GUI_EndDialog(hWin, 0); /* End dialog with return value 0 if OK */
}
break;
发现它只处理了WM_NOTIFICATION_RELEASED,而不是点击,也许是我的触摸屏点击飘得厉害。。
在MESSAGEBOX.c增加一句就解决了。
case WM_NOTIFY_PARENT:
{
int NCode = pMsg->Data.v; /* Get notification code */
int Id = WM_GetId(pMsg->hWinSrc); /* Get control ID */
switch (NCode) {
case WM_NOTIFICATION_RELEASED: /* React only if released */
case WM_NOTIFICATION_CLICKED: <-----------增加这一句
if (Id == GUI_ID_OK) {
GUI_EndDialog(hWin, 0); /* End dialog with return value 0 if OK */
}
break;
一周热门 更多>