void DLGDeleteEnter::OnPaint()
{
CPaintDC dc(this); // device context for painting
CDC memdc;
memdc.CreateCompatibleDC(&dc);//创建兼容DC
CBitmap bkg;
if ( m_IsDeleteSign == TRUE )
{
bkg.LoadBitmap( IDB_BITMAP_SignDELETEDLG );//载入位图
}
if ( m_IsDeleteSign == FALSE )
{
bkg.LoadBitmap(IDB_BITMAP_MESSAGEDLGDELETE );//载入位图
}
BITMAP bkginfo;
bkg.GetBitmap(&bkginfo);//获取位图信息
memdc.SelectObject(&bkg);
RECT rect;
GetWindowRect(&rect);//获取对话框信息
dc.StretchBlt(0,0,rect.right-rect.left,rect.bottom-rect.top,&memdc,0,0,bkginfo.bmWidth,bkginfo.bmHeight,SRCCOPY);