和普通视图上绘制BMP差不多
DC可以 CDC *pDC = this->GetDC()

解决方案 »

  1.   

    我试了下楼上的方法,不行啊。是不是我dialog和标签页关联的有问题
      

  2.   

    标签的使用方法:
    http://www.diybl.com/course/3_program/vc/vc_js/20071226/93505.html
    加图方法
    先载入一张图片,ID为IDB_BITMAP1 在TestDlg.h中 CBrush m_brBk;//在public中定义 TestDlg.cpp中 在初始化函数OnInitDialog()中加入: BOOL CTestDlg::OnInitDialog() {  CDialog::OnInitDialog(); CBitmap bmp; bmp.LoadBitmap(IDB_BITMAP1); m_brBk.CreatePatternBrush(&bmp); bmp.DeleteObject(); 
    return TRUE;  // return TRUE  unless you set the focus to a control } 
    在打开类向导,找到WM_CTLCOLOR消息,重载得对应函数OnCtlColor(),添加如下: HBRUSH  CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { 
    HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); 
    if (pWnd == this) { 
        return m_brBk; 

      return hbr; }