Modal Dialogs
-
I have created a custom control which, upon a mouse click, should display a dialog showing some info about what was clicked. I need this dialog to have a semi-modal style. IE I want the user to be able to click the custom control and have the dialog update it's display, but not allow the user to click outside of the control unless the dialog is first closed. How could I achieve this?
Waldermort
-
I have created a custom control which, upon a mouse click, should display a dialog showing some info about what was clicked. I need this dialog to have a semi-modal style. IE I want the user to be able to click the custom control and have the dialog update it's display, but not allow the user to click outside of the control unless the dialog is first closed. How could I achieve this?
Waldermort
-
If you are creating the window modeless using Create and disabling all the controls except the special controls, I think it is possible... Or could you please explain a little more?
- NS -
Disabling controls of the parent window from within a child window is a little too complicated. I had an idea though, since my control displays a dialog on a mouse click, this means it must have the keyboard focus. I could display a modeless dialog and destroy it whenever a WM_KILLFOCUS is processed.
Waldermort
-
Disabling controls of the parent window from within a child window is a little too complicated. I had an idea though, since my control displays a dialog on a mouse click, this means it must have the keyboard focus. I could display a modeless dialog and destroy it whenever a WM_KILLFOCUS is processed.
Waldermort
-
:) That's nice. But what if the user clicks in another application and again come to yours?
- NS -
Then they would have to click in my custom control again. I could do a comparison of the new window against the main application and it's children, but the first method is easiest to implement at this stage. We will see how it pans out.
Waldermort
-
:) That's nice. But what if the user clicks in another application and again come to yours?
- NS -
Well today I finaly get around to adding the code for the dialog and was hit with something quite unexpected. Setting the parent member of CreateDialogParam() to my custom control, gives me exactly what I wanted. The main window is effectivly unclickable, while the control, dialog and all other applications remain unaffected. Finally, MS got something right.
Waldermort