首页
社区
课程
招聘
[原创][原创] c/c++ 屏幕截图
发表于: 2014-5-28 23:21 13592

[原创][原创] c/c++ 屏幕截图

2014-5-28 23:21
13592
说明:
该程序以隐藏方式运行,程序初始化时注册了两个热键Ctrl+Alt+a和Ctrl+Alt+A,当按下其中之一热键时,会让用户选择截屏的区域。
用户区域选择完后,可以有三种选择:
使用Ctrl+c快捷键保存到剪切板
使用Ctrl+s快捷键弹出保存bmp文件对话框
使用Esc快捷键取消截屏

当用户操作完后,程序并不会退出,用户可以反复的使用热键进行截屏,知道用户手动结束程序。
为了不引起大家的误会,所以这里并没有采用自启动方式运行程序。大家可以添加一些自启动方式(run或者ActiveX)

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

上传的附件:
收藏
免费 0
支持
分享
最新回复 (21)
雪    币: 27
活跃值: (127)
能力值: ( LV8,RANK:120 )
在线值:
发帖
回帖
粉丝
2
分享源码就应该支持,尽管现在用不上
2014-5-28 23:45
0
雪    币: 209
活跃值: (808)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(4) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(166) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(167) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(186) : error C2440: 'initializing' : cannot convert from 'char [11]' to 'unsigned short [260]'
        There is no context in which this conversion is possible
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(243) : error C2440: '=' : cannot convert from 'unsigned short [260]' to 'char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(255) : error C2664: 'CreateFileA' : cannot convert parameter 1 from 'unsigned short [260]' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(378) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(379) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(395) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(396) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(438) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(439) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(453) : error C2440: '=' : cannot convert from 'const unsigned short *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(460) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(461) : warning C4068: unknown pragma
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(471) : error C2664: 'CreateWindowExA' : cannot convert parameter 2 from 'const unsigned short *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\Administrator\桌面\后台截屏\Capture.cpp(484) : warning C4068: unknown pragma
Main.cpp
C:\Documents and Settings\Administrator\桌面\后台截屏\Main.cpp(11) : error C2440: 'initializing' : cannot convert from 'char [8]' to 'unsigned short *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\Administrator\桌面\后台截屏\Main.cpp(120) : error C2664: 'UnregisterClassA' : cannot convert parameter 1 from 'unsigned short *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

aaa.exe - 7 error(s), 12 warning(s)
2014-5-29 00:15
0
雪    币: 11
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
支持分享源码!
2014-5-29 08:04
0
雪    币: 26
活跃值: (26)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
5
把自己的工程设置成Unicode
2014-5-29 08:57
0
雪    币: 3836
活跃值: (4142)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
.伸手党。。。。。。。。。。。
2014-5-29 09:10
0
雪    币: 712
活跃值: (3767)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
7
支持下,但是为啥和QQ截图快捷键一样的?
2014-5-29 09:14
0
雪    币: 231
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
分享源码,支持一下!
2014-5-29 09:21
0
雪    币: 110
活跃值: (194)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
支持一下!
2014-5-29 11:47
0
雪    币: 123
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
支持楼主的无私分享!
2014-5-29 12:01
0
雪    币: 525
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
顶了。有可能有用。谢。
2014-5-29 12:02
0
雪    币: 209
活跃值: (808)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
12
工程设置成Unicode后:

D:\黑客\示例\截屏\后台截屏\Capture.cpp(4) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(166) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(167) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'hOldBmp' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(202) : see declaration of 'hOldBmp'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'dwWritten' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(260) : see declaration of 'dwWritten'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(348) : error C2362: initialization of 'hOldBmp' is skipped by 'goto bmp_cleanup'
        D:\黑客\示例\截屏\后台截屏\Capture.cpp(202) : see declaration of 'hOldBmp'
D:\黑客\示例\截屏\后台截屏\Capture.cpp(378) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(379) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(395) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(396) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(438) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(439) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(460) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(461) : warning C4068: unknown pragma
D:\黑客\示例\截屏\后台截屏\Capture.cpp(484) : warning C4068: unknown pragma
Error executing cl.exe.

aaa.exe - 10 error(s), 12 warning(s)
2014-5-29 12:18
0
雪    币: 80
活跃值: (109)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
13
注册快捷键中a和A样的吧
2014-5-29 12:48
0
雪    币: 209
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
14
实用!不用开QQ或是其它截图程序了~
2015-4-3 16:13
0
雪    币: 3
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
15
高端,能截Directx吗
2015-4-6 13:19
0
雪    币: 23
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
16
win8.1下可用,先Mark一记!
2015-4-6 13:26
0
雪    币: 38
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
17
学习下,谢谢!
2015-4-12 02:04
0
雪    币: 255
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
18
mark下 谢谢楼主
2015-4-13 06:32
0
雪    币: 2359
活跃值: (288)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
19
支持楼主分享源代码
2015-4-13 07:26
0
雪    币: 707
活跃值: (1301)
能力值: ( LV9,RANK:190 )
在线值:
发帖
回帖
粉丝
20
谢谢,学习一下
上传的附件:
2015-4-13 08:44
0
雪    币: 122
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
21
谢谢分享!
2015-4-13 09:26
0
雪    币: 6
活跃值: (1125)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
22
很明显对dx无效
2015-4-13 10:07
0
游客
登录 | 注册 方可回帖
返回
//