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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Modal dialog freeze on show

Modal dialog freeze on show

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++helpquestion
2 Posts 2 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.
  • G Offline
    G Offline
    Gian
    wrote on last edited by
    #1

    Hello, i need to show a modal CDialog called from a CFormView. This view has a .NET control in it than when double clicked raise a C++ event function in an helper class that try to open the modal dialog. My problem is that the dialog is shown but after that is freezed, i cant modifity data or move it. That strange thing is that putting a simple MessageBox in any position of the OnInitDialog function the dialog works perfectly. I've tried to remove all the controls in the dialog but no progress. If i open the dialog from a function in the View it has no problem. If i call the function from the control event function it doesnt works. So i've tried also to send a message to the view and open the dialog from there but it doesnt work. What kind of problem is this? Thank you

    C 1 Reply Last reply
    0
    • G Gian

      Hello, i need to show a modal CDialog called from a CFormView. This view has a .NET control in it than when double clicked raise a C++ event function in an helper class that try to open the modal dialog. My problem is that the dialog is shown but after that is freezed, i cant modifity data or move it. That strange thing is that putting a simple MessageBox in any position of the OnInitDialog function the dialog works perfectly. I've tried to remove all the controls in the dialog but no progress. If i open the dialog from a function in the View it has no problem. If i call the function from the control event function it doesnt works. So i've tried also to send a message to the view and open the dialog from there but it doesnt work. What kind of problem is this? Thank you

      C Offline
      C Offline
      CWinThread
      wrote on last edited by
      #2

      You mentioned you tried sending a message...did you try posting instead? e.g., in the double-click handler for your control, use PostMessage to post a message to your view class. In the PostMessage handler you can raise the C++ event function you mention.

      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