I was playing with this option control sample app. To my surprise, when I compile and run the app, the MsgBox pops up - without me clicking on the option control.
Not only that, but the app windows closes down but the app is still running and I have to use Ctl-Alt-Del to remove the app.
Is this normal? I assumed some events take place on startup, but not the %BN_CLICK.
This same code, using a checkbox or check3state instead of an option, does not automatically pop up the MsgBox.
Not only that, but the app windows closes down but the app is still running and I have to use Ctl-Alt-Del to remove the app.
Is this normal? I assumed some events take place on startup, but not the %BN_CLICK.
This same code, using a checkbox or check3state instead of an option, does not automatically pop up the MsgBox.
Code:
#Compile Exe Global hDlg As Dword Function PBMain() As Long Dialog New Pixels, 0, "Option Test",300,300,200,200, _ %WS_OverlappedWindow, 0 To hDlg Control Add Option, hDlg, 100,"Click Me!", 50,50,100,20 Dialog Show Modal hDlg Call DlgProc To Result& End Function CallBack Function DlgProc() As Long If Cb.Msg = %WM_Command And Cb.Ctl = 100 And Cb.CtlMsg = %BN_Clicked Then MsgBox "Clicked!" Dialog End hDlg End If End Function
Comment