// TODO: Add your control notification handler code here /*if(!m_IsPath) { MessageBox("请选择文件存储位置"); return; }*/ CDC* pDeskDC = GetDesktopWindow()->GetDC(); //获取桌面画布对象 CRect rc; GetDesktopWindow()->GetClientRect(rc); //获取屏幕的客户区域 CDC memDC; //定义一个内存画布 memDC.CreateCompatibleDC(pDeskDC); //创建一个兼容的画布 CBitmap bmp; bmp.CreateCompatibleBitmap(pDeskDC,rc.Width(),rc.Height()); //创建兼容位图 memDC.SelectObject(&bmp); //选中位图对象 BITMAP bitmap; bmp.GetBitmap(&bitmap); memDC.BitBlt(0,0,bitmap.bmWidth,bitmap.bmHeight,pDeskDC,0,0,SRCCOPY); //添加鼠标 CPoint point; GetCursorPos(&point); HICON hicon = (HICON)GetCursor(); memDC.DrawIcon(point,hicon); DWORD size=bitmap.bmWidthBytes*bitmap.bmHeight; LPSTR lpData=(LPSTR)GlobalAllocPtr(GPTR,size); int panelsize = 0; //记录调色板大小 if(bitmap.bmBitsPixel<16) //判断是否为真彩色位图 panelsize = po