Print Page | Close Window

CXTPDialog layout

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17787
Printed Date: 21 May 2024 at 3:59pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPDialog layout
Posted By: notacow
Subject: CXTPDialog layout
Date 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?



Replies:
Posted By: Oleg
Date Posted: 17 January 2011 at 12:21pm
Hi,

Please check how Samples\CommandBars\DialogSample  sample works.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: notacow
Date Posted: 18 January 2011 at 11:43am
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.
 


Posted By: notacow
Date Posted: 19 January 2011 at 5:52pm
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);
  }



Posted By: BastianPL
Date Posted: 11 March 2011 at 8:58am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net