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 » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Image with Layout (iml) painted red, why?
Image with Layout (iml) painted red, why? [message #1439] Fri, 03 March 2006 22:31 Go to previous message
mechatronic is currently offline  mechatronic
Messages: 10
Registered: December 2005
Location: Viet Nam
Promising Member

This is my code:
ic555.h
#ifndef _ic555_ic555_h
#define _ic555_ic555_h

#include <CtrlLib/CtrlLib.h>
#include <stdlib.h>

#define LAYOUTFILE <ic555/ic555.lay>
#include <CtrlCore/lay.h>




class ic555 : public Withic555Layout<TopWindow> {
public:
typedef ic555 CLASSNAME;
ic555();
double s_t1, s_t2, s_T, s_f;
void Calc ();
void Paint (Draw&);
private:
double s_Ra, s_Rb, s_C;
};

#endif


main.cpp
#include "ic555.h"


#define IMAGEFILE <ic555/ic555.iml>
#include <Draw/iml.h>

ic555::ic555()
{
Title("IC555").Icon(minhhoa()).MinimizeBox(1);
BackPaint();
CtrlLayout(*this);

cmd_Calculate <<= THISBACK(Calc);
}


GUI_APP_MAIN
{
ic555().Run();
}

void ic555::Paint(Draw& p)
{
Rect w;
w.left=305;
w.top=30;
Size isz = minhhoa().GetSize();
w.SetSize(isz);
// p.DrawRect(w,SWhite);
p.DrawImage(w,minhhoa);
}

minhhoa is an image 193x155 pixel. When it ran, program window was filled with red. What's wrong in my code? Or anyone have other way to place an image into Layout.

[P.S. Topic title edited by fudadmin... Is it now what you meant? Smile]

[Updated on: Sat, 04 March 2006 18:38] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: where is the ImageDraw::DrawPixel ?
Next Topic: Showing bitmaps or Icons
Goto Forum:
  


Current Time: Sat May 04 00:25:33 CEST 2024

Total time taken to generate the page: 0.02439 seconds