Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ActiveX control popping up a modal dialog

ActiveX control popping up a modal dialog

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomdata-structuresquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sps itsec46
    wrote on last edited by
    #1

    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 a WM_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 surround DoModal with PreModalDialog/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, mykel If they give you lined paper, write the other way!

    S 1 Reply Last reply
    0
    • S sps itsec46

      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 a WM_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 surround DoModal with PreModalDialog/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, mykel If they give you lined paper, write the other way!

      S Offline
      S Offline
      sps itsec46
      wrote on last edited by
      #2

      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, mykel If they give you lined paper, write the other way!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups