diff options
author | 杨宇千 <crupest@outlook.com> | 2018-11-27 21:12:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 21:12:10 +0800 |
commit | ee22597122612cd75fe62f5d808cb51478373fad (patch) | |
tree | 19b39da16f155451d5817e82e045d69d7410acbe /src/application.cpp | |
parent | 30333294fcd5917a9f3572f0c4c6dfc2ec429a3c (diff) | |
parent | 5b770e3bf0f3f9e22454d9e092630b22f5916ebe (diff) | |
download | cru-ee22597122612cd75fe62f5d808cb51478373fad.tar.gz cru-ee22597122612cd75fe62f5d808cb51478373fad.tar.bz2 cru-ee22597122612cd75fe62f5d808cb51478373fad.zip |
Merge pull request #26 from crupest/3-scrollview
Develop scrollview.
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/application.cpp b/src/application.cpp index fa71c37e..c3669f72 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -86,16 +86,6 @@ namespace cru { return instance_; } - namespace - { - void LoadSystemCursor(HINSTANCE h_instance) - { - ui::cursors::arrow = std::make_shared<ui::Cursor>(::LoadCursorW(nullptr, IDC_ARROW), false); - ui::cursors::hand = std::make_shared<ui::Cursor>(::LoadCursorW(nullptr, IDC_HAND), false); - ui::cursors::i_beam = std::make_shared<ui::Cursor>(::LoadCursorW(nullptr, IDC_IBEAM), false); - } - } - Application::Application(HINSTANCE h_instance) : h_instance_(h_instance) { @@ -104,9 +94,12 @@ namespace cru { instance_ = this; + if (!::IsWindows8OrGreater()) + throw std::runtime_error("Must run on Windows 8 or later."); + god_window_ = std::make_unique<GodWindow>(this); - LoadSystemCursor(h_instance); + ui::cursors::LoadSystemCursors(); } Application::~Application() |