What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] EditControls... but how can I control them?

[?] EditControls... but how can I control them?
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
O.P. [?] EditControls... but how can I control them?
So far, I was able to do everything I needed with just the PlusWnd::GetControlText and PlusWnd::SetControlText functions. But now I'm quite stuck. I want to change the position of the cursor in an EditControl, and set a selection. According to MSDN, it has to be possible, but those messages don't seem to have effect on them:
code:
var EM_SETSEL = 0xB1;
var pos = 2;
PlusWnd.SendControlMessage(PlusWnd.GetControlHandle("EdtExp"), EM_SETSEL, pos, pos+1);
should do it, but it doesn't. :(

Any ideas? :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
12-02-2006 03:39 PM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [?] EditControls... but how can I control them?
umm youre using SendControlMessage wrong :P

first parameter should be the control id (in this case "EdtExp") not a hwnd ;)
12-02-2006 04:07 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
O.P. RE: [?] EditControls... but how can I control them?
DOOH! :P

Stupid me looking at the MSDN page and thinking it needs a control handler while Plus! does that. 8-)

Many thanks!!! :D
Okay, new question: I have some buttons which change the text in my edit control and now I want to give the edit control focus after the button is clicked so the user can type in it. Any ideas how I can do that?
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
12-02-2006 05:14 PM
Profile E-Mail PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: [?] EditControls... but how can I control them?
Use the SetFocus Windows API . This time you'll need GetControlHandle :p

code:
Interop.Call("user32.dll","SetFocus",PlusWnd.GetControlHandle("EdtExp"));

12-03-2006 02:24 PM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
O.P. RE: [?] EditControls... but how can I control them?
Okay, thanks! :D
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
12-03-2006 02:47 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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