Sign in to follow this  
Followers 0
Valik

SetFocus() when calling GuiSetCtrlData on Edit

5 posts in this topic

Jon (Or whomever wrote the code for GuiSetCtrlData()), why is there a call to SetFocus() when calling GuiSetCtrlData() on an edit control? This causes the window to steal focus if trying to click away while data is being added to an edit control. It only seems to do it on the first time, but it is extremely annoying to attempt to click away from a window thats being updated in real-time only to have that window grab focus back.

I've just commented that line out and rebuilt AutoIt and it fixes the problem and seemed not to have any after-effects. The call isn't necessary for EM_REPLACESEL to work correctly, even if the edit control doesn't have focus, the caret position is still where it was the last time focus was on that control. That's the only reason I can see for it being there.

Share this post


Link to post
Share on other sites



JP did that function I think.  Any problems removing that bit of code, JP?

<{POST_SNAPBACK}>

It was a very important line because it was introduce in my release birthday. But certainly to much champagne so it can be remove at least until my next birthday.

GO :)

Share this post


Link to post
Share on other sites

So Jon's not the only developer who drinks and codes.

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