|
-
December 6th, 2004, 05:49 AM
#1
Changing Static Text at Runtime
In my program i have some info stored in a char... how can i have this show in my static text box?
thanks for your time
"Whoao, Amber is the Color of your Energy"
-
December 6th, 2004, 06:54 AM
#2
Re: Changing Static Text at Runtime
Post a 'WM_SETTEXT' message to the static control....
-
December 6th, 2004, 07:59 AM
#3
Re: Changing Static Text at Runtime
You can also use SetDlgItemText() if your control is on the dialog box .
-
December 6th, 2004, 08:04 AM
#4
Re: Changing Static Text at Runtime
Or you can use SetWindowText() which sends the message. Won't work in a dialog box or standard window as it will change the title box instead. But it works nice for buttons and static windows.
-
December 7th, 2004, 03:40 PM
#5
Re: Changing Static Text at Runtime
Remember to put these call in the WM_PAINT message in your winproc...
-face
-
December 9th, 2004, 03:49 PM
#6
Re: Changing Static Text at Runtime
 Originally Posted by ecaf
Remember to put these call in the WM_PAINT message in your winproc...
-face
I think your thinking of DrawText or TextOut. SetWindowText, SetDlgItemText or posting a WM_SETTEXT message should NOT be done in a WM_PAINT handler.
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
|