What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Button_SetCheckState

Button_SetCheckState
Author: Message:
enoid
New Member
*


Posts: 6
Joined: May 2011
O.P. Button_SetCheckState
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 :@
05-26-2011 11:28 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Button_SetCheckState - by enoid on 05-26-2011 at 11:28 PM
RE: Button_SetCheckState - by matty on 05-27-2011 at 01:38 AM
RE: RE: Button_SetCheckState - by enoid on 05-27-2011 at 07:50 AM
RE: Button_SetCheckState - by Eljay on 05-27-2011 at 08:06 AM
RE: RE: Button_SetCheckState - by enoid on 05-27-2011 at 08:33 AM
RE: Button_SetCheckState - by Mnjul on 05-27-2011 at 08:47 AM
RE: RE: Button_SetCheckState - by enoid on 05-27-2011 at 11:31 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On