Modeless dialog box question
-
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!
-
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!
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. -
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!
-
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. -
Sounds like a user interface that would cause me to close and uninstall that software. Perhaps you should consider a different design?
-
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!
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
-
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!
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