sanx72
February 13th, 2009, 09:34 AM
Hi,
- IE7
- Windows Vista/XP
I have an C++ ActiveX control that sits within a HTML web-page Internet Explorer which uses function keys to carry out options within the application. When I press any function key in the main window it fires as expected. However, if I open a child popup window, and press F11 or F1 I get the keypress as expected but IE also seems to get the keypress and maximises (F11) or shows its help (F1).
I am using the following styles to CreateWindowEx to open the window...
HWND hPopUp = CreateWindowEx(WS_EX_DLGMODALFRAME | WS_EX_APPWINDOW,
"MYCLASS", " ", WS_CAPTION | WS_CLIPSIBLINGS | WS_POPUP, 0, 0, 0, 0, hParent, 0, hAppInstance, NULL);
The Window is sized and positioned using SetWindowPos after creation. hParent is the hwnd of the ActiveX control embeded in the web-page which is just implementation of COleControl.
In the WndProc of the popup I put code to detect the FKey and block it from doing further processing which made no difference.
I've put some script into the web page to see if that is getting a onkeydown event and block if it does but that hasn't changed the behaviour.
I used Spy++ to see if I could see any WM_KEYDOWNs going to IE but they don't appear to get any key messages.
I'm proper stumped. Any ideas?
Cheers
sanx72
- IE7
- Windows Vista/XP
I have an C++ ActiveX control that sits within a HTML web-page Internet Explorer which uses function keys to carry out options within the application. When I press any function key in the main window it fires as expected. However, if I open a child popup window, and press F11 or F1 I get the keypress as expected but IE also seems to get the keypress and maximises (F11) or shows its help (F1).
I am using the following styles to CreateWindowEx to open the window...
HWND hPopUp = CreateWindowEx(WS_EX_DLGMODALFRAME | WS_EX_APPWINDOW,
"MYCLASS", " ", WS_CAPTION | WS_CLIPSIBLINGS | WS_POPUP, 0, 0, 0, 0, hParent, 0, hAppInstance, NULL);
The Window is sized and positioned using SetWindowPos after creation. hParent is the hwnd of the ActiveX control embeded in the web-page which is just implementation of COleControl.
In the WndProc of the popup I put code to detect the FKey and block it from doing further processing which made no difference.
I've put some script into the web page to see if that is getting a onkeydown event and block if it does but that hasn't changed the behaviour.
I used Spy++ to see if I could see any WM_KEYDOWNs going to IE but they don't appear to get any key messages.
I'm proper stumped. Any ideas?
Cheers
sanx72