class MyCtrl : public Label { typedef MyCtrl CLASSNAME; public: virtual void Paint(Draw& draw) { Size sz = GetSize(); w.DrawRect(0, 0, sz.cx, sz.cy); Label::Paint(w); } virtual void MouseMove(Point p, dword keyflags) { do here what you want } public: Color background; MyCtrl& SetBackground(Color c) {background = c; Refresh(); return *this;} MyCtrl() { Transparent(); NoWantFocus(); background = Null; } };
Report message to a moderator