|
|
Home » U++ Library support » TabCtrl » Tabctrl and RightDown.
Tabctrl and RightDown. [message #37810] |
Wed, 14 November 2012 15:32 |
witriol
Messages: 8 Registered: November 2012
|
Promising Member |
|
|
First!
I'm sorry my English is poor.
I have a problem with RightDown(and similar Leftdown).
This is the class definition:
class Gun : public WithGunLayout<TopWindow>
{
.....;
Withkep_lay <ParentCtrl> mj;
.....;
}
I use this layoutfile in a TabCtrl:
Gun::Gun()
{
.....
CtrlLayout(mj);
summa_vievver.Add(mj,"Image");//suma_vievver is a TabCtrl in the Gun.lay.
.....
}
Should I put a picture of mj.
Right click choose the interesting part but right click does not work. This is logical RightDown of mj overdefine/overwrite Gun::RigtDown. How to do call the right click function of mj?.
Thank you for help.
[Updated on: Wed, 14 November 2012 15:33] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Tabctrl and RightDown. [message #37855 is a reply to message #37854] |
Sun, 18 November 2012 21:59 |
|
koldo
Messages: 3372 Registered: August 2008
|
Senior Veteran |
|
|
Hello Witriol
Perhaps it is not the nicest way to do it but you may do something like this:
class Gun : public WithGunLayout<TopWindow> {
....
public:
....
Gun() {
mj.Init(this);
}
Kep_lay mj;
void RightMouseHandler(Point p, dword keyFlags) {
// Do it.
}
....
};
class Kep_lay : public Withkep_lay<StaticRect> {
public:
typedef Kep_lay CLASSNAME;
void Init(Gun *_parent) {parent = _parent;}
virtual void RightDown(Point p, dword keyFlags) {
parent->RightMouseHandler(p, keyFlags);
private:
Gun *parent;
};
Best regards
Iñaki
|
|
|
Goto Forum:
Current Time: Thu Jun 06 06:36:18 CEST 2024
Total time taken to generate the page: 0.01784 seconds
|
|
|