Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Sizing issue when using CExtResizableDialog Collapse All
Subject Author Date
Chris Anderson Apr 25, 2007 - 1:16 PM

I am using a instance of CExtResizableDialog in a CExtControlBar. I need for the initial size on display to be the same as specified with
the dialog template resource. I need the resizing funtionality and hence dont want to use the CExtPanelControlBar. How would I go about doing this?

Chris Anderson May 1, 2007 - 4:45 PM

ok thanks that worked.

Chris Anderson Apr 30, 2007 - 10:17 AM

Yes I agree but I need the control over the size only when the dock window is floated. When it is docked I dont care about the size. I need the dialog resource size to be respected (atleast with the initial lauch of the app). Once the user resizes it, I dont care about the size of the dock windows (docked or floated) since the information is stored as part of the state and written out to the registry.

Technical Support May 1, 2007 - 1:26 PM

You can use the CExtControlBar::SetInitDesiredSizeFloating() method for that. It allows you to specify the floating size of your control bar with a dialog inside.



Chris Anderson Apr 27, 2007 - 11:15 AM

Any other approach other than the ones suggested above?

Technical Support Apr 28, 2007 - 12:59 PM

The control bar (CExtControlBar) is resizable, which means that if you dock more than one control bars in a row/column, they affect each other. That is the main difficulty in setting a particular size for the control bar (the size of dialog template in your case). If you have many control bars organized into a complex layout, this makes the problem even harder. The way we suggested in the previous post is worth to try. There is one issue we forgot to mention. You can anchor the controls on your dialog so that their size and layout proportionally changes when the dialog is resized. This is described in this article:

How to create a window containing auto-resizable controls

This approach (anchoring controls) may allow you to drop this requirement (a certain initial size) because the controls will always be neatly arranged on the dialog.

Chris Anderson Apr 26, 2007 - 9:14 AM

Anyway of it getting created with the size of the dialog resource rather than programmatically?

Technical Support Apr 27, 2007 - 10:59 AM

There is another approach. You run your application, dock the control bars manually, close the application and add the state of control bars including their positions (saved in the registry) to your installer. Please note you can also serialize the state to a file on disk instead of to the registry.

Technical Support Apr 26, 2007 - 4:21 AM

There are a set of CExtControlBar::SetInitDesiredSize***() methods that allow you to specify the desired size. But please note that there is no guaranty that the size will be exactly the same as you specified if the control bar is docked together with other control bars in the same row or column because in this case control bars affect each other’s positions and sizes.