完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
(1)void GUI_EndDialog(WM_HWIN hDialog, int r); 函数的形参R的作用是什么,看到有些程序是0,有些是1,不知道这是什么原因?
(2)WM_GetDialogItem()获取对话框句柄必须紧跟(方式1) case WM_INIT_DIALOG:后吗?我测试的时候,发现下面第2种方式获取句柄后无法关闭对话框; 方式1: case WM_INIT_DIALOG: Fwin1 = WM_GetDialogItem(pMsg->hWin, ID_FRAMEWIN_1); hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); EDIT_SetText(hItem, ""); break; 方式2: case WM_INIT_DIALOG: hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); EDIT_SetText(hItem, ""); Fwin1 = WM_GetDialogItem(pMsg->hWin, ID_FRAMEWIN_1); break; 回调函数如下: static void _cbDialog1(WM_MESSAGE * pMsg) { WM_HWIN hItem; int NCode; int Id; // USER START (Optionally insert additional variables) // USER END WM_HWINFwin1; switch (pMsg->MsgId) { case WM_INIT_DIALOG: Fwin1 = WM_GetDialogItem(pMsg->hWin, ID_FRAMEWIN_1); hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); EDIT_SetText(hItem, ""); break; case WM_NOTIFY_PARENT: Id = WM_GetId(pMsg->hWinSrc); NCode = pMsg->Data.v; switch(Id) { case ID_EDIT_0: // Notifications sent by 'Edit' switch(NCode) { case WM_NOTIFICATION_CLICKED: // USER START (Optionally insert code for reacting on notification message) // USER END break; case WM_NOTIFICATION_RELEASED: // USER START (Optionally insert code for reacting on notification message) // USER END break; case WM_NOTIFICATION_VALUE_CHANGED: // 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 ID_BUTTON_15: // 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: // USER START (Optionally insert code for reacting on notification message) // USER END GUI_EndDialog(Fwin1,0); break; // USER START (Optionally insert additional code for further notification handling) // USER END } break; // USER START (Optionally insert additional code for further Ids) // USER END } break; // USER START (Optionally insert additional message handling) // USER END default: WM_DefaultProc(pMsg); break; } } |
|
相关推荐
1个回答
|
|
这个参数是专门针对阻塞式窗口说的,非阻塞式窗口忽略这个参数
|
|
|
|
只有小组成员才能发言,加入小组>>
682 浏览 0 评论
1099 浏览 1 评论
2464 浏览 5 评论
2798 浏览 9 评论
移植了freeRTOS到STMf103之后显示没有定义的原因?
2636 浏览 6 评论
使用eim外接fpga可是端口一点反应都没有有没有大哥指点一下啊
645浏览 9评论
641浏览 7评论
请教大神怎样去解决iMX6Q在linux3.0.35内核上做AP失败的问题呢
773浏览 6评论
618浏览 5评论
660浏览 5评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-18 16:16 , Processed in 0.833748 second(s), Total 48, Slave 38 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号