Given a notification handler
BOOL CMyWindow::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
.......
If I process a particular notification. Should I return TRUE or set *pResult = TRUE?
This is something that's bugged me for ages.
Given a notification handler
BOOL CMyWindow::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
.......
If I process a particular notification. Should I return TRUE or set *pResult = TRUE?
This is something that's bugged me for ages.
They are quite different things:
BOOL
indicates whether or not you processed the message. Non-zero if you processed it, zero otherwise. This determines whether or not DefWindowProc
is called.pResult
is used to send information back to the caller related to this specific notification. Exactly what that information is depends on which notification is being handled, as specified by the NMHDR
struct passed via lParam
.