Sign in to follow this  
Followers 0
atomman

how to: not select all text in an edit control on click

4 posts in this topic

#1 ·  Posted (edited)

i'm using edit controls as sort of a mini notepad which probably isn't the best idea to begin with, but one "feature" of the edit controls that is causing me problems is the fact that all the contents becomes selected when you click on the control.

how can this be prevented in an elegant way? i'd rather not use controlclick().

Edited by atomman

Share this post


Link to post
Share on other sites



anyone?

i'm aware that _GUICtrlEdit_Create doesn't have this behavior, but then i'd need to deal with resizing it since it doesn't accept the dock parameters. What i'd rather do is disable the selecting in the built-in edit control when it's focused.

found these in EditConstants.au3, but i don't know what they do (seemed to do nothing when i played with them).

Global Const $EIMES_GETCOMPSTRATONCE = 0x1; If this flag is set, the edit control hooks the WM_IME_COMPOSITION message with fFlags set to GCS_RESULTSTR and returns the result string immediately
Global Const $EIMES_CANCELCOMPSTRINFOCUS = 0x2; If this flag is set, the edit control cancels the composition string when it receives the WM_SETFOCUS message.
Global Const $EIMES_COMPLETECOMPSTRKILLFOCUS = 0x4; If this flag is set, the edit control completes the composition string upon receiving the WM_KILLFOCUS message.

Share this post


Link to post
Share on other sites

Ah, i thought it was built-in behavior. Thanks for the explanation! That changes how i will deal with it.

Share this post


Link to post
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
Sign in to follow this  
Followers 0