Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/dwmapi/dwmapi_main.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c index 8408a2e..3f48691 100644 --- a/dlls/dwmapi/dwmapi_main.c +++ b/dlls/dwmapi/dwmapi_main.c @@ -208,9 +208,33 @@ BOOL WINAPI DwmDefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, */ HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attribute, DWORD size) { - FIXME("(%p %d %p %d) stub\n", hwnd, attribute, pv_attribute, size); + TRACE("(%p %d %p %d)\n", hwnd, attribute, pv_attribute, size);
- return E_NOTIMPL; + if (!hwnd) return E_HANDLE; + if (!pv_attribute) return E_INVALIDARG; + + switch (attribute) + { + case DWMWA_NCRENDERING_ENABLED: + if (size < sizeof(BOOL)) return E_INVALIDARG; + + WARN("DWMWA_NCRENDERING_ENABLED: always returning FALSE.\n"); + *(BOOL*)(pv_attribute) = FALSE; + break; + + case DWMWA_CLOAKED: + if (size < sizeof(DWORD)) return E_INVALIDARG; + + FIXME("DWMWA_CLOAKED: always returning 0.\n"); + *(DWORD*)(pv_attribute) = 0; + break; + + default: + FIXME("unimplemented attribute %d, size %u, for hwnd %p.\n", attribute, size, hwnd); + return E_INVALIDARG; + } + + return S_OK; }
/**********************************************************************