dialog box application

dialog box application

Hi,
How do I detect changes made in a selection of radio buttons before I click on the Ok button in a modal dialog box.I want to be able to make and detect the changes in the selection of radio buttons even before I click Ok.
If I use the dlgmodal option, the selected button is known only after I hit on the Ok button.I want to be able to keep track of changes made in the choice of a given set of radio buttons.Should I use the dlgmodeless option?If yes,how do I use the GetMessage function to get the selected radio buttons?
--rswy

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Write a callback for each radio button from the group. Note that it can be the same callback routine:

EXTERNAL OnRadioButton
...
j = DlgSetSub(Dlg,IDC_RADIO_X,OnRadioButton)
j = DlgSetSub(Dlg,IDC_RADIO_Y,OnRadioButton)
j = DlgSetSub(Dlg,IDC_RADIO_Z,OnRadioButton)
...
SUBROUTINE OnRadioButton(Dlg,ID,iEvent)
TYPE(DIALOG):: Dlg
INTEGER::      ID, iEvent
INCLUDE "Resource.fd"
SELECT CASE (ID)
CASE (IDC_RADIO_X)
   !Do this
CASE (IDC_RADIO_Y)
   !Do that
CASE (IDC_RADIO_Z)
   !Do something
END SELECT
END SUBROUTINE OnRadioButton
Jugoslav
www.xeffort.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today