|
-
Aug 23rd, 2001, 07:33 AM
#1
Thread Starter
New Member
How can I trigger the WM_CTLCOLORSTATIC message?
I am using WM_CTLCOLORSTATIC to change the color of a static control I have. The control is used as a color selector, so it changes color throughout the program. It says on MSDN that the WM_CTLCOLORxxxx is sent when the window is about to be drawn. Is there any way I can trigger this message. I have tried UpdateWindow(), but no luck. I currently have a method of triggering the message, but it involves
Code:
ShowWindow(hwnd, WM_HIDE);
ShowWindow(hwnd, WM_SHOW);
This produces an ugly flicker, especially on slower machines. Does anyone have any suggestions? Thanks.
-
Aug 23rd, 2001, 08:16 AM
#2
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 23rd, 2001, 10:20 AM
#3
Thread Starter
New Member
Thanks for the quick reply. I couldn't seem to get anything to happen, even with SendMessage(). Perhaps I don't understand what actually changes the color of a window. It seems that the message gets called quite frequently, but doesn't really do anything unless the window is being redrawn. It seems that UpdateWindow() should work...but it doesn't. Ultimately, all I want to do is change the color of a static control on the fly. Thanks.
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
|