Changing a objects looks

Posted on 1998-12-09
Medium Priority
Last Modified: 2012-05-04
I am trying to alter the objects on the screen, ie. buttons, edit boxes, and so on.

I want to be able to set each objects properties such as font type and size, foreground, background, and text colors?

Thanks in advance
Question by:DanielJenkins
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
  • 3
  • 2

Expert Comment

ID: 1179781
What compiler and library are you using?
LVL 22

Expert Comment

ID: 1179782
That's sort of a broad question.   can you narrow it some?

Author Comment

ID: 1179783
The Compiler I am using is MS VC++ 5.0.

I have programmed a bit in VB 5.0 and each control: buttons, edit boxes, text boxes, and list & combo boxes, on each of these the programmer can set the font attributes such as:
* size
* bold
* type of font(times roman, courier, or ms san serif)
* foreground color
* background color

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 22

Accepted Solution

nietod earned 450 total points
ID: 1179784
Some of these features can be set in a regular windows control using the WM_CTLCOLORXXX messages  (there are several with different "XXX"s).  These allow a parent window to control the color and fonts used in its child control windows.  These are easy to use, but they have limitations.  If they work for you, use them.  Otherwise, you need to sub-class the window controls and write your own procedures for drawing them.  This is quite hard to do.

Take a look at the control color messages and ask if you have questions.

Author Comment

ID: 1179785
OK that worked, but my buttons won't change color.
LVL 22

Expert Comment

ID: 1179786
Yeah, standard buttons don't seem to use this message system for much.  For those you need to sub-class, if it is important to you.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 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