Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine Forum Index
PostGo back to topic
atom0s
Moderator
Reputation: 204
Joined: 25 Jan 2006
Posts: 8581
Location: 127.0.0.1

PostPosted: Mon Dec 27, 2010 7:56 pm    Post subject:

Firstly, don't call FreeConsole on a console application. If you want a windowless solution running in the background just create a normal Win32 application and just don't create a window.

Monitoring Key Press:
- GetAsyncKeyState (Global)
- RegisterHotKey (Global)
- WM_CHAR / WM_KEYDOWN / WM_KEYUP (Local)

Taking the screenshot can be done various different ways and saving it is up to you as well. You can use outside libraries such as libpng / libjpg etc. to save with a compressed format for size friendly images and so on.

Snapping an image of the screen (Gdi):
- CreateCompatibleDC
- CreateCompatibleBitmap
- BitBlt
- SelectObject / DeleteObject

Screenshot via Clipboard:
- When your key is detected, force the print screen button to be pressed.
- OpenClipboard / GetClipboardData / CloseClipboard
- Convert the clipboard data to a bmp and save it.

There are other ways of taking the image as well as creating an application to handle monitoring for the key press as well. Just use Google if you need more in depth examples.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Post reviews:   Approve 1
Author Review
manc
Review: Approve
Post reference:
ReviewPosted: Mon Dec 27, 2010 8:11 pm

<3
Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites