r_z_aret@pen_fact.com wrote:
>On Wed, 28 Dec 2011 12:29:23 +0200, John Smith
><
do_no...@invalid.address.com> wrote:
>
>>I have a simple non-modal windows with a couple of Edit controls and a few button
>>controls. The edit controls are subclassed.
>>
>>When I press a button in the window another similar window with Edit & button
>>controls pops up. When I close that window I send a WM_USER -message to my first
>>windows' edit control with SetFocus(myedit_control_hwnd):
>>
>>case WM_USER:
>> SetFocus(myedit_control_hwnd);
>>
>>The problem is that no blinking caret is visible in the Edit control after I have
>>closed the second window. Focus is on the Edit control (I can type there). If I
>>click the Edit no caret comes up. If I click another windows and then the edit I
>>get the caret in the edit control.
>
>It might be related to timing, so you may need to make sure the window
>that is closing is closed before you call SetFocus.
>
>My code for edit/text boxes calls SetFocus in response to WM_SETFOCUS
>messages. I haven't worked with, or looked at, this code for a while
>and it looks odd now. But I assure you it was well tested.