Dynamically alter size of Dialog Box 
Author Message
 Dynamically alter size of Dialog Box

My application runs in systems that have different display modes, e.g
640x480, 800x600, 1024x768.  I developed the application with 800x600.
Some of the panels are too large to be completely displayed when in
640x480.  Does anyone know how I can dynamically alter the panels in
OnInitDialog to be compatible with the display mode?


Sun, 22 Jul 2001 03:00:00 GMT  
 Dynamically alter size of Dialog Box
Just use the MoveWindow() function to resize and/or move your window and
controls around the screen.  You have to make some kind of scheme to
calculate the size in percentage of all of your controls so you can resize
them appropriately when the windows sizes changes (also the font settings if
windows is using large or small fonts).

HTH,
John


Quote:
>My application runs in systems that have different display modes, e.g
>640x480, 800x600, 1024x768.  I developed the application with 800x600.
>Some of the panels are too large to be completely displayed when in
>640x480.  Does anyone know how I can dynamically alter the panels in
>OnInitDialog to be compatible with the display mode?



Sun, 22 Jul 2001 03:00:00 GMT  
 Dynamically alter size of Dialog Box
Hi bobofky,

      David Kruglinski's "Inside Visual C++" has a 'CPersistentFrame'
class that allows the user to size and position the frame regardless of
type
of display...works real well



Sun, 22 Jul 2001 03:00:00 GMT  
 Dynamically alter size of Dialog Box
Design them in 640x480... This is actually not as stupid as it sounds, as
you will get good looking dialogs in all resolutions. If your dialogs don't
fit in 640x480, they are probably too big anyway. Resizing the dialog is not
only a question of resizing the parent, but all childs as well, then you
will have to change the dialog box font, the dialog will look rotten and
your users will hate you.

Johan Rosengren
Responsable Informatique
PACTA S.A.



Sun, 22 Jul 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. dialog box not displayed after altering resource template

2. Altering focus between two dialog boxes?

3. Using Threads to alter Dialog box controls

4. Problems with List box in dynamically created dialog box

5. Problems with List box in dynamically created dialog box

6. Altering String Table Dynamically

7. Dynamically sizing dialogs to tab control

8. Dynamically Sizing a Dialog Control

9. Modeless dialog boxes in dynamically linked dll

10. subclassing controls in dynamically biult dialog box

11. How do I change the caption on an MFC Dialog box (dynamically)

12. dynamically build dialog box

 

 
Powered by phpBB® Forum Software