Home » Community » Newbie corner » How can I callback on staticimage click
Re: How can I callback on staticimage click [message #35479 is a reply to message #35390] |
Tue, 21 February 2012 22:12 |
|
I use simplest alternative of ImageBtn
ImageBtn.h:
#ifndef _ImageBtn_h_
#define _ImageBtn_h_
class ImageBtn : public ImageCtrl
{
public:
ImageBtn() { IgnoreMouse(false); }
Image imgb;
void SetBackImage(Image imgb1) {imgb = imgb1;}
virtual void LeftDown(Point p, dword keyflags) { Action(); }
virtual void Paint(Draw& draw);
};
#endif
ImageBtn.cpp:
#include "ImageBtn.h"
void ImageBtn::Paint(Draw& draw){
draw.DrawImage(GetSize(),imgb);
}
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Tue, 21 February 2012 22:14] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue May 07 05:14:39 CEST 2024
Total time taken to generate the page: 0.02905 seconds
|