Hi all. I recently wrote a python program that takes a screenshot of the current active window. After taking that screenshot, it saves it as a bmp (using PIL), and then goes thru each pixel, looking for a certain color. If it finds that color, it moves the mouse to that location (using ctypes) I am trying to write this in c++, but due to python's speed issues (I'm no expert with c++, I've been dawdling more than anything) and was wondering how to go about taking a screenshot of the active window (I've already got down clicking and mouse movement, using window.h) Is there any type of library that could do this, or is somewhat similar to python's PIL? Any comments/suggestions would be appreciated. Thanks!

Recommended Answers

All 2 Replies

thanks, but you wouldn't happen to know of a link that actually tells me what functions/libs to use? that web page you gave me is of someones program (alot of .cpp and .h files, although it does take screenshots)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.