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

Method Create

cpp/src/arrow/flight/sql/odbc/odbc_impl/ui/add_property_window.cc:47–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void AddPropertyWindow::Create() {
48 // Finding out parent position.
49 RECT parent_rect;
50 GetWindowRect(parent_->GetHandle(), &parent_rect);
51
52 // Positioning window to the center of parent window.
53 const int pos_x =
54 parent_rect.left + (parent_rect.right - parent_rect.left - width_) / 2;
55 const int pos_y =
56 parent_rect.top + (parent_rect.bottom - parent_rect.top - height_) / 2;
57
58 RECT desired_rect = {pos_x, pos_y, pos_x + width_, pos_y + height_};
59 AdjustWindowRect(&desired_rect, WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
60 FALSE);
61
62 Window::Create(WS_OVERLAPPED | WS_SYSMENU, desired_rect.left, desired_rect.top,
63 desired_rect.right - desired_rect.left,
64 desired_rect.bottom - desired_rect.top, 0);
65
66 if (!handle_) {
67 std::stringstream buf;
68 buf << "Can not create window, error code: " << GetLastError();
69 throw DriverException(buf.str());
70 }
71}
72
73bool AddPropertyWindow::GetProperty(std::wstring& key, std::wstring& value) {
74 if (accepted_) {

Callers

nothing calls this directly

Calls 3

DriverExceptionClass · 0.85
GetHandleMethod · 0.80
strMethod · 0.80

Tested by

no test coverage detected