Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!pacbell.com!ucsd!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!fuug!tuura!risto From: risto@tuura.UUCP (Risto Lankinen) Newsgroups: comp.windows.ms.programmer Subject: Re: animation in Windows? Message-ID: <1198@tuura.UUCP> Date: 10 Jun 91 08:19:09 GMT References: <72548@microsoft.UUCP> <675827512@f521.n281.z2.fidonet.org> Organization: Nokia Data Systems Oy Lines: 43 jeroen_pluimers@f521.n281.z2.fidonet.org (Jeroen Pluimers) writes: >Hello Matt! >In a msg of <24 May 91>, Matt SAETTLER writes to All: > MS> Multimedia Windows DOES provide a transparent BLIT that does what > MS> you want. The background color in the source bitmap is not copied > MS> while everything else is... >Why is does back-ground of an icon use the wallpaper as background, even if I >specify it to be as see trough? >When I drag an icon around over another window, I can see trough it at the >parts where I defined that color, but as soon as I leave it over (for instance) >a white window, gray parts are visible in that area. Will this be fixed in Win >3.1? Hi! The iconic windows receive WM_ICONERASEBKGND messages, at which point they ask their *parent* window (and not the window. which might be laid directly underneath ie. between the icon and its parent) to repaint, with the iconic window's window rectangle as the clipping region. This is the case with the draggable 'desktop icons', so the transparent part of them is the desktop bitmap or color, on top of which the solid part is painted. If, on the other hand, you use the DrawIcon() within a WinProc(), the icon is not a window, and will not receive WM_ICONERASEBKGND by itself. In that case, the window procedure that drew the icon is responsible of handling the transparency. Ob.tip!!! To make a window 'transparent' with regard to its direct parent, one could use 'wndclass.hbrBackground = NULL' and handle the WM_ERASEBKGND with the 'return DefWindowProc( hWnd,WM_ICONERASEBKGND,wPara,lParam)' even if the window doing so were far from being iconic... Terveisin: Risto Lankinen -- Risto Lankinen / product specialist *************************************** Nokia Data Systems, Technology Dept * 2 3 * THIS SPACE INTENTIONALLY LEFT BLANK * 2 +1 is PRIME! Now working on 2 -1 * replies: risto@yj.data.nokia.fi ***************************************