|
-
February 7th, 2007, 12:02 PM
#7
Re: TextOut question
 Originally Posted by vironic
I guess that means I need to do this in the WM_PAINT message switch case.
You got it.
Now the string is there when I minimize or cover the window and refocus on it. However, when I enter text into the edit control the text length isn't updated in real time. So while the window is in focus, if I enter text in the edit control, it doesn't update the "Text Length: " until I minimize and maximize again. I'm not sure what to do next....
Traditionally, this is done by forcing a paint, which is done by doing a InvalidateRect followed by UpdateWindow. These 2 calls will queue up a WM_PAINT message.
Or, as Boris K K says, you can have another child control of your main window( similar to the edit control you have ) of class STATIC and in the EN_UPDATE handler, do a GetDlgItem(id of static item) and then using that HWND, do a SetWindowText. This will cause the static to paint itself.
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
|