Solved

Changing a objects looks

Posted on 1998-12-09
6
191 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
ID: 1179781
What compiler and library are you using?
0
 
LVL 22

Expert Comment

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

Author Comment

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

0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 22

Accepted Solution

by:
nietod earned 150 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.
0
 

Author Comment

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

Expert Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

810 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