Print Page | Close Window

Deactivating a minitoolbar

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=13574
Printed Date: 06 October 2024 at 5:17am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Deactivating a minitoolbar
Posted By: DavidH
Subject: Deactivating a minitoolbar
Date Posted: 04 March 2009 at 9:03am
Hello there!

In my application I use different minitoolbars that should appear depending on what is underneath the mouse.
I'm looking for a way to deactivate the old minitoolbar once the mouse hovers a new screen object. There should always be at most one visible minitoolbar.

For the minitoolbar that should disappear I've tried to set: 
m_bActivated = FALSE;
m_bTracking = FALSE;

but this keeps it visible.

Is there a way to instantly switch it off and make sure it does not come back until I call "TrackMiniBar" again?

David.




Replies:
Posted By: Oleg
Date Posted: 05 March 2009 at 7:43am
Hi,
 
try m_bTracking = FALSE; + manually hide it with ShowWindow(SW_HIDE);


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


Posted By: DavidH
Date Posted: 05 March 2009 at 9:56am
Thanks Oleg.

I had to change the approach a bit anyway, because when you have more than one minitoolbar, their PumpMessage loops bring all sorts of new trouble.

I now have just one minitoolbar with all the possible controls, and, depending on what it needs to do, I switch controls on and off by calling their SetVisible method.

It's still tricky enough, as I call the 'TrackMiniBar' method in my 'OnMouseMove' handler in the AppView. As each call to TrackMiniBar initiates its own PumpMessage loop, which starts to handle ON_WM_MOUSEMOVE messages, I should be very careful not to call TrackMiniBar again in the 'OnMouseMove' handler, as it would cause an infinite recursion.

Anyway, I still needed a way to make the minitoolbar invisible, and your tip seems to work fine so far.

David.



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