我最想做的是象网上一些高手说的那样,从CEdit派生自己的类.但我完全照着做了之后还没有实现,不知问题出在哪里,编译是没有问题,就是没看到效果.我是照这个帖子做的,但不成功,不知何故,请高人指点,谢谢!!!
原帖子:http://topic.csdn.net/t/20001101/18/37687.html

解决方案 »

  1.   

    CWinApp::SetDialogBkColor 
    void SetDialogBkColor( COLORREF clrCtlBk = RGB(192, 192, 192), COLORREF clrCtlText = RGB(0, 0, 0) );ParametersclrCtlBkThe dialog background color for the application.clrCtlTextThe dialog control color for the application.ResCall this member function from within the InitInstance member function to set the default background and text color for dialog boxes and message boxes within your application.ExampleBOOL CMyApp::InitInstance()
    {
       // Standard initialization   SetDialogBkColor();        // Set dialog background color to gray
       LoadStdProfileSettings();  // Load standard INI file options (including MRU)   // ...
    }CWinApp Overview |  Class Members |  Hierarchy Chart
      

  2.   

    谢谢syy64(太平洋)的支持,您这方法是对整个界面设置成了统一的颜色,我要的是能分别设置各个文本框的背景及文字的颜色,且不一样.假如一个界面上有二十个文本框,我要设置二十个文本中的文字及背景各不相同,且有时候我还要能动态改变,最好是写成一个类,再设置文字及背景的颜色,请高人继续指点,谢谢!!!
      

  3.   

    http://www.codeproject.com/editctrl/CReadOnlyEdit.asp
    在其他地方找到了解决办法,谢谢各位的支持,结贴!