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. Modeless Dialog Box hangs... [modified]

Modeless Dialog Box hangs... [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomsysadmin
6 Posts 3 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
    GauranG Shah
    wrote on last edited by
    #1

    Hi.. Previously I was using Modal dialog box with Thread, to continue one process and showing the dialog box continuously. But as I am getting problem with thread I need to use Modeless dialog Box. But when I replace the code of Modal Dialog box with Modeless Dialog Box. It hangs when redrawn. i.e. When it redrawns nothing displays in the dialog box. The Code I am using is as follows My application is such, that continuously check the data from the server and displys on the dialog.

    hDisOwnDlg=CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_DISOWN ), NULL, DisOwnDlgProc );
    ShowWindow(hDisOwnDlg,SW_SHOW);

    Please Help me. -- modified at 10:11 Thursday 1st November, 2007

    [ Screen Capture ][ Tool Tip ]

    H M 2 Replies Last reply
    0
    • G GauranG Shah

      Hi.. Previously I was using Modal dialog box with Thread, to continue one process and showing the dialog box continuously. But as I am getting problem with thread I need to use Modeless dialog Box. But when I replace the code of Modal Dialog box with Modeless Dialog Box. It hangs when redrawn. i.e. When it redrawns nothing displays in the dialog box. The Code I am using is as follows My application is such, that continuously check the data from the server and displys on the dialog.

      hDisOwnDlg=CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_DISOWN ), NULL, DisOwnDlgProc );
      ShowWindow(hDisOwnDlg,SW_SHOW);

      Please Help me. -- modified at 10:11 Thursday 1st November, 2007

      [ Screen Capture ][ Tool Tip ]

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Did you use of any function or event like WM_SIZE on your project? does your previous problem solve?

      G 1 Reply Last reply
      0
      • H Hamid Taebi

        Did you use of any function or event like WM_SIZE on your project? does your previous problem solve?

        G Offline
        G Offline
        GauranG Shah
        wrote on last edited by
        #3

        No i am not using WM_SIZE. and my previos problem hasn't been solved.

        [ Screen Capture ][ Tool Tip ]

        1 Reply Last reply
        0
        • G GauranG Shah

          Hi.. Previously I was using Modal dialog box with Thread, to continue one process and showing the dialog box continuously. But as I am getting problem with thread I need to use Modeless dialog Box. But when I replace the code of Modal Dialog box with Modeless Dialog Box. It hangs when redrawn. i.e. When it redrawns nothing displays in the dialog box. The Code I am using is as follows My application is such, that continuously check the data from the server and displys on the dialog.

          hDisOwnDlg=CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_DISOWN ), NULL, DisOwnDlgProc );
          ShowWindow(hDisOwnDlg,SW_SHOW);

          Please Help me. -- modified at 10:11 Thursday 1st November, 2007

          [ Screen Capture ][ Tool Tip ]

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          What thread are you creating the dialog on? What thread do you do the continuous checking on? Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          G 1 Reply Last reply
          0
          • M Mark Salsbery

            What thread are you creating the dialog on? What thread do you do the continuous checking on? Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            G Offline
            G Offline
            GauranG Shah
            wrote on last edited by
            #5

            I have function that retrives the data from Internet Server throught Socket after some interval and show it on the dialog box. Previously I was using Modal Dialog box, calling this function through thread before creating dialog and termination thread when Dialog Ends. But I think if I will use the Modeless Dialog box the above thing will be much easy. And So replaced the code of modal dialog box with Modeless Dialog box. But as I told earlier it gets blank when it redrawns.

            [ Screen Capture ][ Tool Tip ]

            M 1 Reply Last reply
            0
            • G GauranG Shah

              I have function that retrives the data from Internet Server throught Socket after some interval and show it on the dialog box. Previously I was using Modal Dialog box, calling this function through thread before creating dialog and termination thread when Dialog Ends. But I think if I will use the Modeless Dialog box the above thing will be much easy. And So replaced the code of modal dialog box with Modeless Dialog box. But as I told earlier it gets blank when it redrawns.

              [ Screen Capture ][ Tool Tip ]

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              Mark Salsbery wrote:

              What thread are you creating the dialog on? What thread do you do the continuous checking on?

              Well if you're doing processing on the same thread the modeless dialog was created on, then that can cause the dialog not to get its WM_PAINT messages (and any others). Mark

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              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