The selPos and selEnd had actually referred to the precise character index of the selected text. Thanks.
programmingalholic
Posts
-
Edit Control Problem -
Edit Control Problemthe actual value of selPos and selEnd just represent as what they are, both contained int value that denoted character index. To hwndEdit, the return value of GetWindowTextLengthW just not false ( other values than 0 ).
-
Edit Control ProblemThat's 100% right !! It had to do with ES_NOHIDESEL style, I had succeeded tap into it. However, thanks to all members of this community that had posed attention to my problem. :-D
-
Edit Control ProblemThe selPos is the value denotes the first character's position of the selected text and the selEnd is the value denotes the end character's position of the selected text. Did any VS.Community users have the same experience like me?
-
Edit Control ProblemI want to select text in the Edit control and make it has visual effect that represents the highlight of selected text. But how does WM_SETSEL come? It was undefined in the edition of my Visual Studio. Any suggestion please??
-
Edit Control ProblemI've tried to omit the suffix letter and it still produced the same effect. Below is code that sends the EM_SETSEL message to the Edit control.
int selPos = (int)(pInitialFound - lpWStr1) + 1;
int selEnd = selPos + (lstrlenW(lpWStr0));
SendMessage(hwndEdit, EM_SETSEL, selPos, selEnd);Are there any suggestions to better correct that problem?
-
Edit Control ProblemI've used SendMessageW API to direct an EM_SETSEL message to a designated Edit control to make it locates the searched text entered from the another Edit control. Why it doesn't provide visual feedback to reflect its current state? I used Spy++ to detect the EM_SETSEL message and the message was correctly listed in the message window. Can anyone give suggestion? My current development tool is MSVS Community 2015, project type is Win32 that merely uses A.P.I.