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: Alfred Van Hoek <vanhoek at mac dot com>
Date: Thu, 24 Mar 2005 15:12:59 -0500
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
on 3/24/05 2:15 PM, Björn Eiríksson at bjorn at einhugur dot com wrote:

> Is there something I should be translating in the CharCode in the
> KeyDown events on Windows systems ?
> 

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

_______________________________________________
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>