Jump to content

SetFocus() when calling GuiSetCtrlData on Edit


Valik
 Share

Recommended Posts

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.

Link to comment
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 :)

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...