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. Threading

Threading

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 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.
  • R Offline
    R Offline
    ratprita
    wrote on last edited by
    #1

    I have 2 dialog boxes. One for writing into a file and other for reading from the file. I am using 2 threads. One WriteThread and one ReadThread. When i run the application , i am not able to access the 2 dialogs synchronously.When the second dialog is displayed, i am not able to access the first dialog. Means after displaying the second dialog, i have to close it to get the first dialog. Anyone know the solution?

    L B 2 Replies Last reply
    0
    • R ratprita

      I have 2 dialog boxes. One for writing into a file and other for reading from the file. I am using 2 threads. One WriteThread and one ReadThread. When i run the application , i am not able to access the 2 dialogs synchronously.When the second dialog is displayed, i am not able to access the first dialog. Means after displaying the second dialog, i have to close it to get the first dialog. Anyone know the solution?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      ratprita wrote:

      Anyone know the solution?

      You will probably need to use the ModeLess type of dialog. See the Dialog Boxes[^] reference on MSDN for details.

      R 1 Reply Last reply
      0
      • R ratprita

        I have 2 dialog boxes. One for writing into a file and other for reading from the file. I am using 2 threads. One WriteThread and one ReadThread. When i run the application , i am not able to access the 2 dialogs synchronously.When the second dialog is displayed, i am not able to access the first dialog. Means after displaying the second dialog, i have to close it to get the first dialog. Anyone know the solution?

        B Offline
        B Offline
        buf1024
        wrote on last edited by
        #3

        Declare the two dialog as the member variable of the invoking window, and pass the window to the dialog when constructing it. ==== Of course it's not the only solution.

        1 Reply Last reply
        0
        • L Lost User

          ratprita wrote:

          Anyone know the solution?

          You will probably need to use the ModeLess type of dialog. See the Dialog Boxes[^] reference on MSDN for details.

          R Offline
          R Offline
          ratprita
          wrote on last edited by
          #4

          I tried this. I have made the second dialog modeless. My requirement was that when i click on the button on the 1st dialog, 2nd dialog will be activated. Now after making the 2nd dialog modeless, i am getting the 2nd dialog on each click on the 1st dialog's button . ie, more than one dialog(2nd) is activated. What is the problem?

          L 1 Reply Last reply
          0
          • R ratprita

            I tried this. I have made the second dialog modeless. My requirement was that when i click on the button on the 1st dialog, 2nd dialog will be activated. Now after making the 2nd dialog modeless, i am getting the 2nd dialog on each click on the 1st dialog's button . ie, more than one dialog(2nd) is activated. What is the problem?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            ratprita wrote:

            What is the problem?

            I think the problem may be in the design of your application. Dialogs should be used as short lived windows, to give information to the user, or to get parameters or other information from the user. If you need to have two dialogs active at the same time than you are really heading for trouble. I would take a look at your design and think through what you are trying to achieve.

            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