摘要:
方法一:1、声明成员变量CBrush m_brush;2、在InitDialog中添加代码:?CBitmap bmp;bmp.LoadBitmap(IDB_BITMAP1); //IDB_BITMAP1是图片资源IDm_brush.CreatePatternBrush(&bmp);3、重载对话框的OnCtlColor,改最后的返回值:?1return(HBRUSH)m_brush;方法二:把下面这段代码加进OnPaint()里就行了?CPaintDC dc(this);CBitmap bitmap;bitmap.LoadBitmap(IDB_BITMAP1); //这个IDB_BITM 阅读全文