本帖最后由 oyljerry 于 2012-06-28 22:51:56 编辑

解决方案 »

  1.   

    应该在对话框的OnCtlColor等函数中调用SetDialogBkColor()
      

  2.   

    SetDialogBkColor在VC6是可以的。但是如果在VC7、8、9、10应该是不可以的,在VS2010我试过不可以。
    建议用别的方法,比如在OnPaint里边FillRect整个客户区就行了。
      

  3.   

    MSDN上已经说了This function is obsolete.
    To set the background color of the dialog box, you must handle WM_CTLCOLOR. This message changes the color of the specified dialog box only.