tags:

views:

189

answers:

1

The MFC application that i created is dialog based. Just one dialog thats all. How do I get the window handle to this window, while the application is performing the InitDialog. I need to find out its dimension as well. GetForegroundWindow not necessarily gives you the handle to this window that is loading up

+3  A: 

Check the m_hWnd member of your dialog object. GetClientRect() should work to give you the size of client (interior) of the dialog. GetWindowRect() will give you the total size including window borders, but the position will be off.

Mark Ransom