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 » HowTo bind StaticImage to SQL
Re: HowTo bind StaticImage to SQL [message #43618 is a reply to message #43616] Mon, 15 September 2014 07:58 Go to previous messageGo to previous message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

I finally found a way to get my image to the control. Maybe it is crude, maybe there is a better way to do it, I don't know. This works for me.

I created a new static image which has the SetData method needed by SqlArray functions.
// subclass StaticImage widget to capture the mouse clicks
class JFStaticImage : public StaticImage {
typedef	JFStaticImage CLASSNAME;

public:
	virtual void LeftDown(Point p, dword keyflags);

//	Callback1 	WhenAction;

	JFStaticImage(){};
	void	SetData(const Value& data)	{String fn=data;  Set(fn);}
};


Now, I can simply do this and it works
	History.gridHist.AddCtrl(IMGFILE, 	History.siImage);


Anyone has other ideas, please let me know. I am eager to learn.

Regards
Jerson
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StaticImage cannot show BMP file
Next Topic: >Port 9(say port 10)
Goto Forum:
  


Current Time: Sun Aug 24 13:27:46 CEST 2025

Total time taken to generate the page: 0.04723 seconds