Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot change static control color

Status
Not open for further replies.

TonyGoacher

Programmer
Jan 21, 2001
2
US
Hi,I have a modeless dialog box with 64 small static text
boxes which I am using to simulate lamps.

The LED states are controlled from a C program , I have created a wrapper for the class and have a function
which sets the led status in a class member variable and invalidates the appropriate static text box.

I handle the color change in OnCtlColor.

However, the color does not change unless I move the dialog
off screen and bring it back on again.

I have tried using a raw Invalidate() and this works but causes the dialog to flicker annoyingly.

Does anyone have any suggestions??
Tony Goacher

 
Tony,

Did you try calling Invalidate() on the individual static control that has changed color?

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top