Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!orc!inews!iwarp.intel.com!gargoyle!chinet!patrickd From: patrickd@chinet.chi.il.us (Patrick Deupree) Newsgroups: comp.windows.ms Subject: Re: Bitmaps on pushbuttons Message-ID: <1990Oct09.032952.1993@chinet.chi.il.us> Date: 9 Oct 90 03:29:52 GMT References: <790@tuura.UUCP> Distribution: comp Organization: DKW Systems Corporation, Dallas, TX Lines: 22 In article <790@tuura.UUCP> risto@tuura.UUCP (Risto Lankinen) writes: >In principle, you'll need to write a DLL which will support the control's >run-time functions (i.e. it's WinProc), a few functions used by DIALOG.EXE >when creating a dialog to use the control plus LibMain and WEP, which are >oblicatory (well, almost) for any DLL anyway. Actually, there's a MUCH easier way to create those neat buttons with the bitmaps. There is a button style (BS_OWNERDRAW I believe) that will cause a button to send a message (WM_DRAWITEM) to it's parent Window whenever redrawing itself. Along with the WM_DRAWITEM message comes a structure that has various bits set to tell whether the button is down, checked, etc. Using this you can use the Paint program that comes with Windows, draw two buttom images (one in down state, one in up state), and then merely do a StretchBlt of that image in the client space of the button (also contained in the WM_DRAWITEM structure). It's pretty cool. Patrick -- "What's in a name? That which we call a rose by any other name would smell as sweet." William Shakespeare Patrick Deupree -> patrickd@chinet.chi.il.us (708) 328-3800 (Please note there are both a patrick and a patrickd at this site)