My application consists of a mainframe window that can display multiple modeless dialogs. At a given time multiple dialogs can be open.

My question is:
What message can the dialog trap to know that it is brought into focus? I need to know this so that when the dialog is brought into focus it can set certain global variables.

I tried trapping the WM_SETFOCUS message...but that does not get message does not get activated when the dialog is brought into focus.

Any help is greatly appreciated.
Thanks,
MD