Getting control text

Just starting out? Need help? Post your questions and find answers here.
EvilByte
User
User
Posts: 13
Joined: Wed Dec 15, 2010 5:21 pm
Location: Greece

Getting control text

Post by EvilByte »

Hi
I want to get the text from a richedit control. I used Winspector to find the control ID which is 1153 but this does not work

Code: Select all

*Buffer.s = Space(1000)
SendMessage_(1153,#WM_GETTEXT,1000,*Buffer.s)
Debug *Buffer.s
Any ideas?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Getting control text

Post by ts-soft »

Have you test this: http://www.purebasic.fr/english/viewtop ... 00#p317000
(as include, userlib is outdated)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Getting control text

Post by netmaestro »

1153
This doesn't look like a hwnd to me, more like a CtrlID. You need the window handle to use SendMessage_()
BERESHEIT
EvilByte
User
User
Posts: 13
Joined: Wed Dec 15, 2010 5:21 pm
Location: Greece

Re: Getting control text

Post by EvilByte »

Tried ts-soft's AutoWin include and it works!
Thx for your time guys :D
Post Reply