Home » U++ Library support » U++ Library : Other (not classified elsewhere) » How to catch and overwrite child control event?
How to catch and overwrite child control event? [message #13673] |
Mon, 21 January 2008 01:39 |
kompotFX
Messages: 7 Registered: January 2008
|
Promising Member |
|
|
Hi,
I'm new in upp. The "not-well-documented" documentation can't help me so much in my simple task.
What I want:
I want to make port for short tool (I wrote in MFC some time ago) in order to use it on linux. I made a choice to use upp bcs it seems to be very simple, straight forward.
The main functionality I try to achieve is to catch DocEdit control key input events (child control of my dialog) and modify them. E.g. when user types "A", it appear as "B", "a" -> "b" etc. So, basically tool must make key filtering and convertion.
In MFC it was done very simple - all key events to child was modified by parent wnd by using PreTranslateMessage event.
In upp I tried use method Key(dword key, int count) of dialog - but no effect. The key user pressed was forwarded to control.
For myDocEdit <<= THISBACK(ModifyKey); - same thing
I tried also derrive my own control from DocEdit - compiler returns an error from lay file:
error: 'MyClassX' does not name a type
In function 'void InitLayout(Upp::Ctrl&, L&, D&, MyAppLayout__layid&)...etc
What to do?
|
|
|
Goto Forum:
Current Time: Sun Apr 28 17:36:54 CEST 2024
Total time taken to generate the page: 0.03123 seconds
|