图片剪切

来源:互联网 发布:免费刷棒棒糖的软件 编辑:程序博客网 时间:2024/04/28 11:35

简单的剪切方法 自己用高手就不必了   

CBitmap bmp1;
  bmp1.LoadBitmap(IDB_BITMAP1);
  BITMAP   bmpInfo;
  bmp1.GetBitmap(&bmpInfo);
  CDC dcMemory1;
  dcMemory1.CreateCompatibleDC(&dc);
  dcMemory1.SelectObject(&bmp1);
 
  //dc.SetStretchBltMode(0);
  //dc.BitBlt(0,0,bmpInfo.bmWidth/3,bmpInfo.bmHeight/4,&dcMemory1,0,0,SRCCOPY);
  
  dc.BitBlt(bmpInfo.bmWidth/3+bmpInfo.bmWidth/3,0,bmpInfo.bmWidth/3,bmpInfo.bmHeight/4,&dcMemory1,0,0,SRCCOPY);

原创粉丝点击