Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

capture a screen of a prog

Status
Not open for further replies.

tokool

Programmer
Nov 6, 2001
40
US
Hi,
I am tryin to capture the screen bitmap of an application(like calc.exe) that i opened in my program using ShellExecute().
I am able to capture the entire screen using, HWND hClientWin = GetDesktopWindow() and then getting the DC from which i bitblt the contents.
How can i do this for only for a single window in the sceen, the window that the application i opened in my program generates.
Is there any other way i can open an application from my program and capture its screen bitmap.
Thanks,
Preetham
 
What you need is the hWnd of the application that you launch. The normal methods, such as ShellExecute etc. don't let you do this. But here's a thread over in the VB5&6 forum in which I present a method for launching an application that returns an extended PROCESS_INFORMATION structure that includes the hWnd of the shelled app. Once you've got that, it's easy.

thread222-169146
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top