Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] Background in dockable GL objects
Next Topic: EditDouble background color
Goto Forum:
  


Current Time: Tue May 07 05:14:39 CEST 2024

Total time taken to generate the page: 0.02905 seconds