Solved

Changing a objects looks

Posted on 1998-12-09
6
188 Views
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
0
Comment
Question by:DanielJenkins
  • 3
  • 2
6 Comments
 

Expert Comment

by:plsbctv
Comment Utility
What compiler and library are you using?
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
That's sort of a broad question.   can you narrow it some?
0
 

Author Comment

by:DanielJenkins
Comment Utility
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

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 22

Accepted Solution

by:
nietod earned 150 total points
Comment Utility
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.
0
 

Author Comment

by:DanielJenkins
Comment Utility
OK that worked, but my buttons won't change color.
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now