General Dialog Size Question
-
I have seen applications where the initial data entry dialog is small but when the user selects the 'Advance' option a lot more information is displayed on a larger dialog. Does anyone know how this is done as I would like to display a listCtrl, buttons and labels when the use selects the 'More Information' options on a small dialog. Regards,
-
I have seen applications where the initial data entry dialog is small but when the user selects the 'Advance' option a lot more information is displayed on a larger dialog. Does anyone know how this is done as I would like to display a listCtrl, buttons and labels when the use selects the 'More Information' options on a small dialog. Regards,
Does anyone know how this is done yes. when the user clicks on "more infor", you need to manually resize the dialog, that will make the controls "visible" or not to the user.
Maximilien Lincourt Your Head A Splode - Strong Bad
-
Does anyone know how this is done yes. when the user clicks on "more infor", you need to manually resize the dialog, that will make the controls "visible" or not to the user.
Maximilien Lincourt Your Head A Splode - Strong Bad
-
A little more information would be useful. Do I use the SetWindowPos() to be a small dialog at initialisation and then resize to a larger dialog when the 'More Info' button is hit? Is it trial and error to guess the units/size?
MFC measures dialogs in a ratio of the font size, so it can be a bit hit or miss (try changing your system font size to be bigger, then run your app, and you'll see it's got bigger too!) I did something like what you're attempting in the past, and found the easiest solution was to add a simple frame at the bottom (the size of the area that gets shown/hidden) At run time, you can find the height of this control, and resize the dialog window accordingly - this'll make it much easier if you keep going back to add extra controls to the "hidden" part -- Help me! I'm turning into a grapefruit! Phoenix Paint - back from DPaint's ashes!
-
MFC measures dialogs in a ratio of the font size, so it can be a bit hit or miss (try changing your system font size to be bigger, then run your app, and you'll see it's got bigger too!) I did something like what you're attempting in the past, and found the easiest solution was to add a simple frame at the bottom (the size of the area that gets shown/hidden) At run time, you can find the height of this control, and resize the dialog window accordingly - this'll make it much easier if you keep going back to add extra controls to the "hidden" part -- Help me! I'm turning into a grapefruit! Phoenix Paint - back from DPaint's ashes!
Hi, You can simply use MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRedraw = FALSE) on the click on 'More Settings' button and expand/collapse the dialog using required width and height. This will solve ur problem. Vikram Kashyap Sr. Software Engineer TechBooks International R&D Division
-
I have seen applications where the initial data entry dialog is small but when the user selects the 'Advance' option a lot more information is displayed on a larger dialog. Does anyone know how this is done as I would like to display a listCtrl, buttons and labels when the use selects the 'More Information' options on a small dialog. Regards,
sweep123 wrote: Does anyone know how this is done... Yes. See the "Expanding and Contracting your dialog boxes" section of this article for an example. Here is another example, in the "More / Less Detail on Dialog" section.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow