Print Page | Close Window

Unhiding/hiding toolbar docked to mainframe border

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=8778
Printed Date: 02 March 2025 at 3:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Unhiding/hiding toolbar docked to mainframe border
Posted By: Leslie2
Subject: Unhiding/hiding toolbar docked to mainframe border
Date Posted: 14 November 2007 at 4:58am

I'm currently programming MFC C++ using MS VS 2003/Xtreme ToolkitPro v11.2.0

Required
To set the scene, I'm trying to develop commandbar toolbars that dock to any edge of the MDI Main Frame.  These toolbars would normally be hidden until an event fires and unhides the toolbar docked to a 'main frame border'.  As an exercise I'm using the SmartLayout sample since it has lots of nice characteristics to start with.

The 'main frame border' in this context are the edges bordered by:
- Menubar client area

- Main frame border (left & right)
- Statusbar client area

Unhide toolbar
The initial trigger for siting which edge to dock the toolbar to is when the mouse cursor hovers over any of the following areas.
3 scenarios:
1.    mouse cursor contacts the menubar client area
2.    mouse cursor contacts the left or right frame border
3.    mouse cursor contacts the bottom status bar client area

It's intended that as soon as the event is fired, the hidden toolbar maximises and aligns docked to the border that triggered the event to fire ie. Scenario 1, 2 or 3.

Hide toolbar
The toolbar is to hide again once the mouse cursor leaves the client area of the toolbar.

Question:
Is CXTPMouseManager class used for this purpose? 
 
I can't find any examples of how to use this class.  Please help.
 
 
I tried to use the WM_NCHITTEST message in the Mainframe class but the message only raised when cursor was over the caption/titlebar client area. 
 
I also tried ON_MESSAGE(WM_XTP_CONTROLSELECTED, OnControlSelected) message map but this only fired when the cursor moved onto a commandbar control ie. menu item or toolbr button.  Could not find similar for when the cursor is anywhere on commandbar client.

 
 
Thanks in advance



Replies:
Posted By: Leslie2
Date Posted: 15 November 2007 at 6:18pm
Hi
Bottom line is that I would like to know when the mouse cursor is over any part of the commandbar client site and when the mouse cursor leaves the command bar client site.  This is irrespective of whether the cursor is on a commandbar control such as menu or toolbar or on any other part of the commandbar client site.
 
If I can see how this can be achieved I hope to work out any other issues.
 
Been looking for examples and looking through documentation but can't find anything.
 
 
It might be possible that XTP doesn't cater for this.  Help appreciated.


Posted By: Oleg
Date Posted: 16 November 2007 at 7:00am
Hello,
 
Unfortunatelly this functionality is not implemented :(


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


Posted By: Leslie2
Date Posted: 18 November 2007 at 3:46am
Hi Oleg
Thanks for replying.
 
I've noticed a number of places where certain control notifications have been implemented but none appear for the other parts of the commandbar client area.
 
Is there any consideration for raising a message that identifies which part of the commandbar the mouse cursor is on?  And whether the cursor has left the commandbar.
 
I've noticed for eg. that where WM_XTP_CONTROLSELECTED is raised in the implementation of "XTPCommandBar.h" there seems to be scope to raise a message that includes this detail (as well as point coordinates).  Here a HitTest is also used.
 
I'm a little surprised that an XTP message is not available to provide this info. eg. I want to know the user has moved the cursor over:
- menu item control <- provided by WM_XTP_CONTROLSELECTED
- menu client area (non menu item control)
- button control  <-provided by WM_XTP_CONTROLSELECTED
- toobar client area (non button control)
 
A programmer could then handle this message how they like.



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