PaintDesktop
-
Hello, I want to obtain desktop background, so I would like to use PaintDesktop(hdc) function; SDK says: The PaintDesktop function fills the clipping region in the specified device context with the desktop pattern or wallpaper HRGN hReg = CreateRectRgn(0,0,10,10); HDC hdcD = GetWindowDC(GetDesktopWindow()); hdc = CreateCompatibleDC(hdcD); SelectObject(hdc,hReg); bResult = PaintDesktop(hdc); But PaintDesktop function always returns false. What am I doning wrong? Could you give me a hint. Thank you.
-
Hello, I want to obtain desktop background, so I would like to use PaintDesktop(hdc) function; SDK says: The PaintDesktop function fills the clipping region in the specified device context with the desktop pattern or wallpaper HRGN hReg = CreateRectRgn(0,0,10,10); HDC hdcD = GetWindowDC(GetDesktopWindow()); hdc = CreateCompatibleDC(hdcD); SelectObject(hdc,hReg); bResult = PaintDesktop(hdc); But PaintDesktop function always returns false. What am I doning wrong? Could you give me a hint. Thank you.
Why don't you call
GetLastError
onPaintDesktop
failure? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Why don't you call
GetLastError
onPaintDesktop
failure? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]