What does uMsg parameter mean in the definition of CALLBACK DialogProc()

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.

Answers


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 lParam and wParam then allow to give more information concerning that "operation".

Some messages are merely notifications, others can be sent to windows to induce some operation.


Need Your Help

Incrementing values in form field names

loops coldfusion

I need to validate X number of fields. Each field is named "testFieldX", where X is any real number greater that 1.