LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.vc.language,microsoft.public.win32.programmer.ole,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows browser Parent/Child structure ERK New Users to Excel 2 December 3rd 06 12:44 AM
Sorting Parent Child kcmtnbiker Excel Worksheet Functions 2 March 31st 06 01:54 AM
keyboard shortcut for moving between windows c_new Excel Discussion (Misc queries) 7 October 11th 05 04:31 PM
child support calculator BrickYardFan Excel Discussion (Misc queries) 1 December 29th 04 03:17 AM
Keyboard shortcut for Maximizing Windows SuperJas Excel Programming 2 March 2nd 04 05:41 AM


All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"