set dialog focus for next mouse event
Posted on 2004-09-03
I have an dialog that when I click on a static control (bitmap) it starts a timer that calculate the position of the mouse pointer (even when it is not over my dialog). Then I have a test in my timer func thats checks if mouse up has occured. When this occures I am killing the timer and getting the mouse coords.
The problem is, that in order for me to click in the staticControl again to start my timer, I first have to click somwhere in the dialog to set the focus to the window. I have tried to uses mouse_event() to simulate the click in the window, and I have tried to use SetFocus(). None of this seems to help.