giuseppe500

hello.
I wold to draw images over the screen(simil to vista's boubble screen saver)leaving the non image area the same.
Is possible
thanks


Re: Visual C++ General draw images on the screen

Aleksandr Tokarev

int _tmain(int argc, _TCHAR* argv[])

{

HDC hDC = ::GetWindowDC(NULL);

::Ellipse(hDC, 10, 10, 1100, 800);

ReleaseDC(NULL, hDC);

cin.get();

}





Re: Visual C++ General draw images on the screen

giuseppe500

thanks .
i try this:
ModifyStyleEx(0, WS_EX_LAYERED|WS_EX_TRANSPARENT);
HDC hDC = ::GetWindowDC(NULL);
::Ellipse(hDC, 10, 10, 1100, 800);
and work , the window is trasparent and the code draw on it , but if i go around with mouse the background destroy the ellipse.
thanks.




Re: Visual C++ General draw images on the screen

Aleksandr Tokarev

ModifyStyleEx(0, WS_EX_LAYERED|WS_EX_TRANSPARENT);<-For witch purpose

Check this link, it may helps.

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=993314&SiteID=1

But really better create a full screen size layered window. With WS_EX_LAYERED attribute, and draw an image in WM_PAINT message handler. Remember, layered window not cheap for the system.