Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPDialog layout
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPDialog layout

 Post Reply Post Reply
Author
Message
notacow View Drop Down
Newbie
Newbie


Joined: 16 January 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote notacow Quote  Post ReplyReply Direct Link To This Post Topic: CXTPDialog layout
    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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2011 at 12:21pm
Hi,

Please check how Samples\CommandBars\DialogSample  sample works.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
notacow View Drop Down
Newbie
Newbie


Joined: 16 January 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote notacow Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
notacow View Drop Down
Newbie
Newbie


Joined: 16 January 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote notacow Quote  Post ReplyReply Direct Link To This Post 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);
  }

Back to Top
BastianPL View Drop Down
Groupie
Groupie
Avatar

Joined: 15 April 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote BastianPL Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.391 seconds.