MFC——单文档SDI背景颜色设为黑色的3种方法重载OnEraseBkgndBOOLCTank1View::OnEraseBkgnd(CDC*pDC){//TODO:Addyourmessagehandlercodehereand/orcalldefaultCBrushbrush(RGB(0,0,0));CBrush*pOldOne=pDC->SelectObject(brush);CRectrc;pDC->GetClipBox(rc);pDC->PatBlt(rc.left,rc.top,rc.Width(),rc.Height(),PATCOPY);pDC->SelectObject(pOldOne);returnTRUE;}也可以BOOLCTank1View::PreCreateWindow(CREATESTRUCTcs){//TOD...