Have you looked at the GetMenuBarInfo function? You can get the RECT of the menu-bar with this function. I.e
MENUBARINFO mbi;
mbi.cbSize = sizeof(mbi);
GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi);
printf("menuBar rect (screen) = %d,%d,%d,%d\n", mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom);
MapWindowPoints(HWND_DESKTOP, hwnd, (LPPOINT)&mbi.rcBar, 2);
printf("menuBar rect (client) = %d,%d,%d,%d\n", mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom);
Notes: 1. All of the members are 0 during the WM_CREATE message handler 2. The dimensions returned are in screen-coords. Example output:
menuBar rect (screen) = 108,130,636,149
menuBar rect (client) = 0,-20,528,-1
When I tried to change the DPI setting with the program running, I was told I'd have to logoff and then login again. Am I correct in assuming that you change the DPI and _then_ open the program? Also, is this a standard menubar, or is it an instance of a toolbar that's been added to a rebar control? The difference being that a standard one should be a part of the non-client area, and therefore the toolbar you have should be automatically moved down to accomodate the menubar having larger text. If however, you have a toolbar inside a rebar control as your menu, the rebar container is a part of your client area, and you need to manually position the toolbar below it. Different DPI settings will change the required height that you need to offset the toolbar by. Can you upload a screen shot somewhere and post a link to it?