Files
GacUI/Tutorial/GacUI_Layout/RichTextEmbedding/Main.cpp
2019-01-10 06:45:51 -08:00

26 lines
611 B
C++

#define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections;
using namespace vl::stream;
class ViewModel : public Object, public virtual demo::IViewModel
{
public:
void OpenUrl(const WString& url)override
{
ShellExecute(NULL, L"OPEN", url.Buffer(), NULL, NULL, SW_MAXIMIZE);
}
};
void GuiMain()
{
{
FileStream fileStream(L"../UIRes/RichTextEmbedding.bin", FileStream::ReadOnly);
GetResourceManager()->LoadResourceOrPending(fileStream);
}
demo::MainWindow window(new ViewModel);
window.MoveToScreenCenter();
GetApplication()->Run(&window);
}