mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-30 23:02:39 -06:00
reference/WebImage: Changed to use HttpRequest
git-svn-id: svn://ultimatepp.org/upp/trunk@5380 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2d06c1ad64
commit
e448348db9
1 changed files with 21 additions and 22 deletions
|
|
@ -1,22 +1,21 @@
|
|||
#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();
|
||||
}
|
||||
#include <CtrlLib/CtrlLib.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(HttpRequest("http://www.ultimatepp.org/1i.png").Execute());
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue