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 » StreamRaster::LoadAnyFile -- not exist in distribution?
BugQuestion.gif  StreamRaster::LoadAnyFile -- not exist in distribution? [message #5626] Fri, 06 October 2006 13:04 Go to previous message
temer is currently offline  temer
Messages: 5
Registered: October 2006
Location: Kyiv, Ukraine
Promising Member

I can not find out how to use this function in my code. I've tried to compile U++ example from U++ website and it writes that there is no StreamRaster::LoadAnyFile. Indeed, both "StreamRaster" and "LoadAnyFile" are absent in distribution. How can this happen? How can I use this function?

Thanks.

The example code follows:

#include <CtrlLib/CtrlLib.h>

 

struct MyApp : public TopWindow {

    Image   img;

    FileSel fs;

 

    void Open();

 

    virtual void Paint(Draw& w);

    virtual void LeftDown(Point, dword) { Open(); }

    

    typedef MyApp CLASSNAME;

    MyApp();

};

 

MyApp::MyApp()

{

    fs.Type("Image file", "*.bmp;*.png;*.tif;*.tiff;*.jpg;*.jpeg;*.gif");

    Sizeable();

}

 

void MyApp::Paint(Draw& w)

{

    w.DrawRect(GetSize(), White);

    if(img)

        w.DrawImage(0, 0, img);

    else

        w.DrawText(0, 0, "No image loaded!", Arial(30).Italic());

}

 

void MyApp::Open()

{

    if(fs.ExecuteOpen("Choose the image file to open")) {

        img = StreamRaster::LoadFileAny(~fs);

        Refresh();

    }

}

 

GUI_APP_MAIN

{

    MyApp app;

    app.Open();

    app.Run();

}

 
Read Message BugQuestion.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: image of cursor
Next Topic: saving a paletted PNG
Goto Forum:
  


Current Time: Sat Apr 27 03:58:07 CEST 2024

Total time taken to generate the page: 0.05289 seconds