   detecting window's resolution
  Just wondering if there's a function that will return a window's current resolution. I'm looking to constrain my mouse cursor to these bounds without havin g to pass the data through 2 functions.  I haven't found a function for this in the msdn.   
  GetClientRect() will return the usable space on a window.  Generally upon resizing, you GetClientRect() and use (right-left, bottom-top) as your new backbuffer size.  GetWindowRect() will return the entire window size, including the space needed for menu bars, titlebars, borders, etc.If you want to make a window a specific size, to simulate a fullscreen resolution, such as 800x600, you need AdjustWindowRect().  This can transform a client rect size into a window rect size.  You then pass this size, with the same style flags to CreateWindow, or one of the resizing calls, and you'll have a window of the size you'd like.If you want to know the resolution of a monitor, use D3D's GetAdapterDisplayMode, or GetAdapterMonitor and a Win32's GetMonitorInfo.You can convert a mouse click position to between client and screen coords with ClientToScreen and ScreenToClient.That should cover just about anything you'll need regarding window coordinates.   ;  Add a handler for the WM_SIZE message.  It gets called when the window is created and any time it is resized.  I use it to setup the DirectX stuff and reset the device in my MFC application:void CMyClientWindow::OnSize(UINT nType, int cx, int cy){CWnd::OnSize(nType, cx, cy);if( g_pDevice ){g_bPauseDrawing = TRUE;HRESULT hr = 0;g_D3DPresentParams.BackBufferWidth = cx;g_D3DPresentParams.BackBufferHeight = cy;The format is a tad different for a WIN32 app, but it does the same thing.  You get the windows size in the cx and cy parameters.Or you can use functions shown by Namethat... to get the actual top left and bottom right coordinates of the window.