![]() |
TrackPopupMenu on secondary UI thread |
Post Reply ![]() |
Author | |
qliklars ![]() Newbie ![]() Joined: 23 July 2008 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() 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?
|
|
![]() |
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 |