Solved

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

Posted on 1997-04-14
1
306 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
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 108
Where to obtain Oracle Data Provider for .NET 3.5 7 54
Trouble with References... 5 60
Problem to open text file 11 131
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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