Is there code or an App to add skins to a program ?

Posted on 2000-04-20
Last Modified: 2010-04-02
Would like to add a nice skin to an visual C++ 6 source. Possible ?
Question by:peter_b
  • 3
  • 3

Author Comment

ID: 2752580
is there something wrong with this question ?
LVL 22

Expert Comment

ID: 2755514
I don't think anyone knows what you mean.   I don't.

Author Comment

ID: 2755609
oh ok then its good you say so. There are applications that dont look like regular windows. The buttons are different or they have different borders and colors. I thought this is called a skin. I think theres a program called windowsblinds that changes theappearance of windows itself.I would like to add such a skin to a program.  
Independent Software Vendors: 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

Expert Comment

ID: 2755728
>> I thought this is called a skin.
There is a term "wrapper"  but that still isn't what you are talking about.

Do you wish to write a program that has a different look?  that isn't too hard to do.

Do you wish to write a program that makes all windows look different?  That is hard to do, and strongly discouraged  (It may make other programs crash or work bizzarely.)

Author Comment

ID: 2756334
hmm am i really so un-understandable :/
I have an App. The app looks ugly, its simple windows style. I would like to "wrap", if thats the right word, its appearance.

>>that isn't too hard to do

for you ! For me as a beginner i need some example code. Dont want to write any for me just point me to a "howto" if you know one.


LVL 22

Accepted Solution

nietod earned 50 total points
ID: 2757628
How you go about this depends on what you want to change.  But you either need to write new window classes that have the look you want or you need to sub-class or super-class existing window classes to alter the way the behave  

For example, if you wanted to create a push-botton with a unusual look.  You coudl write a window class from scratch.  (Note in this entire discussion, the word "class" has nothing to so with the C++ term "class", it is used to describe the window classes (window procedures and other information that windows OS records for a windows application.)   You woudl have to write a new window procedure for the class and register the class and window procedure using RegisterClass().  The window procedure would have to do almost everything required of a pushbutton.   i.e. it would have to handle the WM_PAINT message and draw the button at that time.  it woudl have to handle WM_MOUSExxxx messages and make the button respond to the mouse.  it would have to handle keyboard messages so the button could be "presssed" with the keyboard.  etc etc etc.  its not hard to do, but it is a lot of work (I know.)

An easier approach may be to super-class an existing window class.  When you super class, you again register a window new class, but you also use GetClassLong() to get a pointer to the window procedure of an existing window class.  Then you new window procedure handles some messages itself, messages that it wants to have a unique behavior for, and for the rest of the messages, it passes the message onto the window procedure  ot obtained the pointer to.  So for example, for a button with a custom appearance, but that responds to the nmouse just like other buttons, you could super-class the regular windows push button class.  For the WM_PAINT message you could handle the message yourself, but for mouse messages, you could pass the message onto the regular push-botton window procedure so they get handled just like other buttons.  This is theoretically less work, but it doesn't always work well, because you don't always know the behavior of the default window classes well enough to make use of them.

These concepts are covere in most introductory windows programming books.  Like "Programming Windows".  I woudl recommend you get one or two and read them.  (One probably isn't enough and a single read through is probably not enough.)

Expert Comment

ID: 2882865
Check out ActiveSkin ( or StyleSkin ( Reuse, reuse, reuse. If you do happen to come up with your own set of C++ classes for skinning, please let me know.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
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 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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

679 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