完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我想按键一按下去就改变EDIT中的值,但我像下面这样写,按键一暗下去就会死机,不知道问什么,有没有人能说一下?
static void _cbDialog(WM_MESSAGE * pMsg) { WM_HWIN hItem; int NCode; int Id; // USER START (Optionally insert additional variables) // USER END switch (pMsg->MsgId) { case WM_INIT_DIALOG: // // Initialization of 'Edit' // hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); // EDIT_SetText(hItem, "123"); EDIT_SetDecMode(hItem,0,0,1000,0,0); EDIT_SetValue(hItem, 23); // USER START (Optionally insert additional code for further widget initialization) // USER END break; case WM_NOTIFY_PARENT: Id = WM_GetId(pMsg->hWinSrc); NCode = pMsg->Data.v; switch(Id) { case ID_BUTTON_0: // Notifications sent by 'Button' switch(NCode) { case WM_NOTIFICATION_CLICKED: // EDIT_SetDecMode(hItem,0,0,1000,0,0); EDIT_SetValue(hItem, 800); //GUI_Exec1(); //GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); //EDIT_SetValue(hItem, 23); //EDIT_SetText(hItem, "ad"); // 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; // USER START (Optionally insert additional code for further notification handling) // USER END } break; 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; // 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; } } |
|
相关推荐
3个回答
|
|
帮顶。。。。
|
|
|
|
哪行代码发生了异常?
|
|
|
|
回调函数中怎么进行重绘啊,你加上重绘消息试一下
|
|
|
|
只有小组成员才能发言,加入小组>>
692 浏览 0 评论
1106 浏览 1 评论
2473 浏览 5 评论
2808 浏览 9 评论
移植了freeRTOS到STMf103之后显示没有定义的原因?
2646 浏览 6 评论
使用eim外接fpga可是端口一点反应都没有有没有大哥指点一下啊
653浏览 9评论
649浏览 7评论
请教大神怎样去解决iMX6Q在linux3.0.35内核上做AP失败的问题呢
781浏览 6评论
628浏览 5评论
668浏览 5评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 01:55 , Processed in 1.410590 second(s), Total 84, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号