realbasic-plugins
[Top] [All Lists]

Re: CharCode in KeyDown event on Windows systems

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: CharCode in KeyDown event on Windows systems
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Thu, 24 Mar 2005 20:32:15 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE68897A dot C3A4%vanhoek at mac dot com>

On 24.3.2005, at 20:12, Alfred Van Hoek wrote:

My guess is that the focus is on the childHWND. In such a case the parent RB control will not receive meaningful char codes. While you probably put in
your mousedown the REALSetFocus, this mousedown is however not fired,
because it was stolen by the child already. So you either capture the
WM_KEYDOWN by subclassing the childHWND, or check the WM_NOTIFY of the
parentHWND for a SetFocus notification.

I haven't developed yet the best approach, it would be better to capture the WM_LBUTTONDOWN of the child and redirect it to the parent, preventing the child to obtain the wocus. the childHWND will likely call ::SetFocus. You should do this so you can use your gotfocus handler to advance focus when
the user starts to tab...



Alfred

It does, get meaningful values like I am grabbing Up and Down arrows , its just the delete key that is strange. The TreeView is also not a Windows control in that sense and does not need special care for Windows focusing.

--
______________________________________________________________________
Björn Eiríksson                            bjorn at einhugur dot com
Einhugur Software
http://www.einhugur.com/
______________________________________________________________________
Einhugur Software has sold its products in 43 countries world wide.
______________________________________________________________________
For support:                               support at einhugur dot com
To post on the maillist:                   einhugur at yahoogroups dot com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>