Print Page | Close Window

Docked or not? What is the position?

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=2088
Printed Date: 08 July 2024 at 12:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Docked or not? What is the position?
Posted By: chrisjohnson
Subject: Docked or not? What is the position?
Date 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?



Replies:
Posted By: Oleg
Date Posted: 07 April 2005 at 1:16pm

See in MSDN RepositionBars function

nFlag must be CWnd::reposQuery   



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


Posted By: chrisjohnson
Date Posted: 07 April 2005 at 2:14pm
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



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