CYICON);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
CDC memdc;
CDC* pDC = GetDC();
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP1);
memdc.CreateCompatibleDC(pDC);
memdc.SelectObject(&bmp);
BITMAPINFO bInfo;
bmp.GetObject(sizeof(bInfo),&bInfo);
int bWidth = bInfo.bmiHeader.biWidth;
int bHeight = bInfo.bmiHeader.biHeight;
pDC->StretchBlt(0,0,rect.Width(),rect.Height(),&memdc,0,0,bWidth,bHeight,SRCCOPY);
pDC->SetTextColor(RGB(255,0,0));
CPoint center = rect.CenterPoint();
pDC->SelectObject(&m_font);
pDC->SetBkMode(TRANSPARENT);
pDC->TextOut(center.x-150,center.y-50,"欢迎使用明日医疗
软件");
bmp.DeleteObject();
ReleaseDC(&memdc);
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CMyDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}