diff options
Diffstat (limited to 'CruUI/application.cpp')
-rw-r--r-- | CruUI/application.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CruUI/application.cpp b/CruUI/application.cpp index 2d949edb..af38116f 100644 --- a/CruUI/application.cpp +++ b/CruUI/application.cpp @@ -105,7 +105,11 @@ namespace cru { debug_border_brush_ = graph::CreateSolidBrush(D2D1::ColorF(D2D1::ColorF::Crimson)); #endif - caret_blink_duration_ = std::chrono::milliseconds(::GetCaretBlinkTime()); + caret_info_.caret_blink_duration = std::chrono::milliseconds(::GetCaretBlinkTime()); + DWORD caret_width; + if (!::SystemParametersInfoW(SPI_GETCARETWIDTH, 0 , &caret_width, 0)) + throw Win32Error(::GetLastError(), "Failed to get system caret width."); + caret_info_.half_caret_width = caret_width / 2.0f; } Application::~Application() |