from:
http://rwsk.snnu.edu.cn/?uid-156-action-vIEwspace-itemid-240先載入一張圖片,ID為IDB_BITMAP2
TestDlg.h中
CBrush m_brBk;//在public中定義
TestDlg.cpp中在初始化函數OnInitDialog()中加入:
BOOL CTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP2);
m_brBk.CreatePatternBrush(&bmp);
bmp.DeleteObject();
return TRUE; // return TRUE unless you set the focus to a control
}