views:

50

answers:

3

How to get HANDLE for an application say Outlook from my program

A: 

Use WIN32 API FindWindow().

Noel Abrahams
+1  A: 

You need to get the process id of the process you want to get the handle for and use OpenProcess.

Here's an example for this as well: http://msdn.microsoft.com/en-us/library/ms686701(v=VS.85).aspx

Vinzenz
+1 for answering the question that the OP actually wanted answered.
Steve Townsend
A: 

Probably try this:

HANDLE hOutlook = FindWindow("rctrl_renwnd32", NULL);
wengseng