Overview
Examples
Screenshots
Comparisons
Applications
Download
Manual
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Language
English











SourceForge.net Logo



WebImage

 

Using HttpClientGet to obtain image from web, and displaying it

 

 

main.cpp

 

#include <CtrlLib/CtrlLib.h>

#include <Web/Web.h>

 

using namespace Upp;

 

struct MyApp : TopWindow {

    Image img;

    

    virtual void Paint(Draw& w) {

        w.DrawRect(GetSize(), Gray());

        w.DrawImage(0, 0, img);

    }

    

    MyApp() {

        img = StreamRaster::LoadStringAny(HttpClientGet("http://www.ultimatepp.org/1i.png"));

    }

};

 

GUI_APP_MAIN

{

    MyApp().Run();

}

 

 

 

 

This page is also in català, čeština, deutsch, español, euskara, français, română, русский, 中文(简体) and 中文(繁體). Do you want to contribute?