Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am invoking Excel application from MFC application using ShellExecuteEx. I have hProcess of SHELLEXECUTEINFO struct which is a HANDLE type. After Invoking Excel, I am displaying one more dialog which should be child of Excel. For Setting Excel as parent I need CWnd* of Excel but I have HANDLE of Excel process. How to get CWnd* ? If it is already solved somehwhere a link will me. I have tried EnumWindows but don't know what to give for LPARAM.
Thanks in advance.
Posted
Updated 8-Mar-15 19:07pm
v3
Comments
Sergey Alexandrovich Kryukov 9-Mar-15 1:05am    
Was it so hard to consult original MSDN documentation?
—SA

1 solution

It's not "to get". This class, as many typical MFC classes, is a mere C++ wrapper around a window object referenced via its HWND.

Here: https://msdn.microsoft.com/en-us/library/22x4kb1k.aspx[^].

Please, get a habit to find everything in documentation by yourself. This forum is more for real problems, hard or maybe even very simple, but real.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900