cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
marketware
Level 6

How to access custom control value

I have added a custom Checkbox Control to the SQLServerSelect dialog and would like to access its value in my installscript. Can someone please help me to know how to use this function correctly (or another function), etc. so I can use to access it's value? I've tried the following function (CtrlGetState) but It doesn't seem to work as expected, or I'm probably doing it wrong.

I'm probably coding it wrong. Can someone please give me guidance. THANKS!!!!!!!!



I've tried the following, but I'm not getting it right (or its the wrong function)

NUMBER nState, nResult;
STRING szIfEncrypt,szMsg,szServer;

//Control Identifier
#define ENCRYPTCHECKBOX 17818

////////////////////////////////////////
//Display dialog

Dlg_SQLServerSelect:

szMsg = "";
szServer = MW_SERVERNAME;

SQLRTInitialize2();

nResult = SQLServerSelect( szMsg, szServer );

/////////////////////////////////////////
//Here it is

nState = CtrlGetState("DialogId_10110", ENCRYPTCHECKBOX);

//The (name) of the checkbox is CheckBox1, its Control Identifier is 17818.
//The Dialog name seems to be DialogId_10110 and it's Resourse Identifier is 10110. I've also tried "SQLServerSelect" with the same results.


if (nState = BUTTON_CHECKED) then
MessageBox( "button checked", 0 );
szIfEncrypt = "true";

endif;
Labels (1)
0 Kudos
(1) Reply
Roman1
Level 9

0 Kudos