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 question

Modeless dialog box question

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

    I want to transform a modal dialog box into a modeless so I can drag and drop items from the interface in the main window (in a SDI application) into my dialog box. That bit, I can do - I allocate dynamically the dialog box and call CreateWindow. But I don't want the user to be able to click on the menu or the toolbar (or about anywhere actually except a treecontrol where the drag & drop will start from). Is this achievable without having to add code on every single menu handler? Thanks in adavance!

    S L 2 Replies Last reply
    0
    • B BadJerry

      I want to transform a modal dialog box into a modeless so I can drag and drop items from the interface in the main window (in a SDI application) into my dialog box. That bit, I can do - I allocate dynamically the dialog box and call CreateWindow. But I don't want the user to be able to click on the menu or the toolbar (or about anywhere actually except a treecontrol where the drag & drop will start from). Is this achievable without having to add code on every single menu handler? Thanks in adavance!

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      In general, you'd use ON_UPDATE_COMMAND_UI handlers to disable the menu commands and associated toolbar buttons. You could have a single handler method to deal with all the menu commands, but you'd have to declare them all in the appropriate message map.

      B 1 Reply Last reply
      0
      • B BadJerry

        I want to transform a modal dialog box into a modeless so I can drag and drop items from the interface in the main window (in a SDI application) into my dialog box. That bit, I can do - I allocate dynamically the dialog box and call CreateWindow. But I don't want the user to be able to click on the menu or the toolbar (or about anywhere actually except a treecontrol where the drag & drop will start from). Is this achievable without having to add code on every single menu handler? Thanks in adavance!

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Sounds like a user interface that would cause me to close and uninstall that software. Perhaps you should consider a different design?

        B 1 Reply Last reply
        0
        • S Stuart Dootson

          In general, you'd use ON_UPDATE_COMMAND_UI handlers to disable the menu commands and associated toolbar buttons. You could have a single handler method to deal with all the menu commands, but you'd have to declare them all in the appropriate message map.

          B Offline
          B Offline
          BadJerry
          wrote on last edited by
          #4

          Hi Stuart, Thanks for this - but I do not want to have to write a handler / or modify existing handlers for every single of them!

          S 2 Replies Last reply
          0
          • L led mike

            Sounds like a user interface that would cause me to close and uninstall that software. Perhaps you should consider a different design?

            B Offline
            B Offline
            BadJerry
            wrote on last edited by
            #5

            Thanks for your helpful remark

            1 Reply Last reply
            0
            • B BadJerry

              Hi Stuart, Thanks for this - but I do not want to have to write a handler / or modify existing handlers for every single of them!

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              You don't have to - write one method to handle the ON_UPDATE_COMMAND_UI thing, then register that one (ONE) method for all the ON_UPDATE_COMMAND_UI things you need to handle.

              Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

              1 Reply Last reply
              0
              • B BadJerry

                Hi Stuart, Thanks for this - but I do not want to have to write a handler / or modify existing handlers for every single of them!

                S Offline
                S Offline
                Stuart Dootson
                wrote on last edited by
                #7

                Oh - and you can use ON_UPDATE_COMMAND_UI_RANGE[^] to register one handler for multiple command IDs in one go.

                Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                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