Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!math.fu-berlin.de!unido!rwthinf!slcdec!hippo!f1.n6000.z2.fidonet.org!p27.f30.n147.z1.fidonet.org!Gary_Capps From: Gary_Capps@p27.f30.n147.z1.fidonet.org (Gary Capps) Newsgroups: comp.windows.ms.programmer Subject: BS_USERBUTTON vs. BS_OWNERDRAW Message-ID: Date: 29 May 91 22:37:04 GMT Article-I.D.: f1.funpack118017 Reply-To: Gary_Capps%p27.f30.n147.z1@hippo.dfv.rwth-aachen.de (Gary Capps) Organization: "Fribbit me thud, crash, and mumble" -- Norman, OK Lines: 22 Comment-To: Tim_Hunter@f1.n6000.z2.fidonet.org (Tim Hunter) In a message of <23 May 91 22:47:39> Tim Hunter wrote to All: TH>I'm new to Windows programming, but my guess is that the BS_USERBUTTON TH>style was present in earlier releases of Windows and has been superceded TH>by the BS_OWNERDRAW style. Am I right? Bingo. TH>behind the two styles? More importantly, is there any reason to prefer TH>the BS_OWNERDRAW style if the BS_USERBUTTON style provides sufficient TH>functionality? Known bugs, etc.? The difference is primarily in how the button talks to its parent. The BS_USERBUTTON sends WM_COMMAND messages with BN_xxxx notifications in wParam while the BS_OWNERDRAW button sends WM_DRAWITEM and WM_MEASUREITEM messages with lParam pointing to control structures that contain the button's hDC, client rectangle, status bits, etc. You should stick to BS_OWNERDRAW buttons, 'cause there's probably a better than even chance that the BS_USERBUTTON will be phased out. gc