-
June 23rd, 2022, 05:05 AM
#1
WinAPI, Working with text
Hello,
I am somewhat new to both C++ and Win32 (also to this forum), Currently I am stuck with a program and don't know the approach to take.
I have a child window with text displayed. I would like to move the mouse to a section of text, hit the left key and highlight (select) some of the text. So far, I know about WM_LBUTTONDOWN and how to capture the window X & Y position. I have found some reference to DragDetect. How should the text be hilighted? Is the window erased and drawn each small movement? I suspect there is some API that just does most of the work (?)
I would appreciate some help with a general overview of how a passage of text is identified/highlighted using as few resources as possible.
Thank you
-Tom
-
June 23rd, 2022, 12:20 PM
#2
Re: WinAPI, Working with text
1. What type (class) of the "child window" are you using? For instance, if it is a STATIC control then it is impossible to select/highlight a text in it.
2. Yes, the window is erased and redrawn by movement.
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|