Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - TrackPopupMenu on secondary UI thread
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TrackPopupMenu on secondary UI thread

 Post Reply Post Reply
Author
Message
qliklars View Drop Down
Newbie
Newbie


Joined: 23 July 2008
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote qliklars Quote  Post ReplyReply Direct Link To This Post Topic: TrackPopupMenu on secondary UI thread
    Posted: 23 July 2008 at 10:02am
We use MFC Commandbars (v11.2) in our application and in addition to building an "ordinary" application (EXE-file) we also build an ActiveX control (OCX-file).
 
In order to meet several requirements on the OCX, the UI is run on a different thread from the main thread in the application hosting the OCX.
 
We have noticed that TrackPopupMenu behaves strangely in this scenario.
If you bring it up, but click outside the menu (and outside the OCX) but inside the host application, the menu will not close.
 
I noticed that a MouseManager is used and that the MouseManager installs a mouse hook. The mouse hook is installed on the thread that runs the OCX UI, which means that it will not detect mouse messages sent to the main application and the menu will not be closed.
 
Is there a controlled way to solve this problem?
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.203 seconds.