是这样的,我想改变按钮的颜色,或者弄个图标作按钮,不知道有什么方法,而且还有个问题,如何能精确定义按钮的位置?比如我想让某个按钮在40,100,80,120,如何能作到,我用的是VC6.0,请告诉我在6.0中如何实现
这些功能.谢谢

解决方案 »

  1.   

    相应OnCtlColor消息,改变按钮背景色
    GetDlgItem(IDC_BUTTON!)->MoveWindow(40,100)
      

  2.   

    This method is called by the framework 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.afx_msg HBRUSH OnCtlColor(
    CDC* pDC,
    CWnd* pWnd,
    UINT nCtlColor );
      

  3.   

    自己写一个按钮类,重载OnCtlColor函数
      

  4.   

    先谢Gogogogogoogle(咕咕咕咕谷糕) 一声,不过MoveWindow只是实现了定位,那宽高怎么定呢?再帮一下谢了