News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Enabling/Disabling controls during run time

Started by K_F, March 20, 2013, 06:19:47 PM

Previous topic - Next topic

K_F

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
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

ragdog


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


FALSE =Disable
TRUE  = Enable

rsala

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.
EC coder

K_F

'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'