win32 API and dialog box locations

Started by
5 comments, last by MARS_999 18 years, 7 months ago
I am trying to figure out how to make my dialog boxes and my main window behave so that when I change resolutions or resize the start bar the app resizes itself to keep uniform look instead of gaps? Any help would be greatly appreciated. Thanks
Advertisement
Have a look at WM_SETTINGCHANGE for information about the start bar resizing and WM_DISPLAYCHANGE for information about resolution changes.
Thanks for the reply ZedFex. I am looking for info on resizing my OpenGL window, and my dialog box. Now would I have to get the new resize values from the main winproc()? and then send that data to the dialog boxes and have them resize themselfs? Thanks
It all depends on where your windows are positioned: Is your dialog box a separate window or is it a child of your main window ?

If it is a child, then yes, you need to get the values from the main window; if they are both windows in their own individual rights then you can get the information for your dialog from your dlgproc function.
Hmmm I changed my dialog box type to a child style and I lose my ability to use my mouse wheel???
Subclass your dialog box then and intercept the WM_MOUSEWHEEL message, using SetWindowLong(GWL_WINDOWPROC, subclassproc).
Quote:Original post by ZedFx
Subclass your dialog box then and intercept the WM_MOUSEWHEEL message, using SetWindowLong(GWL_WINDOWPROC, subclassproc).


Thanks for the help, but I just moved the WM_MOUSEWHEEL messge into the WndProc function instead of my dialog box callback.

This topic is closed to new replies.

Advertisement