📄 subject_58021.htm
字号:
<p>
序号:58021 发表者:huhanjing 发表日期:2003-10-29 15:18:06
<br>主题:OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)?
<br>内容:怎么调用这个函数呢?<BR>通过SendMessage可以吗?<BR>若可以的话,他的第一个参数要怎么写呢?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:redleaf 回复日期:2003-10-29 18:43:04
<br>内容:wParam<BR><BR>Identifies the control that sends the message if the message is from a control. Otherwise, wParam is 0.<BR><BR>lParam<BR><BR>Pointer to a notification message (NMHDR) structure that contains the notification code and additional information. For some notification messages, this parameter points to a larger structure that has the NMHDR structure as its first member.<BR><BR>pResult<BR><BR>Pointer to an LRESULT variable in which to store the result code if the message is handled.<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:huhanjing 回复日期:2003-10-30 08:32:44
<br>内容:那我SendMessage的第一个参数是不是就是对应的OnNotify中的参数WPARAM wParam?<BR>比如说,这个参数为WM_DLG_NOTIFY,但编译时老是说这个没有定义?我该怎么改呢?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:redleaf 回复日期:2003-10-30 08:49:17
<br>内容:这里的wParam是指发送WM_NOTIFY消息的控件ID,就是你那个控件notify了就是哪一个<BR><BR>SendMessage在SDK中的定义有四个参数<BR>LRESULT SendMessage(<BR> HWND hWnd, // handle to destination window<BR> UINT Msg, // message<BR> WPARAM wParam, // first message parameter<BR> LPARAM lParam // second message parameter<BR>);<BR><BR>但在视图类中句柄就用默认的视图类的,Msg参数就是WM_NOTIFY<BR>MFC中封装了WM_NOTIFY的处理,你只需要用向导生成该消息的处理函数<BR>然后填入自己的代码
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:huhanjing 回复日期:2003-10-30 09:15:19
<br>内容:那我能不能自己定义消息呢?<BR>若可以的话,我要怎么定义呢?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -