Print Page | Close Window

How do I know which pane has the focus?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=1668
Printed Date: 12 December 2024 at 12:03am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How do I know which pane has the focus?
Posted By: ddlittle
Subject: How do I know which pane has the focus?
Date Posted: 13 January 2005 at 10:25am

I have an MDI app with a lot of panes, some are dialogs, some are graphics, some are grids.  Each has its own accelerator table, and this is confusing to users.  I thought I would draw a red box around the active pane, but I can't seem to find the right XTP message that gets sent when a pane gains/loses focus.

I guess another way to say this is that I want to draw my panes differently depending on the who has the focus. WM_SETFOCUS doesn't seem to get called.

Any ideas, anyone? 

Thanks!
- David Little
- Houston, TX




Replies:
Posted By: ddlittle
Date Posted: 20 January 2005 at 1:42pm

I have fixed this (for the most part) by set "Luna" colors on.  I noticed that CView-derived windows get set active, but CDialog based windows don't.  Eventually, I discovered that the styles of the dialog in the .RC must be "WS_CHILD" only.

This seems to fix the issue of identification, unless the window is floating, in which case, I have no solution as yet.

Regards,

- David




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