Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Unhiding/hiding toolbar docked to mainframe border
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Unhiding/hiding toolbar docked to mainframe border

 Post Reply Post Reply
Author
Message
Leslie2 View Drop Down
Newbie
Newbie
Avatar

Joined: 31 October 2007
Location: Australia
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leslie2 Quote  Post ReplyReply Direct Link To This Post Topic: Unhiding/hiding toolbar docked to mainframe border
    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
Back to Top
Leslie2 View Drop Down
Newbie
Newbie
Avatar

Joined: 31 October 2007
Location: Australia
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leslie2 Quote  Post ReplyReply Direct Link To This Post 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.
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: 16 November 2007 at 7:00am
Hello,
 
Unfortunatelly this functionality is not implemented :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Leslie2 View Drop Down
Newbie
Newbie
Avatar

Joined: 31 October 2007
Location: Australia
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leslie2 Quote  Post ReplyReply Direct Link To This Post 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.
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.109 seconds.