求一个截屏程序,最好有源代码

booksyhay 2011-07-14 10:04:38
求一个截屏程序,需求如下:
1,能截图,并且在确定截图前可以调整所选区域的大小。
(注:在网上找到一个叫CatchScreen的类似于QQ截图的有源码的程序,这一点可以满足要求)
2,在截图前可以在屏幕上添加内容,比如划线,划矩形,划圈圈,添加文字等,并且可以选择颜色。
(因为有时候需要在屏幕上标明重点,或添加注释)
3,能在后台运行,通过快捷键调出该程序。(因为有时需要截下拉菜单的内容),最好能自定义快捷键。

找到了几个程序,可以分别满足某一条要求,但我想找一个能集合上述需求于一体的一个小程序。
...全文
327 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
许文君 2011-09-19
  • 打赏
  • 举报
回复
很多,so on
一名程序员 2011-09-19
  • 打赏
  • 举报
回复
在360软件管家里搜。
一名程序员 2011-09-18
  • 打赏
  • 举报
回复
snag it!
Dreammingman 2011-08-06
  • 打赏
  • 举报
回复
#define WIDTHBYTES(bits) ((((bits) + 31)>>5)<<2)

HBITMAP hBitmap;
HDC hdc = CreateDC("DISPLAY", NULL, NULL, NULL);
HDC tDC = CreateCompatibleDC(hdc);
int width = GetSystemMetrics(SM_CXSCREEN);
int height = GetSystemMetrics(SM_CYSCREEN);
hBitmap = ::CreateCompatibleBitmap(hdc, width, height);
HBITMAP hOldBitmap = (HBITMAP)SelectObject(tDC, hBitmap);
BitBlt(tDC, 0, 0, width, height, hdc, 0, 0, SRCCOPY);
hBitmap = (HBITMAP)SelectObject(tDC, hOldBitmap);
BITMAP bm;
GetObject(hBitmap, sizeof(bm), &bm);
BITMAPFILEHEADER bfh;
BITMAPINFOHEADER bih;
bih.biSize = sizeof(bih);
bih.biWidth = bm.bmWidth;
bih.biHeight = bm.bmHeight;
bih.biPlanes = 1;
bih.biBitCount = bm.bmBitsPixel;
bih.biCompression = BI_RGB;
bih.biSizeImage = bih.biHeight*WIDTHBYTES(bih.biWidth*bih.biBitCount);
bih.biXPelsPerMeter = bih.biYPelsPerMeter = 0;
bih.biClrImportant = bih.biClrUsed = 0;
DWORD pSize = GetPaletteSize(bih.biBitCount);
bfh.bfReserved1 = bfh.bfReserved2 = 0;
bfh.bfOffBits = 54 + pSize;
bfh.bfSize = 54 + pSize + bih.biSizeImage;
bfh.bfType = 0x4d42;
DWORD size = bih.biSizeImage;
BYTE*buf = new BYTE[size];
::GetDIBits(hdc, hBitmap, 0, bih.biHeight, buf, (BITMAPINFO*)bih, DIB_RGB_COLORS);
HANDLE hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
DWORD dwWrite;
WriteFile(hFile, &bfh, sizeof(bfh), &dwWrite, NULL);
WriteFile(hFile, &bih, sizeof(bih), &dwWrite, NULL);
WriteFile(hFile, buf, size, &dwWrite, NULL);
CloseHandle(hFile);
delete[] buf;
DeleteObject(hBitmap);
DeleteDC(tDC);
DeleteDC(hdc);
chunyou128 2011-07-24
  • 打赏
  • 举报
回复
Eleven 2011-07-14
  • 打赏
  • 举报
回复
都有源代码,自己修改一下吧~

2,586

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 资源
社区管理员
  • 资源
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧