aboutsummaryrefslogtreecommitdiff
path: root/CruUI/application.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-24 00:16:53 +0800
committercrupest <crupest@outlook.com>2018-09-24 00:16:53 +0800
commit977c766e2337fea238804b8d8b97659361391ed0 (patch)
treeff3438e5b0517c52412cfa497d1d2a0ed314cf79 /CruUI/application.cpp
parentbe84ddd03d3b59c0c27aa538d5ef5129f94d511c (diff)
downloadcru-977c766e2337fea238804b8d8b97659361391ed0.tar.gz
cru-977c766e2337fea238804b8d8b97659361391ed0.tar.bz2
cru-977c766e2337fea238804b8d8b97659361391ed0.zip
Develop basic function of textbox.
Diffstat (limited to 'CruUI/application.cpp')
-rw-r--r--CruUI/application.cpp6
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()