Archive: retrieving checkbox value ?


retrieving checkbox value ?
Hi,

I did a search here, but couldn't find anything to assist me.
I've created a custom form using nsDialogs, and everything is working well. The only thing is I don't understand how to retrieve the value of a CheckBox.

Funcion GetTrustedConnection
...
...
${NSD_CreateCheckbox} 75 160 100% 8u "Trusted Connection"
Pop $TRUSTEDCONNECTION
GetFunctionAddress $0 OnTrustedConnection
nsDialogs::OnClick /NOUNLOAD $TRUSTEDCONNECTION $0

nsDialogs::Show

FunctionEnd

Function OnTrustedConnection
${NSD_GetText} $TRUSTEDCONNECTION $0
${If} $0 == "1"
StrCpy $5 "Yes"
${Else}
StrCpy $5 "No"
${EndIf}
FunctionEnd

thank you,
Johnny


Send BM_GETSTATE to get the state of the checkbox.

SendMessage $TRUSTEDCONNECTION ${BM_GETSTATE} 0 0 $0
${If} $0 != 0
MessageBox MB_OK checked!
${EndIf}

thank you very much, greatly appreciated

Johnny