Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I need help!!!F1!!! Pin
David Crow30-Jun-04 3:06
David Crow30-Jun-04 3:06 
GeneralRe: I need help!!!F1!!! Pin
Filomela7-Jul-04 21:45
Filomela7-Jul-04 21:45 
QuestionHow can I change bg color in SDI? Pin
johnny,Kim29-Jun-04 20:45
johnny,Kim29-Jun-04 20:45 
AnswerRe: How can I change bg color in SDI? Pin
Johan Rosengren29-Jun-04 21:09
Johan Rosengren29-Jun-04 21:09 
GeneralChange the text color of static control Pin
Anonymous29-Jun-04 20:16
Anonymous29-Jun-04 20:16 
GeneralRe: Change the text color of static control Pin
Johan Rosengren29-Jun-04 20:22
Johan Rosengren29-Jun-04 20:22 
GeneralRe: Change the text color of static control Pin
Anonymous29-Jun-04 20:36
Anonymous29-Jun-04 20:36 
GeneralRe: Change the text color of static control Pin
Johan Rosengren29-Jun-04 20:43
Johan Rosengren29-Jun-04 20:43 
Subclass anyway Smile | :)

You are supposed to subclass. You can have the coloring control in another dialog. You can move it to another project. Ok, you don't want to listen? Then, handle WM_CTLCOLORSTATIC in the dialog. Use SetTextColor on the CDC if the control ID equals the static control (you should change it from IDC_STATIC).

This is bad practice, couples the dialog to the static. You have to repeat the code for all dialog you build where you want coloring in the future. You have to add tests to the code if you add more coloring statics. Now you've been warned Smile | :)
GeneralProblem with Dll Pin
Member 115017629-Jun-04 19:26
Member 115017629-Jun-04 19:26 
GeneralRe: Problem with Dll Pin
RonnyS29-Jun-04 20:29
RonnyS29-Jun-04 20:29 
GeneralSingleton class Pin
Member 118395929-Jun-04 18:57
Member 118395929-Jun-04 18:57 
GeneralRe: Singleton class Pin
Member 115017629-Jun-04 19:32
Member 115017629-Jun-04 19:32 
GeneralRe: Singleton class Pin
Member 115017629-Jun-04 19:53
Member 115017629-Jun-04 19:53 
GeneralRe: Singleton class Pin
Member 118395929-Jun-04 20:02
Member 118395929-Jun-04 20:02 
GeneralRe: Singleton class Pin
Henry miller30-Jun-04 3:03
Henry miller30-Jun-04 3:03 
Generalrun 2 exe files at the same time Pin
vietdung29-Jun-04 18:56
vietdung29-Jun-04 18:56 
GeneralRe: run 2 exe files at the same time Pin
parths29-Jun-04 19:27
parths29-Jun-04 19:27 
GeneralRe: run 2 exe files at the same time Pin
yummi29-Jun-04 19:57
yummi29-Jun-04 19:57 
Generalchanging from debug to Release mode Pin
Anonymous29-Jun-04 18:40
Anonymous29-Jun-04 18:40 
GeneralRe: changing from debug to Release mode Pin
Ryan Binns29-Jun-04 18:57
Ryan Binns29-Jun-04 18:57 
GeneralSee this code.. Pin
johnny,Kim29-Jun-04 16:04
johnny,Kim29-Jun-04 16:04 
GeneralRe: See this code.. Pin
Christian Graus29-Jun-04 16:28
protectorChristian Graus29-Jun-04 16:28 
GeneralRe: See this code.. Pin
Ryan Binns29-Jun-04 18:25
Ryan Binns29-Jun-04 18:25 
GeneralRe: See this code.. Pin
johnny,Kim29-Jun-04 20:13
johnny,Kim29-Jun-04 20:13 
GeneralInitialization of a CWnd derived custom control Pin
kfaday29-Jun-04 15:38
kfaday29-Jun-04 15:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.