I'm having a problem with the rewriting of my script. I'm trying to implement as much as possible into my DLL and so far everything works without a problem. There's only one thing that doesn't seem to work, period. I'm talking about Button_SetCheckState.
The Checkbox we're talking about...
xml code:
<Control xsi:type="CheckBoxControl" Id="ChkTest">
<Position Top="90" Width="300" Left="20"/>
<Caption>Try to enable me...</Caption>
</Control>
...and how we set it @ enabled in JScript:
jscript code:
var Wnd = MsgPlus.CreateWnd("Preferences.xml","FormConfig");
Wnd.SetControlText("LblTestString", "It worked!"); // It works!
Wnd.Button_SetCheckState("ChkTest", true); // It works too!
Everythings works. Now try to implement it in C++:
c++ code:
IDispatchPtr dispPlusWnd = pMsgPlus->CreateWnd("Preferences.xml", "FormConfig");
_IMPPlusWndPtr pPlusWnd;
acquireInterfacePtr(dispPlusWnd, pPlusWnd);
pPlusWnd->SetControlText("LblTestString", "It worked!"); // It works!
pPlusWnd->Button_SetCheckState("ChkTest", true); // It does NOT work :(
It does NOT work
The strange thing is, SetControlText works (just a simple StaticControl for testing purposes), so one would asume that Button_SetCheckState should work aswell (and yes, I've tried switching them around). I've been trying loads of things, using the VARIANT_BOOLs instead of the normal true/false, trying to use the 'raw' version, trying to get the value with Button_IsChecked too see if it was changed but not visible, checking if the WindowId is correct, and too much other things too write down here...
Anyone got an idea what it could be, because it has been driving me insane for the last two days