Results 1 to 7 of 7

Thread: How dose windows know?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Posts
    175

    Talking

    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?
    Mass

  2. #2
    Guest
    Create a textbox and a command button and put this code in the command_click event:
    Code:
    If Text1.SelLength = 0 Then
    MsgBox "no text selected"
    Else
    MsgBox Text1.SelText
    End If
    In the Windows case, its something like:

    Code:
    If Text1.SelLength = 0 Then
    contextmnu.mnucopy.enabled = False 
    Else
    contextmnu.mnucopy.enabled = True
    End If

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    He's talking about getting selected text from an external application
    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.

  4. #4

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    don't you think he knows that already?= also still talking about external applications, youre missleading him.

    You have to go for 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.

  6. #6
    Guest
    Kedaman and Megatron, Mass asked: How does windows know? Not how do you use a context menu on an external application.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Posts
    175
    Dear Matthew
    Thanks but Ked is right, I want to know how to detect if a text is selected in an external application.
    It is probably my fault to posr the question the way I did.
    I asked how windows know in order to know myself, and I still want to know.
    Mass

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width