Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Focus on task panel and not inserted dialog?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Focus on task panel and not inserted dialog?

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Focus on task panel and not inserted dialog?
    Posted: 15 May 2008 at 9:37am
I have a task panel that we add dialogs to. The dialogs have controls that have accelerator keys assigned to them in the resource file. When I first insert the dialog, all the keys work as expected.
 
If I click on the dialog but not on a control, the keys quit working.
 
If I click on a control in the dialog, the keys start working again (until I click on the dialog but not on a control).
 
I have found that when I click on the dialog but not on a control in the dialog, when a keystroke is processed by the frame, the hWnd for the message is the task panel. Hence when walking the pretranslate tree, the dialog is not involved.
 
So it appears the task panel has taken focus when I click on a dialog inserted into the task panel.
 
Why does the task panel become the target for the key strokes and how can I prevent this from happening, or how can I get the taskpanel to route the key events back to the dialog?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.