Dialog - Schriftfarbe ändern
- 
					
					
					
					
 Wie kann ich die Schriftfarbe von einem Textausgabefeld ändern? 
 Wäre sehr hilfreich [img]images/smiles/icon_confused.gif[/img]
 
- 
					
					
					
					
 Kann mir denn keiner helfen, ich verzweifl noch! images/smiles/icon_sad.gif images/smiles/icon_sad.gif images/smiles/icon_sad.gif 
 
- 
					
					
					
					
 Get nicht mit einem normalen Edit-Feld, sondern nur mit einem Richedit 
 
- 
					
					
					
					
 Hallo zusammen, das geht schon... Du mußt die Funktion OnCtlColor deiner Dlg- Klasse überschreiben. Gruß, Volle. 
 
- 
					
					
					
					
 Danke, aber wie mach ich das ? Hab noch nich so viel Erfahrung in solchen Sachen. images/smiles/icon_confused.gif 
 
- 
					
					
					
					
 HBRUSH CDeinDialogDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) //Funktion eingefügt für Listboxfarbe { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Attribute des Gerätekontexts hier ändern //färbe die Schrift der Listbox blau if (pWnd->GetDlgCtrlID()==IDC_AUSGABE){ pDC->SetTextColor(RGB(1,1,108)); } // TODO: Anderen Pinsel zurückgeben, falls Standard nicht verwendet werden soll return hbr; }
 
- 
					
					
					
					
 Danke schön, aber wann wird denn diese Funktion immer aufgerufen? 
 
- 
					
					
					
					
 Ein auszug aus der MSDN von CWnd::OnCtlColor: The framework calls this member function when a child control is about to be drawn. Most controls send this message to their parent (usually a dialog box) to prepare the pDC for drawing the control using the correct colors. Note This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function. 
 
- 
					
					
					
					
 Hi 
 für solche Sachen kann ich Codeguru nur empfehlen.
 
