![]() |
Deactivating a minitoolbar |
Post Reply ![]() |
Author | |
DavidH ![]() Groupie ![]() Joined: 24 March 2007 Status: Offline Points: 60 |
![]() ![]() ![]() ![]() ![]() 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. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
try m_bTracking = FALSE; + manually hide it with ShowWindow(SW_HIDE);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
DavidH ![]() Groupie ![]() Joined: 24 March 2007 Status: Offline Points: 60 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
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 |