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. making a modelessdialog box as modal

making a modelessdialog box as modal

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

    Hi, I have an MDI application.I create an a Modeless dialog on a menu click.I would like to make it behave like a Modal dialog box. How should I do that? Thanks Satya

    Today is a gift, that's why it is called the present.

    K L M K 4 Replies Last reply
    0
    • N narayanagvs

      Hi, I have an MDI application.I create an a Modeless dialog on a menu click.I would like to make it behave like a Modal dialog box. How should I do that? Thanks Satya

      Today is a gift, that's why it is called the present.

      K Offline
      K Offline
      KingsGambit
      wrote on last edited by
      #2

      You can try disabling the parent of the dialog by using EnableWindow(FALSE).

      N 1 Reply Last reply
      0
      • N narayanagvs

        Hi, I have an MDI application.I create an a Modeless dialog on a menu click.I would like to make it behave like a Modal dialog box. How should I do that? Thanks Satya

        Today is a gift, that's why it is called the present.

        L Offline
        L Offline
        LittleYellowBird
        wrote on last edited by
        #3

        This link explains all about modal dialog boxes:- http://msdn.microsoft.com/en-us/library/ms644996(VS.85).aspx#modal_box[^] :)

        Ali

        1 Reply Last reply
        0
        • N narayanagvs

          Hi, I have an MDI application.I create an a Modeless dialog on a menu click.I would like to make it behave like a Modal dialog box. How should I do that? Thanks Satya

          Today is a gift, that's why it is called the present.

          M Offline
          M Offline
          Mohan Ramachandra
          wrote on last edited by
          #4

          Just call DoModal [^] member function of the dialog in the, menu message handler.

          1 Reply Last reply
          0
          • K KingsGambit

            You can try disabling the parent of the dialog by using EnableWindow(FALSE).

            N Offline
            N Offline
            narayanagvs
            wrote on last edited by
            #5

            Hi, Thanks for the reply. But I also dont want my mainframe window to receive messages.I want the exact behaviour of DoModal. Thanks Satya

            Today is a gift, that's why it is called the present.

            L 1 Reply Last reply
            0
            • N narayanagvs

              Hi, Thanks for the reply. But I also dont want my mainframe window to receive messages.I want the exact behaviour of DoModal. Thanks Satya

              Today is a gift, that's why it is called the present.

              L Offline
              L Offline
              LittleYellowBird
              wrote on last edited by
              #6

              narayanagvs wrote:

              I want the exact behaviour of DoModal.

              Sorry, I don't understand. If you want 'the exact behaviour of DoModal' then why do you create a Modeless dialog? :confused: :)

              Ali

              N 1 Reply Last reply
              0
              • L LittleYellowBird

                narayanagvs wrote:

                I want the exact behaviour of DoModal.

                Sorry, I don't understand. If you want 'the exact behaviour of DoModal' then why do you create a Modeless dialog? :confused: :)

                Ali

                N Offline
                N Offline
                narayanagvs
                wrote on last edited by
                #7

                I just want to know. This is a question asked to me. Satya

                Today is a gift, that's why it is called the present.

                L 1 Reply Last reply
                0
                • N narayanagvs

                  I just want to know. This is a question asked to me. Satya

                  Today is a gift, that's why it is called the present.

                  L Offline
                  L Offline
                  LittleYellowBird
                  wrote on last edited by
                  #8

                  OK, thanks for answering, I don't think I can help you, I hope someone else can. :)

                  Ali

                  1 Reply Last reply
                  0
                  • N narayanagvs

                    Hi, I have an MDI application.I create an a Modeless dialog on a menu click.I would like to make it behave like a Modal dialog box. How should I do that? Thanks Satya

                    Today is a gift, that's why it is called the present.

                    K Offline
                    K Offline
                    KarstenK
                    wrote on last edited by
                    #9

                    Create another dialog class with the dialog resource of your dialog.

                    Press F1 for help or google it. Greetings from Germany

                    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