The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Trope on September 20, 2005, 06:43:59 PM

Title: how do i call a function when a checkbox is clicked?
Post by: Trope on September 20, 2005, 06:43:59 PM
my checkbox, IDC_CHECK1

how do I CALL myFunction when it is clicked, no matter what the checked state?

Thanks!





EDIT!

Never mind... got it. For newbies interested, this did it:

.if wParam == IDC_SOUND

CALL myFunction

.end if
Title: Re: how do i call a function when a checkbox is clicked?
Post by: MichaelW on September 20, 2005, 08:39:06 PM
Perhaps I do not understand something here, but wouldn't it be more straightforward to use the BN_CLICKED notification?

MSDN: Button Types and Styles (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttontypesandstyles.asp)

MSDN: BN_CLICKED Notification (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bn_clicked.asp)

Title: Re: how do i call a function when a checkbox is clicked?
Post by: Trope on September 20, 2005, 11:31:04 PM
you probably know better than me, man - I am new at this. I will check it out.

Hey while I have your attention, is there an easy way to disable controls (button, edit boxes)?

Thanks.
Title: Re: how do i call a function when a checkbox is clicked?
Post by: MichaelW on September 21, 2005, 04:30:28 AM
 MSDN: EnableWindow function (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/enablewindow.asp)