The MSDN link http://msdn.microsoft.com/en-us/library/windows/desktop/ms645469(v=vs.85).aspx
explains about the DialogProc callback function.
Here I don’t see any explanation given about the 2nd parameter (UINT uMsg) in the following signature::
INT_PTR CALLBACK DialogProc(
__in HWND hwndDlg,
__in UINT uMsg,
__in WPARAM wParam,
__in LPARAM lParam
);
Can anyone kindly explain what does this 2nd parameter (UINT uMsg) mean. Some detailed explanation (Why we need this uMsg parameter, what is its usage how is it used etc…) on this will be really appreciated. Thanks a lot.
PS: I am new to Callbacj functions, Win32 API programming.
It’s a window message or more precisely a dialog message in this case. The analogous parameter exists also in normal window procedures.
There are various types of window messages, many of them starting with
WM_or another distinct prefix depending on the window class (class is not meant in the OOP sense here, but rather in the Win32 sense).The message says what kind of “operation” is taking place (from the point of view of the window/dialog) or which you want to induce (view from the outside). The parameters
lParamandwParamthen allow to give more information concerning that “operation”.Some messages are merely notifications, others can be sent to windows to induce some operation.