How can I associate the editbox with the ratio button? (dynamically update editbox ratio button)
-
I have this dialog:
MYAPP DIALOG 10, 19, 158, 104 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ... BEGIN ... RADIOBUTTON "1&50%", IDD_Zoom150RB, 16, 10, 32, 10, WS_GROUP | WS_TABSTOP ... RADIOBUTTON " ", IDD_ZoomSpinRB, 62, 38, 12, 10, WS_TABSTOP EDITTEXT IDD_ZoomSpinEF, 76, 36, 36, 14, WS_GROUP ... END
The contents within IDD_ZoomSpinEF editbox, needs to update the IDD_ZoomSpinRB label. The editbox isn’t associated with the ratio button, thus when the ratio button is selected nothing is read. How can I associate the editbox with the ratio button?danginkgo
-
I have this dialog:
MYAPP DIALOG 10, 19, 158, 104 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU ... BEGIN ... RADIOBUTTON "1&50%", IDD_Zoom150RB, 16, 10, 32, 10, WS_GROUP | WS_TABSTOP ... RADIOBUTTON " ", IDD_ZoomSpinRB, 62, 38, 12, 10, WS_TABSTOP EDITTEXT IDD_ZoomSpinEF, 76, 36, 36, 14, WS_GROUP ... END
The contents within IDD_ZoomSpinEF editbox, needs to update the IDD_ZoomSpinRB label. The editbox isn’t associated with the ratio button, thus when the ratio button is selected nothing is read. How can I associate the editbox with the ratio button?danginkgo
danginkgo wrote:
How can I associate the editbox with the ratio button?
You can't "associate" them, and have it automatically work. What you can do is write a EN_CHANGE handler for the edit box, then use SetDlgItemText (ZoomSpinRB, ...) to set the text for the radio button. I'd be tempted to skip this step though - make the radio button text be blank, and just put the edit box where the radio text would have been. Then when they click on the custom option radio button, read the edit box and use that percentage for whatever you want it for. Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
-
danginkgo wrote:
How can I associate the editbox with the ratio button?
You can't "associate" them, and have it automatically work. What you can do is write a EN_CHANGE handler for the edit box, then use SetDlgItemText (ZoomSpinRB, ...) to set the text for the radio button. I'd be tempted to skip this step though - make the radio button text be blank, and just put the edit box where the radio text would have been. Then when they click on the custom option radio button, read the edit box and use that percentage for whatever you want it for. Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.