CXTPDialog layout |
Post Reply |
Author | |
notacow
Newbie Joined: 16 January 2011 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 16 January 2011 at 10:13pm |
I've modified an app to give it floating/selectable command bars. The class now inherits from CXTPDialog (was CDialog). The app is pretty large & I'm not terribly familiar w/ MFC & XTP.
Is there a way to have the dialog window layout adjust to make room for the command bars? (This seems to get handled fine in the samples code based on FrameWnd -- converting the app to a CXTPFrameWnd seems like a lot of trouble). Also, my CXTPCommandBars only contains 2 CXTPToolBar's -- no CXTPCommandBar's. I want to prevent the "standard" toolbar from being hidden. I was able to force this by making the toolbar visiable in OnSize(). Is there a more elegant way to handle this? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please check how Samples\CommandBars\DialogSample sample works.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
notacow
Newbie Joined: 16 January 2011 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks. I looked through the sample & tried a few things.
In this sample RepositionControls() calls Offset(), which depends on SetResize() being called for all the dialog windows. This application has dozens of windows (most of which are static in size). Is there a quick way to add all the app child windows? Another thought that occurred to me was to group the dozens of controls into a "sub-window" but I don't see a way to do that in the dialog designer. |
|
notacow
Newbie Joined: 16 January 2011 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Answer (for adding all child windows):
for (CWnd *currWin = GetWindow(GW_CHILD); currWin != 0; currWin = currWin->GetWindow(GW_HWNDNEXT)) { SetResize (currWin->GetDlgCtrlID(), 0.0, 0.0, 0.0, 0.0); } |
|
BastianPL
Groupie Joined: 15 April 2006 Status: Offline Points: 69 |
Post Options
Thanks(0)
|
Hello,
Did anyone managed to solve problem with toolbar in dialog. My dialog is not resizable, and I want to display toolbar in specific position in a dialog (this will be used as a toolbar for rich edit control) Any examples will be much appreciated. Seb
|
|
Bastian
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |