Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In one of my application, we are using IE9 as process to run my ocx (using ole control).

Inside ocx we are doing hooking to get events from IE9.

for hooking we are using following code snippet:

HHOOK hMsgHook = ::SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC) MessageProc,

NULL, ::GetCurrentThreadId() );

Finally When I run my application ,output is our clientWindow(which contain OLE control) running inside IE9.

and when I tried to close this application using red cross on right top corner of IE9 , we are showing popup: Do you want to close this application?

using java script(pop up is similar size of windows message box).

Around same time when popup comes to foreground my main client window is getting hidden.(I came to know that it is hidden and not closed because of task manager.).

Further If I click yes on pop up box,main client window is getting closed successfully(ie instance getting disappeared from task manager) but If I click on No ,My main client window still is in hidden state and never comes to foreground and this is strange behavior why Client window getting hidden when we are showing popup.Client is getting hidden before control comes to the MessageProc().



Above same thing with exactly same code, successfully working for IE8, So I am unable to figure out why it is not working in case of IE9 only.

I tried to find out different document on internet to get solution for this issue,but no success as of now.



Can anybody please help me on this,share some helpful information to me?



Environment while failuer issue with IE9:

OS: Windows 7(64bit)

IE9(32 bit)

Ocx (32 bit)



Waiting for response.
Posted

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