附注:
1.改變標題欄圖標:基於對話框結構
插入ICON資源, 將對話框構造函數中加載圖標函數的標識改成插入資源標識就OK
或在CMainFram的OnCreate函數中添加如下語句 Doc/VIEw結構
this->SetIcon(AfxGetApp()->LoadIcon(IDI_ICON1),TRUE);
2.用位圖填充對話框:
OnPaint函數中添加如下代碼:
CDC * pdc = this ->GetDC();
CDC m_memdc;
m_memdc.CreateCompatibleDC(pdc);
CBitmap bitmap;
bitmap.LoadBitmap(IDB_MAIN22);
m_memdc.SelectObject(&bitmap);
pdc->BitBlt(0, 0, 800, 700, &m_memdc, 0, 0, SRCCOPY);
bitmap.DeleteObject();
pdc->DeleteDC();