ActiveX control popping up a modal dialog
-
Hi! I have a strange problem: I want to pop-up a (modal) dialog from an ActiveX control which is a MDI child. I created the dialog and it pops up as regularly using
DoModal
. I can click around and use the dialog until I don't click the title bar e.g. in order to drag the dialog around. If I do so the dialog freezes the mouse input and I can only navigate through the dialog via keyboard. Using Spy++ I checked the message queue. When I click on the title bar aWM_SYSCOMMAND
(WPARAM: SC_MOVE) is sent and that's it. Message queue hangs. All I can do is navigating by keyboard or Alt+Tab away from and back to the dialog. Then I can use the mouse again. Surely without clicking on the title bar. I googled for the problem and saw that some people have the same problem but there is no real solution for it. Somebody proposed to surroundDoModal
withPreModalDialog/PostModalDialog
which didn't change anything. Is it possible that some ActiveX events are missing that need to be routed to the control? I'm out of ideas anyway... :( Thanks for your help. Regards, mykelIf they give you lined paper, write the other way!
-
Hi! I have a strange problem: I want to pop-up a (modal) dialog from an ActiveX control which is a MDI child. I created the dialog and it pops up as regularly using
DoModal
. I can click around and use the dialog until I don't click the title bar e.g. in order to drag the dialog around. If I do so the dialog freezes the mouse input and I can only navigate through the dialog via keyboard. Using Spy++ I checked the message queue. When I click on the title bar aWM_SYSCOMMAND
(WPARAM: SC_MOVE) is sent and that's it. Message queue hangs. All I can do is navigating by keyboard or Alt+Tab away from and back to the dialog. Then I can use the mouse again. Surely without clicking on the title bar. I googled for the problem and saw that some people have the same problem but there is no real solution for it. Somebody proposed to surroundDoModal
withPreModalDialog/PostModalDialog
which didn't change anything. Is it possible that some ActiveX events are missing that need to be routed to the control? I'm out of ideas anyway... :( Thanks for your help. Regards, mykelIf they give you lined paper, write the other way!
alright, found a solution: problem was that MSDN Q187988[^] was applied sometime before which swallowed all my precious messages using a Windows
WH_GETMESSAGE
hook. my quick and dirty solution is to disable the windows hook directly before opening the popup dialog and enable the hook again directly after the popup dialog is closed. everything works fine then and I can finally drag the dialog around... yipeeh! what a pain in the ...! :wtf: perhaps there is a smarter solution. if you know one I would be glad for a short post. regards, mykelIf they give you lined paper, write the other way!