IonicWind Software

Aurora Compiler => GUI => Topic started by: Haim on February 15, 2008, 10:33:00 AM

Title: keyboard events for CHILD WINDOWS
Post by: Haim on February 15, 2008, 10:33:00 AM
Hi,
I created a simple window class, regitered it and created an instance with CreateWindowEx.
I specified the style as WS_CHILD.
The instance responds well to mouse events, but not to keyboard events.
I understand that this is because of the WS_CHILD style.
Is there a way to get a notification of keyboard events from such a child window?

Haim

Title: Re: keyboard events for CHILD WINDOWS
Post by: Ionic Wind Support Team on February 15, 2008, 10:43:25 AM
What are you using for an event loop?

And why not just use the built in window class?
Title: Re: keyboard events for CHILD WINDOWS
Post by: Haim on February 15, 2008, 11:06:27 AM
Hi,
I am trying to work on creating a custom control in Aurora. and this is my learning curve on this...
When I register the class I specify a non oop sub as the window procedure.\, and from there I redirect the messages and parameters to a class method which receives the whnd, msg, lparam and wparam values.

This works just fine for mouse messages like WM_LBUTTONDOWN, but not for WM_KEYDOWN.
I know I can derive the functionaliy through Aurora windows but I am trying to explore other ways too.

Haim

Title: Re: keyboard events for CHILD WINDOWS
Post by: sapero on February 15, 2008, 04:42:34 PM
Haim,

keyboard messages are always sent. Maybe try to play with WM_GETDLGCODE to select what keys your control requires, and to remove the beep - as in attached example.
Title: Re: keyboard events for CHILD WINDOWS
Post by: Haim on February 16, 2008, 01:48:34 AM
Sapero,
thank you very much for your help!

Haim