Menu

#22 Result of DefWindowProc call not used

open
nobody
5
2006-11-09
2006-11-09
Nick Ryan
No

The result of the call to DefWindowProc in the method
TMDOCustomSQLMonitor.MonitorWndProc is not used. The
current line reads:

DefWindowProc(FHWnd, Message.Msg, Message.WParam,
Message.LParam);

it should read:

Message.Result := DefWindowProc(FHWnd, Message.Msg,
Message.WParam, Message.LParam);

This may not appear to cause any particularly serious
errors, however it is not the correct usage of
DefWindowProc. For example, not using the result of
DefWindowProc can block system shutdown by not
responding correctly to WM_QUERYENDSESSION messages.

Discussion


Log in to post a comment.