Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - On Menu Visible?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

On Menu Visible?

 Post Reply Post Reply
Author
Message
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post Topic: On Menu Visible?
    Posted: 02 March 2008 at 8:24pm
What is the best way to find out from the client program when a popup menu on an XTPCommandBar becomes visible/active, and again when it becomes hidden? (i.e. when the user clicks on a menu to make it visible, and when the user clicks an item or clicks away to make the menu hidden)
 
I need to stop rendering something in the background when the menu is covering part of it.
 
Thanks.
Back to Top
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2008 at 9:22pm
BTW... I'm using GetClipBox from the window in the background to determine if it is partially or completely obscured (by a menu or anything else) during my painting.
 
I'm just checking to see if there is a better way.

Thanks!
Back to Top
robosport View Drop Down
Groupie
Groupie


Joined: 20 June 2005
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote robosport Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2008 at 9:46pm
The only problem with that technique (GetClipBox) is that it leaves menus painted on the background even when another sub menu might be selected.
 
So I'm back to asking if there is a way to know when a menu or submenu has become visible or hidden.
 
Thank you.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 03 March 2008 at 10:22am
Hi,
 
You can override CXTPCommandBars::OnTrackingModeChanged method and change if GetMouseManager()->IsTrackedLock() is TRUE.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.047 seconds.