   Positioning a dialog box (Win32) C++
  Hi,Is there a way you can position a dialog box relative to screen resolution.The main reason for this question is that obviously not everyone runs the same resolution.For example a dialog box positioned at (400,300) might look fine for people running 1024x768. But if a user happens to be running at 640x480, the content of the dialog box will most likely fall off the screen.Also, Is there a function in C++ like VB's GetScreenWidth() and GetScreenHeight() functions?   
  Use GetSystemMetrics() with SM_CXSCREEN and SM_CYSCREEN   ;  I was getting the desktop windows size if i want to position the dialog to the center of the screen like : RECT r;GetWindowRect(GetDesktopWindow(),&r);Then you can set the position depending on that rectangle.   ;  Using GetDesktopWindow() and then GetClientRect() might not be desirable since GetDesktopWindow() returns a window which spans every monitor and is not necessarily positioned at (0, 0). As a result you could end up accidentally placing your dialog either off screen or in between two screens.   ;  If you create the dialog box from a template you can specify the following styles:DS_CENTER - centres the box on the screenDS_CENTERMOUSE - centres the box relative to the mouseSkizz   