MCPcopy Create free account
hub / github.com/apache/arrow / Create

Method Create

cpp/src/arrow/flight/sql/odbc/odbc_impl/ui/dsn_configuration_window.cc:70–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void DsnConfigurationWindow::Create() {
71 // Finding out parent position.
72 RECT parent_rect;
73 GetWindowRect(parent_->GetHandle(), &parent_rect);
74
75 // Positioning window to the center of parent window.
76 const int pos_x =
77 parent_rect.left + (parent_rect.right - parent_rect.left - width_) / 2;
78 const int pos_y =
79 parent_rect.top + (parent_rect.bottom - parent_rect.top - height_) / 2;
80
81 RECT desired_rect = {pos_x, pos_y, pos_x + width_, pos_y + height_};
82 AdjustWindowRect(&desired_rect, WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
83 FALSE);
84
85 Window::Create(WS_OVERLAPPED | WS_SYSMENU, desired_rect.left, desired_rect.top,
86 desired_rect.right - desired_rect.left,
87 desired_rect.bottom - desired_rect.top, 0);
88
89 if (!handle_) {
90 std::stringstream buf;
91 buf << "Can not create window, error code: " << GetLastError();
92 throw DriverException(buf.str());
93 }
94}
95
96void DsnConfigurationWindow::OnCreate() {
97 tab_control_ = CreateTabControl(ChildId::TAB_CONTROL);

Callers 1

OnMessageMethod · 0.45

Calls 3

DriverExceptionClass · 0.85
GetHandleMethod · 0.80
strMethod · 0.80

Tested by

no test coverage detected