ShellExecute Question. (urgent)
-
Hi all, Can someone tell me how to get the messages from a child window opened with ShellExecute(...) and then respond to them. I tried setting the hwnd parameter to this->m_hWnd from a dialog app.. then i ran a spy++ and didn't see any messages going from the opened web browser back to my dialog app. example. From a Dialog app, i'm opening and html page in Internet Explorer and I need the Dialog app to be able to respond to dialog boxes that IE presents , like error messages and such. It sounds like i should be able to from the API docs... -- MSDN ---------------------------- HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ); hwnd [in] Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. ... --------------------------------- could someone let me know if my understanding of this is wrong. Thanks for any help.. Rick
-
Hi all, Can someone tell me how to get the messages from a child window opened with ShellExecute(...) and then respond to them. I tried setting the hwnd parameter to this->m_hWnd from a dialog app.. then i ran a spy++ and didn't see any messages going from the opened web browser back to my dialog app. example. From a Dialog app, i'm opening and html page in Internet Explorer and I need the Dialog app to be able to respond to dialog boxes that IE presents , like error messages and such. It sounds like i should be able to from the API docs... -- MSDN ---------------------------- HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ); hwnd [in] Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. ... --------------------------------- could someone let me know if my understanding of this is wrong. Thanks for any help.. Rick
RickGavin wrote: hwnd [in] Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. I dont think that'll work when you spawn a new app. This works only for shell commands like "open" and "print". I might be wrong though. Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Hi all, Can someone tell me how to get the messages from a child window opened with ShellExecute(...) and then respond to them. I tried setting the hwnd parameter to this->m_hWnd from a dialog app.. then i ran a spy++ and didn't see any messages going from the opened web browser back to my dialog app. example. From a Dialog app, i'm opening and html page in Internet Explorer and I need the Dialog app to be able to respond to dialog boxes that IE presents , like error messages and such. It sounds like i should be able to from the API docs... -- MSDN ---------------------------- HINSTANCE ShellExecute( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ); hwnd [in] Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. ... --------------------------------- could someone let me know if my understanding of this is wrong. Thanks for any help.. Rick
You are misunderstanding the purpose of the
hwnd
parameter. When you start a new process, it's off in its own process space, it is not a child of the launching process or its windows.hwnd
is only used by the shell if an error occurs.hwnd
is one of you windows, which is used as the parent of error dialogs if any are displayed. --Mike-- If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm -
You are misunderstanding the purpose of the
hwnd
parameter. When you start a new process, it's off in its own process space, it is not a child of the launching process or its windows.hwnd
is only used by the shell if an error occurs.hwnd
is one of you windows, which is used as the parent of error dialogs if any are displayed. --Mike-- If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_HelmThanks for setting me straight. Since that obviously won't work, do you know a way to accomplish the task? i.e. open a browser and then monitor it for any dialogs, and then pragmatically ok or cancel said dialog box, so that the user doesn't have to answer his/her self? Thanks again Rick