|
-
Jul 19th, 2000, 04:57 AM
#1
Thread Starter
Member
I have a program that opens any kind of file "if there is an associated program to open it".
I use shellexecute.
I wan't to grab the file window that I opened, and put it inside a textbox "Like a viewer".
The problem is: I need the hwnd of that window, but I don't know is caption! I can't use "Getforegroundwindow", or "getactivewindow", because my program is a MDIChild, and the ret hwnd if from the MDIForm.
Is there any way to get the hwnd of the new window?
Thanks, I'm allmost losing my hair :-))
-
Jul 21st, 2000, 07:13 AM
#2
New Member
Getting hWnd from ShellExecute
Perhaps this helps:
If you check out MSDN you'll see another function called ShellExecuteEx that uses a SHELLEXECUTEINFO structure. This structure returns a hProcess. You may be able to use this value to get a hWnd to the main window for that application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|