Send EM_SETSEL message or use Edit_SetSel macro defined in windowsx.h.
orCode:SendMessage(hWndEdit, EM_SETSEL, (WPARAM)3, (LPARAM)3); SetFocus(hWndEdit);
Code:#include <windowsx.h> // ... Edit_SetSel(hWndEdit, 3, 3); SetFocus(hWndEdit);
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 10 of 10
Thread: Cursor Position in Edit ControlThreaded View
|
Click Here to Expand Forum to Full Width |