![]() |
Docked or not? What is the position? |
Post Reply ![]() |
Author | |
chrisjohnson ![]() Newbie ![]() Joined: 28 March 2005 Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() Posted: 07 April 2005 at 3:34am |
I have an MDI child window (CXTPFrameWndBase<CMDIChildWnd>) with
a toolbar on it. This child window also hosts a splitter window
(CXTSplitterWnd member created using CreateStatic in OnCreateClient). I
want the toolbar to be able to be docked on any side of the MDI window.
It is also possible that I will have multiple toolbars which could be
docked (or floating) anywhere.
I have overridden the OnSize method for the child window, so that I can call "MoveWindow" on the splitter window member, so that it is resized properly. Unfortunately, I am having trouble determining the new window position because of the toolbars. (Note: In all of the demo applications (that I could see) that do something similar, there is only one toolbar, and it is assumed that it is docked at the top.) GetClientRect returns a rect that includes the toolbars, so now I have to trim down that rect with toolbar rects (which also means deriving from CXTPCommandBar to access the private m_barPosition member). Is there an easier way to do this? Am I doing something wrong? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
See in MSDN RepositionBars function nFlag must be CWnd::reposQuery Edited by oleg |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
chrisjohnson ![]() Newbie ![]() Joined: 28 March 2005 Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Thanks.
Actually as I was doing the work to use what you suggested, I noticed that I no longer need to call MoveWindow on the splitter... I don't know what changed, but everything works fine without that call now. Chris |
|
![]() |
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 |