Advertisement

Redrawing a Window

Started by March 15, 2000 03:03 PM
10 comments, last by King 24 years, 9 months ago
Well, if I finally get what you mean, to change the background color you can have something like :

DWORD bkcolor = 0x00FFFFFF;

as a global variable and then in the WM_KEYDOWN handler, for VK_TAB put

bkcolor = 0x00FFFFFF - bkcolor;

that will switch the background color from black to white each time you press tab, and if you want it to only change once just put

bkcolor = 0x00000000;

As far as text goes, I made two global LPCSTR''s (text1 and text2) equal to the two different text messages i wanted to display and then made one more LPCSTR called text which was what was displayed and in the VK_TAB handler i put

text = (text==text1)?text2:text1;

I really hope that is what you meant, and that it helps =)
Chris
Hey BraveZeus, thanks for all the help, this is what i meant exactly, thanks again.

- king171@hotmail.com
- http://www.cfxweb.net/mxf/

This topic is closed to new replies.

Advertisement