diff options
author | Yuqian Yang <crupest@outlook.com> | 2018-09-23 16:48:18 +0000 |
---|---|---|
committer | Yuqian Yang <crupest@outlook.com> | 2018-09-23 16:48:18 +0000 |
commit | 001e1d955132a02a2f7effc841ab9e5ee425eda1 (patch) | |
tree | 1bfbdcc2a25316d6e85cc9b4527a1ec15841b502 /CruUI/application.cpp | |
parent | 796ba6e1e816ec87a106f2f7b501e38c99f059e1 (diff) | |
parent | 9049f7674e0808cc3676543e0a95330a1657d10e (diff) | |
download | cru-001e1d955132a02a2f7effc841ab9e5ee425eda1.tar.gz cru-001e1d955132a02a2f7effc841ab9e5ee425eda1.tar.bz2 cru-001e1d955132a02a2f7effc841ab9e5ee425eda1.zip |
Merge branch 'textboxdev' into 'master'
TextBox develop.
See merge request crupest/CruUI!2
Diffstat (limited to 'CruUI/application.cpp')
-rw-r--r-- | CruUI/application.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CruUI/application.cpp b/CruUI/application.cpp index 1375ed99..af38116f 100644 --- a/CruUI/application.cpp +++ b/CruUI/application.cpp @@ -104,6 +104,12 @@ namespace cru { #ifdef CRU_DEBUG_DRAW_CONTROL_BORDER debug_border_brush_ = graph::CreateSolidBrush(D2D1::ColorF(D2D1::ColorF::Crimson)); #endif + + 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() |