I may seem to be a newbie here, but I am an advanced C++ Programmer, and have C++Builder 6 Ent and Delphi 7, and have been programming for a few years.
Basically, I just was curious as to how or if it were possible to create skinnable applications, like Opera, Mozilla, media players, and MSN Messenger, are using these?
I have been focused on creating network/security/database management applications, and do know C++ fluently (C and Pascal also).
I have been using them (from CBuilder 2) and well I doubt that they can do this but if not, what kind of program allows this kind of use? I am expecting to find answers suggestion vb, and well I don't really mind.
I want to create a different kind of application (during my spare time, when I am not doing it for work) to put on my website for free use.
Anyhow, any help is appreciated, and all suggestions totally welcome.
Of course it is possible.
The key to creating a skinnable app will not be in the language/library you use, but in the overall design of your program.
You have to separate out very clearly the functionality of the program from its user interface. If the interface simply sends well defined commands to the job ("open a file", "give me the text", "save this text"), then you can have the GUI be responsible only for drawing itself, responding to user input appropriately (button clicks, etc), sending commands, and then updating itself when the job's state changes.
A very broad suggestion, I realize, but basically, if you have a good OO design, and the GUI and job layers are not allowed to mix except through the sending of commands and updating state, then the GUI can draw itself however it pleases without the functionality of the program ever knowing.
Oh clever... but how do they then get animated buttons and so on? Surely C++ Builder and Delphi both do not provide things like that.
I have tried using Gifs, but they do not seem to work, and even swapping image states via the OnClick events, and well they don't work.
I understand what you mean by seperating the program from its UI, but well it doesn't seem possible.
A good example is InstallShield Developer 8, which does seem to do what you have suggested.
(Shots below are taken from Mudsplat | Veritas Installation)
InstallShield Skinned :
InstallShield Default :
Everything I do create is shown like the default screenshot, and well how to convert it so that the buttons and scrollbars, so on, alter is completely baffling.
I am not sure though how to allow a program to "draw itself", could you explain what you meant a little more?
I've researched into this a bit more, and well basically, it seems the best way to go about it would be to create my own form component, which will hopefully not be too hard.
When I am done, I'll post it up for y'all, so you can download it freely. Fingers crossed it should be done in a few days or so.
I think I remember seeing a TSkinnableApp component in Delphi, but its been a while since I've done much with VCL, so I can't remember where (if I find it, I'll post a link).
>> I understand what you mean by seperating the program from its UI, but well it doesn't seem possible.
Well, it can't completely be separated, but if you have gui->program communication done only through a command interface, and program->gui communication done only through an event interface, then they've been separated out quite well.
If you then have the gui responsible only for drawing itself (on the screen), passing commands, and updating itself in response to events, then you could simply pass to each widget you create a structure telling it: this is how you have to look now.
Especially with VCL, you could store property values to a file, and then read them back as different skins.
Anyway, probably more general than your looking for, but something to think about at least.
hmm, thanks for the reply, fingers crossed, all should be done relatively soon.