比如我要控件有颜色或是它的形状.要定义函数吗?还是在那里添加代码?代码又是什么呢?

解决方案 »

  1.   

    网上搜CButtonST吧,一个Button的派生类,很强大.
      

  2.   

    CButton::DrawItem
    This method is called to draw an owner-drawn CButton object virtual void DrawItem( 
    LPDRAWITEMSTRUCT lpDrawItemStruct );
    lpDrawItemStruct 
    A long pointer to a DRAWITEMSTRUCT structure. The structure contains information about 
    the item to be drawn and the type of drawing required 
    主要是重载处理这个虚函数,来实现自己的控件外观。
      

  3.   

      可以写一个按钮自绘的程序,goole或www.vckbase.com里面都有
      

  4.   

    可以用界面包,BCG和XTP都不错,网上可搜索到,还带有源代码。
      

  5.   

    DrawItem吧,或者使用CButtonST 也可以 ,网上搜一下 N多
      

  6.   

    嗯,如果是急用就搜一个吧,如果是自己学习的话可以看看MSDN的WM_DRAWITEM