The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: K_F on March 20, 2013, 06:19:47 PM

Title: Enabling/Disabling controls during run time
Post by: K_F on March 20, 2013, 06:19:47 PM
Hi Ramon
Playing with a combo box, but cannot see where to enable or disable it. There is no specific API for this so I'd imagine I'd have to set the enable property on the window handle.

Would this be the case, and is this handle the one you get from the GetWindowHandle proc ?

Thanks
Title: Re: Enabling/Disabling controls during run time
Post by: ragdog on March 20, 2013, 07:26:29 PM
Code: [Select]

invoke GetDlgItem,hWnd,IDC_CONTROL_ID
invoke EnableWindow,eax,FALSE

FALSE =Disable
TRUE  = Enable
Title: Re: Enabling/Disabling controls during run time
Post by: rsala on March 21, 2013, 06:03:50 AM
Hi K_F,

As radgog said, you have to use the EnableWindow API function. You can get the handle with the GetWindowItem EC method or with the GetDlgItem API function.
Title: Re: Enabling/Disabling controls during run time
Post by: K_F on March 22, 2013, 08:48:00 AM
Thanks guys..