Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 1997-04-14
1
Medium Priority
?
320 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 100 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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 a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

618 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