|
-
Jun 20th, 2000, 08:40 PM
#1
Thread Starter
Addicted Member
Hi
When you open say the Notepad with some text in it and rightclick on the texts a popup menue appears with the Copy section not enabled.
As soon as you select some text and you rightclick again
you see the copy section of the menu is enabled.
How dose windows know when the text is selected?
-
Jun 20th, 2000, 11:01 PM
#2
Frenzied Member
It Doesn't, Notepad knows, Notepad is essentially a big textbox, you can check if a textbox has any text selected with CBool(Text1.SelLength)
-
Jun 22nd, 2000, 04:59 AM
#3
Thread Starter
Addicted Member
Thanks Sam but Could you tell me more. I don't know
anything about CBool(Text1.SelLength)
-
Jun 22nd, 2000, 05:20 AM
#4
CBool will convert the statement to Boolean. Therefor, if SelLength = 0 then a False is returned (because False means 0) and if you do select and text, the length (SelLength) is greater than 0 so it returns True.
So if the Statement is True, then you enabled the Copy menu.
-
Jun 22nd, 2000, 05:49 AM
#5
Thread Starter
Addicted Member
Sorry But I need to be able to detect it from a vb application and while you are at it, could you please tell me how do I know (again from vb) if the mouse is clicked or
dblclicked in external applications
Thanks
-
Jun 22nd, 2000, 05:49 AM
#6
transcendental analytic
Here also, he's talking about selected text in foreign applications, go look at my subclassing sample
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|