请教大虾,MFC通过路径显示背景图片的问题,为什么图片一直没显示出来
void CPicSTestDlg::OnPaint()
{
HWND m_hWnd;//成员变量
RECT m_Rect;//成员变量
HDC m_hMemDC;//成员变量
PAINTSTRUCT ps;
HDC hDC;
HBITMAP m_hDDBitmap;
hDC=::BeginPaint(hWnd,&ps);
::GetClientRect(hWnd,&m_Rect);//获得宽高
m_hMemDC=CreateCompatibleDC(hDC);
m_hDDBitmap=(HBITMAP)::LoadImage(AfxGetInstanceHandle(),
"E:\\ProFile\\PicShowTest\\234.bmp", IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION|LR_LOADFROMFILE);
SelectObject(m_hMemDC,m_hDDBitmap);
BitBlt(hDC,m_Rect.left, m_Rect.top, m_Rect.right, m_Rect.bottom,
m_hMemDC, m_Rect.left, m_Rect.top,SRCPAINT);
::EndPaint(hWnd,&ps);
}