What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] EditControl scroll bar

Pages: (2): « First [ 1 ] 2 » Last »
[Help] EditControl scroll bar
Author: Message:
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. [Help] EditControl scroll bar
Whenever I add a text to an edit box (it has a 10 line size, multiline and VScroll) the scroll bar focuses itself to the top of the box.. is there any way to force the bar down?

-Paril
05-01-2007 04:10 PM
Profile E-Mail PM Web Find Quote Report
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] EditControl scroll bar
I tried this as well, as taken from MSDN help and such:

Window1.SendControlMessage ("Test", EM_SCROLL, SB_PAGEDOWN);

But, it said EM_SCROLL and SB_PAGEDOWN are undefined...

-Paril
05-01-2007 06:36 PM
Profile E-Mail PM Web Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: [Help] EditControl scroll bar
Yes, you will need to define those in your JS. I suggest you to make them public (put them over all other code):
code:
var EM_SCROLL = 181;
var SB_PAGEDOWN = 3;

Those are defined in "windows.h", a C/C++ header file. I have given you the right values, so just enjoy it! :-)

To find windows messages out yourself, I suggest you to download the Platform SDK (if you don't already have it), and open "winuser.h" or "windows.h", and find the value you are looking for.

Also, make sure you send this message to the richedit/edit, not the whole PlusWnd.

Edit: windows.h is a C header file. :P

Edit2: In order to make this work, you will have to call like this:
code:
Window1.SendControlMessage("Test", EM_SCROLL, SB_PAGEDOWN, 0);
);

This post was edited on 05-01-2007 at 06:57 PM by vikke.
4 8 15 16 23 42
05-01-2007 06:54 PM
Profile E-Mail PM Find Quote Report
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] EditControl scroll bar
Oh, lawl, I see.

Yeah, I know, I work with C, I just didn't decide to go looking in my library files.. thanks.

EDIT: Perfect! Exactly what I needed.
While I'm here, is there a way to hide buttons from the script?

-Paril

This post was edited on 05-01-2007 at 07:00 PM by Paril.
05-01-2007 06:57 PM
Profile E-Mail PM Web Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: [Help] EditControl scroll bar
Please check Edit2 in my other post, which I just did add. It's rather important to get it to work. ;)
4 8 15 16 23 42
05-01-2007 06:58 PM
Profile E-Mail PM Find Quote Report
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] EditControl scroll bar
Yes, I figured that since MSDN told me to set it to zero either way. Read my edit above, please.

-Paril
05-01-2007 07:00 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] EditControl scroll bar
Use the ShowWindow API with SW_SHOW and SW_HIDE.
05-01-2007 07:24 PM
Profile E-Mail PM Find Quote Report
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] EditControl scroll bar
Not the whole window, I mean a single control.. unless that's what you mean?
Example please?

-Paril

This post was edited on 05-01-2007 at 07:26 PM by Paril.
05-01-2007 07:25 PM
Profile E-Mail PM Web Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [Help] EditControl scroll bar
Get the handle of the control and send the SW_HIDE message to the control instead of the window. That should work.
05-01-2007 09:53 PM
Profile E-Mail PM Find Quote Report
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] EditControl scroll bar
I still don't really understand how to 'send the message', I tried this:

Window1.SendControlMessage ("Btnid1", SW_HIDE, 0, 0);

but it did nothing.. I don't know the args, if any..

EDIT: Oh, wait, do you mean from a seperate C DLL?

EDIT TWO: I see now that ShowWindow is a JScript func.. but this doesn't work:

        var handle = Window.Handle;
       
        ShowWindow (handle, SW_HIDE);

I do have SW_HIDE defined and the Window as well...

-Paril

This post was edited on 05-01-2007 at 11:29 PM by Paril.
05-01-2007 11:16 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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