Software Development Network>> Visual C++>> How Can I Change The window color
Yes. Thank you ..Your Speech is right i should read more..But the problem was in The class and tructuresYou can use this if you want eiasnabhan@hotmail.comAnd Thank you ..I will be more specefic in the Future..
What library do you use ATL, MFC, plain Win32 Here are the links to the MSDN In the MFC you can use message refelection:http://msdn.microsoft.com/library/default.asp url=/library/en-us/vclib/html/_mfcnotes_tn062.aspIn the case of Win32 API you have to react on WM_CTLCOLOR... messages.i.e. http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/commctls/staticcontrols/staticcontrolreference/staticcontrolmessages/wm_ctlcolorstatic.asp frame=trueIf you have a common control like list view, or a tree control you can use custom draw (NM_CUSTOMDRAW)http://www.codeguru.com/Cpp/controls/listview/customdrawing/article.php/c4195/
Thank You Mr.Martin ...I see The links but I fall is some problems...First When i write (in MFC)the constructor ,Error appers..
--------------------Configuration: AL Shamr Test - Win32 Debug--------------------Compiling...AL Shamr TestDlg.cppF:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(327) : error C2653: 'CYellowEdit' : is not a class or namespace nameF:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(329) : error C2065: 'm_clrText' : undeclared identifierF:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(330) : error C2065: 'm_clrBkgnd' : undeclared identifierF:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(331) : error C2065: 'm_brBkgnd' : undeclared identifierF:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(331) : error C2228: left of '.CreateSolidBrush' must have class/struct/union typeF:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(332) : warning C4508: 'CYellowEdit' : function should return a value; 'void' return type assumedError executing cl.exe.
AL Shamr Test.exe - 5 error(s), 1 warning(s)
I Know it is a selly quastion ..Can you give me an Example
Whats why I donn't link from MSDN ^.^
How Can I Change The window color
Georgi Vajarov
Yes. Thank you ..Your Speech is right i should read more..
But the problem was in The class and tructures
You can use this if you want
eiasnabhan@hotmail.com
And Thank you ..I will be more specefic in the Future..
hageoyaji2008
What library do you use ATL, MFC, plain Win32

Here are the links to the MSDN
In the MFC you can use message refelection:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/vclib/html/_mfcnotes_tn062.asp
In the case of Win32 API you have to react on WM_CTLCOLOR... messages.
i.e. http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/commctls/staticcontrols/staticcontrolreference/staticcontrolmessages/wm_ctlcolorstatic.asp frame=true
If you have a common control like list view, or a tree control you can use custom draw (NM_CUSTOMDRAW)
http://www.codeguru.com/Cpp/controls/listview/customdrawing/article.php/c4195/
Maxim Dyachenko
Thank You Mr.Martin ...I see The links but I fall is some problems...
First When i write (in MFC)the constructor ,Error appers..
--------------------Configuration: AL Shamr Test - Win32 Debug--------------------
Compiling...
AL Shamr TestDlg.cpp
F:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(327) : error C2653: 'CYellowEdit' : is not a class or namespace name
F:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(329) : error C2065: 'm_clrText' : undeclared identifier
F:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(330) : error C2065: 'm_clrBkgnd' : undeclared identifier
F:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(331) : error C2065: 'm_brBkgnd' : undeclared identifier
F:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(331) : error C2228: left of '.CreateSolidBrush' must have class/struct/union type
F:\Learn Vb\C++\Exa\AL Shamr Test\AL Shamr TestDlg.cpp(332) : warning C4508: 'CYellowEdit' : function should return a value; 'void' return type assumed
Error executing cl.exe.
AL Shamr Test.exe - 5 error(s), 1 warning(s)
I Know it is a selly quastion ..Can you give me an Example
Whats why I donn't link from MSDN ^.^
Mike-T
You should read more about C++.
Is the email address in your profile correct I will send you a simple sample with CYellowEdit.
Did you follow the example step by step