Get marked text in an editor gadget

Just starting out? Need help? Post your questions and find answers here.
willib
User
User
Posts: 39
Joined: Mon Sep 15, 2003 7:04 pm
Location: Bielefeld

Get marked text in an editor gadget

Post by willib »

Hi all

I want to get the text that an user has marked in an editor gadget.

Does someone know how to begin. Maybe there is an easy way without
callback ( Windows should know because STRG C runs in PB, maybe API? )

My sys Win2000 SP3 PB3.8

best regards

Willi
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Take a look at the #EM_GETSEL message..

http://msdn.microsoft.com/library/defau ... ntrols.asp

I can post an example of how to use it in a bit if you need it
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
willib
User
User
Posts: 39
Joined: Mon Sep 15, 2003 7:04 pm
Location: Bielefeld

Post by willib »

thank you

let me try for a while to learn ....

Willi
willib
User
User
Posts: 39
Joined: Mon Sep 15, 2003 7:04 pm
Location: Bielefeld

Post by willib »

Hi

I found out that

SendMessage_(GadgetID(0), #EM_GETSELTEXT,0,*Buffer )
a2$ = PeekS(*Buffer)
Debug a2$

runs , but in the win32-SDK-file they wrote The calling application must ensure that the buffer is large enough to hold the selected text.
For me it's ok because I know the maximum but normal I think you should get the real length with EM_GETSEL....

To make it easier for all, can you please put your example here ?

Willi
Post Reply