Solved

How to match a bitmap and a checkbox (radiobutton) in a window ?

Posted on 1997-04-14
1
308 Views
Last Modified: 2013-12-03
Hi,

      I draw a bitmap in a window and i want to use checkbox and radiobutton within this window. How can i do to match these two window controls background color with my bitmap ? In theory, i must initialize the background color of these controls to Transparent to prevent these backgrounds to overwrite the bitmap, so, the only things you can see are the text (checkbox & radiobutton) and the mark.
Must i use WM_CTLCOLOR, in which way ......

Thanks
0
Comment
Question by:mars
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
NickRepin earned 50 total points
ID: 1334597
I don't know, what programming system you use: OWL, MFC...
But here common answer.

In your window's procedure you must process WM_CTLCOLORBTN message:
 
 case WM_CTLCOLORBTN:
     HWND hButton=(HWND) lParam;
     // Here make sure hButton is your bitmap's check/radiobutton handle
     // .....
     // Create background brush
     HGDIOBJ hBrush=GetStockObject(NULL_BRUSH);
     return (LRESULT) hBrush;
 
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question