spin控件的UDN_DELTAPOS消息//下面代码什么作用?

mirroBS 2012-08-10 11:30:43


对于有返回值的消息,要用函数SetWindowLong(hwnd,DWL_MSGRESULT,value);其中value用来设置消息返回值。


LPNMHDR lpnmh;
LPNMUPDOWN lpnmud;

……

case WM_NOTIFY:
lpnmh = (LPNMHDR)lParam;
switch(lpnmh->code)
{
case UDN_DELTAPOS:
lpnmud = (LPNMUPDOWN)lParam;
if(lpnmud->iPos+lpnmud->iDelta>= 20 )//这句是什么意思?
{
SetWindowLong(hwnd,DWL_MSGRESULT,TRUE);
return TRUE;
}
else
return FALSE;
}
break;

……

...全文
197 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Gloveing 2012-08-17
  • 打赏
  • 举报
回复
UDN_DELTAPOS


Sent by the operating system to the parent window of an up-down control when the position of the control is about to change. This happens when the user requests a change in the value by pressing the control's up or down arrow. The UDN_DELTAPOS message is sent in the form of a WM_NOTIFY message.

UDN_DELTAPOS
lpnmud = (LPNMUPDOWN) lParam;

=======================
判断其位置信息吧?

15,980

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧