Print Page | Close Window

Focus on task panel and not inserted dialog?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=10635
Printed Date: 23 November 2024 at 8:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Focus on task panel and not inserted dialog?
Posted By: rdhd
Subject: Focus on task panel and not inserted dialog?
Date 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?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net