MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / get_attribute

Method get_attribute

TranslucentTB/windows/window.hpp:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41 template<DWMWINDOWATTRIBUTE attrib>
42 inline std::optional<typename attrib_return_type<attrib>::type> get_attribute() const
43 {
44 typename attrib_return_type<attrib>::type val;
45 const HRESULT hr = DwmGetWindowAttribute(m_WindowHandle, attrib, &val, sizeof(val));
46 if (SUCCEEDED(hr))
47 {
48 return val;
49 }
50 else
51 {
52 HresultHandle(hr, spdlog::level::info, L"Failed to get window attribute.");
53 return std::nullopt;
54 }
55 }
56
57 static std::optional<std::filesystem::path> TryGetNtImageName(DWORD pid);
58

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected