Hi,
I have created a dialog with a caption and two buttons. This works fine. However I would like to change the way this dialog looks based on a variable. As an example I would like to change the caption and also add or remove one or more buttons. How can I do this? I tried googling around but could not find any answer. Thank you for your time.
Changing dialog properties Topic is solved
Changing dialog properties
Kamesh
Does the variable change while the Dialog is active?
If you are just looking at the variable when the dialog is created, just put some conditional code in Create_GUI_controls(). If the variable changes as a result of actions in the dialog, just delete or new the appropriate buttons in the Onwhatever() handler. Changing how it looks can be accomplished by overriding OnPaint() and invalidating the rectangle (MSVC term, I forget the wxWidgets term). If the variable is external and you want changes to it to be detected... Maybe a timer that checks the variable and acts accordingly?
Please specify the use of the variable in a little more detail.
If you are just looking at the variable when the dialog is created, just put some conditional code in Create_GUI_controls(). If the variable changes as a result of actions in the dialog, just delete or new the appropriate buttons in the Onwhatever() handler. Changing how it looks can be accomplished by overriding OnPaint() and invalidating the rectangle (MSVC term, I forget the wxWidgets term). If the variable is external and you want changes to it to be detected... Maybe a timer that checks the variable and acts accordingly?
Please specify the use of the variable in a little more detail.