Radion button notification

Discussions related to mouse, keyboard, fonts and Graphical User Interface
KenDown
Posts: 260
Joined: Wed 04 Apr 2018, 06:36

Radion button notification

Post by KenDown »

I have a dialog box which incorporates a check box. When checked two radio buttons are enabled.

When I click on the check box a notification is sent to the program, which is how I am able to enable or disable the radio buttons. When I click on a radio button, no notification is sent to the program. (The radio buttons change status, as they should, but I want to know when one has been clicked on rather than having to click on something else and then check to see which button is "live".)

I have tried creating my own dlgitem using the utility in the Examples and setting the BS_NOTIFY flag, but it makes no difference.

Code: Select all

PROC_dlgitem(bibledlg%,"Vertical split",  163,268,50,50,10,&50014009,&80)
PROC_dlgitem(bibledlg%,"Horizontal split",164,268,59,58,10,&50014009,&80)
Does anyone have any ideas or am I asking the impossible?

DDRM
Posts: 396
Joined: Mon 02 Apr 2018, 18:04

Re: Radion button notification

Post by DDRM »

I guess you are already using *SYS 1 to get notifications from the checkbox, and you still aren't getting notifications from the radio button?

D

KenDown
Posts: 260
Joined: Wed 04 Apr 2018, 06:36

Re: Radion button notification

Post by KenDown »

That is correct.

Code: Select all

      PROCinit
      *SYS 1

      ON CLOSE PROCquit:QUIT
      ON ERROR PROCwarn(REPORT$):PROCquit:STOP

      click%=0
      ON SYS click%=FNsys(@msg%,@wparam%,@lparam%):RETURN

      REPEAT
        pause%=INKEY(1)
        CASEclick%OF
          WHEN162:REM Check box
          WHEN163:VDU7
        ENDCASE
      UNTIL!dlg%=0
      PROCquit
      END
163 is the number of the radio button (well, one of them) and VDU7 never sounds. 162, however, does what it is supposed to do when the check box is clicked on.

DDRM
Posts: 396
Joined: Mon 02 Apr 2018, 18:04

Re: Radion button notification

Post by DDRM »

Could you post some minimal (non!) working code? i.e. including a small dialog box and the sys handler routine?

KenDown
Posts: 260
Joined: Wed 04 Apr 2018, 06:36

Re: Radion button notification

Post by KenDown »

Hmmm. Now I am thoroughly bamboozled!

I prepared a pared down version of the program and just to demonstrate, included a WHEN126:VDU7 command to show that everything worked apart from the radio buttons - only to find that it didn't. Further investigation showed that it was the VDU7 which wasn't working and in fact clicking on the radio buttons *did* cause a notification. In fact, replacing VDU7 with SOUND made no difference - the program is mute, though if I include the VDU7 in the procedure invoked by clicking on the radio buttons, it gives the expected beep.

So, I repent in dust and ashes, but on the other hand, one mystery is replaced by another; why no beep?

Thanks to you and Richard for responding, however.