对话框上,我想根据不同的分辨率,把图按比例显示,在XP下没问题,可是在me下,有一块没有刷新,请问为什么?
我通过下面的来实现的void CGuideDialog::OnPaint()
{
CPaintDC dc(this); CWnd* hwnd = GetDlgItem(IDC_GUIDE_STATIC_BITMAP);
CRect rect;
hwnd->GetWindowRect(&rect);
this->ScreenToClient(&rect);
BITMAP bm;
m_bitmap.GetObject(sizeof BITMAP, &bm); CDC* pDc = hwnd->GetDC(); CDC dcMemory;
  dcMemory.CreateCompatibleDC(pDc);
  CBitmap *pOldBitmap = dcMemory.SelectObject(&m_bitmap); hwnd->UpdateWindow();
pDc->SetStretchBltMode(COLORONCOLOR);
pDc->StretchBlt(rect.left, rect.top, rect.Width(), rect.Height(), &dcMemory, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
dcMemory.SelectObject(pOldBitmap);
dcMemory.DeleteDC();}