在OnPaint()函数里面添加如下代码: CWnd* wnd = GetDesktopWindow(); CWindowDC cdc(wnd); int width = GetSystemMetrics(SM_CXSCREEN); int heigth = GetSystemMetrics(SM_CYSCREEN); CRect rect; GetClientRect(&rect); CDC memdc; memdc.CreateCompatibleDC(&cdc); btmp.CreateCompatibleBitmap(&cdc, width, heigth); memdc.SelectObject(&btmp); CClientDC dc(this); memdc.BitBlt(0,0, rect.Width(), rect.Height(), &cdc, 0, 0, SRCCOPY); dc.BitBlt(0,0, rect.Width(), rect.Height(), &memdc, 0, 0, SRCCOPY);//这个之前调用 memdc.DeleteDC(); btmp.Detach();