msdn上面说:
When a WM_NOTIFY message is sent, the control is offered the first chance to handle it. If any other reflected message is sent, the parent window has the first chance to handle it and the control will receive the reflected message.这句话怎么理解?
When a WM_NOTIFY message is sent, the control is offered the first chance to handle it. If any other reflected message is sent, the parent window has the first chance to handle it and the control will receive the reflected message.这句话怎么理解?
为什么说消息反射是MFC的机制而winapi没有,如果winapi没有这个机制的话,MFC作为一种包装,如何才能凭空的产生这样一个机制呢?
return TRUE; // eaten by child AFX_NOTIFY notify;
notify.pResult = pResult;
notify.pNMHDR = pNMHDR;
return OnCmdMsg((UINT)nID, MAKELONG(nCode, WM_NOTIFY), ¬ify, NULL);ReflectLastMsg将消息先发送反射消息控件处理,若控件处理了,那么后面就是return TRUE了,否则往下执行OnCmdMsg交给父窗口...一切都是代码实现的而已