I thought if I just replaced the ADD BUTTON statements below with ADD OPTION, I would get a similar response, but the dialog doesn't even show.
However, if I comment out the DIALOG END statements in the callback, then the dialog does show with the options, but of course clicking an option doesn't close the dialog. Can anyone see what I need to do to make the options respond like the buttons?
However, if I comment out the DIALOG END statements in the callback, then the dialog does show with the options, but of course clicking an option doesn't close the dialog. Can anyone see what I need to do to make the options respond like the buttons?
Code:
#COMPILE EXE #INCLUDE "win32api.inc" FUNCTION PBMAIN() LOCAL hDlg, n AS LONG DIALOG NEW 0,"Print Reminders",,, 190, 100, %WS_SYSMENU TO hDlg CONTROL ADD BUTTON, hDlg, 101, "Print number 1", 20, 10, 100, 25 CONTROL ADD BUTTON, hDlg, 102, "Print number 2", 20, 50, 100, 25 'CONTROL ADD OPTION, hDlg, 101, "Print number 1", 20, 10, 100, 25, %WS_GROUP 'CONTROL ADD OPTION, hDlg, 102, "Print number 2", 20, 50, 100, 25 DIALOG SHOW MODAL hDlg, CALL dialogProc TO n MSGBOX STR$(n) END FUNCTION CALLBACK FUNCTION dialogProc() SELECT CASE CBMSG CASE %WM_COMMAND IF CBCTLMSG = %BN_CLICKED THEN IF CBCTL = 101 THEN DIALOG END CBHNDL, 1 ELSEIF CBCTL = 102 THEN DIALOG END CBHNDL, 2 END IF END IF END SELECT END FUNCTION
Comment