Jump to content

Any option for text selection highlight?


qwert
 Share

Recommended Posts

They are the most common text selection methods:  A double-click selects the current word ... and a triple-click selects the current line.
But some applications include the trailing character, which is usually the blank that follows the word.  This is Au3's default behavior for rich text.

I'd like to NOT select the trailing element, whatever it is.  On other applications that don't, I've seen no explanations of why or how.

Is this controlled by a setting at some level?  Or do the individual applications intercept the click action and process it locally?

Any help will be appreciated.

Selections.png.9053937dcd666bb89597c0156

Link to comment
Share on other sites

That's not controlled by autoit, or even richedit, it's controlled by your OS. I know some editors will allow just the selection of the single word, like Notepad++, Visual Studio, and SciTE, but I think they're intercepting the double click and selecting the word, not windows.

You can try registering the WM_LBUTTONDBLCLK message and control the highlighting, I don't know if you'll get the double click message before the selection or after. WM_NOTIFY might get the message that text is being selected in richedit.

Edited by InunoTaishou
Link to comment
Share on other sites

Thanks very much for those suggestions.

Indeed, it looks like WM_NOTIFY has a feature that could work.

Quote
EN_SELCHANGE

Notifies a rich edit control's parent window that the current selection has changed. A rich edit control sends this notification code in the form of a WM_NOTIFY message.

I have some homework to do regarding the structure(s) involved.  I'll try to track down some existing code as an example, but it certainly looks promising.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...