![]() |
COM Add-ins and Keyboard Hooks/Child Windows
Hi
I have been working on a COM Add-in using C++ implementing the IDTExtensibility2 interface. This add-in places a button on a tool bar which when clicked creates a child window in which the user can enter a range of rows that will then be processed as per the add-in's requirements. Creating the window is working fine, the parent is set to the HWND of the main Excel window. The problem is that whenever I set the focus to one of the editboxes in my window and try type the focus is jumping back to the main Excel window and typing into the last selected cell It looks to me almost as if there is a keyboard hook being created in the main excel app as I get all the appropriate WM_SETFOCUS messages coming to my window proc so I know the focus is being set, but as soon as I press a key on the keyboard it jumps back to the excel window. If I put my own hook in and do not call the next hook in the chain then it does stop it jumping back. Is excel using a hook, if not how or what should I be doing to get the focus truly and properly set on my window so that excel wont steal it back Any help is greatly appreciated on this Thanks Gareth |
All times are GMT +1. The time now is 10:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com