September 26, 2022, 05:48:01 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


keyboard events for CHILD WINDOWS

Started by Haim, February 15, 2008, 10:33:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Haim

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


Ionic Wind Support Team

What are you using for an event loop?

And why not just use the built in window class?
Ionic Wind Support Team

Haim

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


sapero

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.

Haim

Sapero,
thank you very much for your help!

Haim