Solved

Change Bkground Color of a CStatic in a Dialog

Posted on 1997-11-17
1
374 Views
Last Modified: 2013-11-19
With VC++ 5.0 is there a way to change the background color of a CStatic control that's in a dialog?
0
Comment
Question by:nbushman
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1310072
You must handle WM_CTLCOLORSTATIC message and specify the brush you want to use as static background. Create brush in your dialog constructor, add macro ON_WM_CTLCOLORSTATIC and message handler. If you need check static window handle passed as LPARAM and return brush handle.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 124
xyBalance chalenge 58 93
not able to insert into temp table 68 162
Replacement selected text 2 61
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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