Sign in to follow this  
Prozak

UI from scratch using GDI+

Recommended Posts

Does any of you think it is possible to create a UI from scratch, using just GDI+ and perhaps DEVIL for the Font and Render code? (btw, this is not and in-engine UI, this is a windows interface) I've been given the responsibility of creating a base Library for some of our future applications. The keyword that seems to be going around is "WinAmp". Does WinAmp use any specific library for its UI? I'm thinking of going with simple dialogs, mouse and keyboard input events for click, double-click and hover, and basically trying to simulate some of Window's Window-handling code. So, any thoughts, tips?

Share this post


Link to post
Share on other sites
For the love of god, don't change change the look'n'feel of a Windows application! Skinned apps are a thing of evil! :)

However, if you really must, it's pretty easy: Create some control, say a button, and capture it's WM_PAINT messages in the message pump. Then draw your own stuff using GDI+ or whatever. This is what Windows does, at some low level.

If this is not good enough, you can also create your own controls. Just create blank windows and handle every message thrown at it.

Share this post


Link to post
Share on other sites
Sure it is possible, why wouldn't it be? Many systems, such as Java Swing, and Mozilla do all their own GUI drawing.

It is monotonous and require a *lot* of work and debugging, but not difficult.


A much easier alternative is to just use Windows functions for skinning functionality.



For the main window you can just do simple window skinning with an image plus a region. The first result on Google is this tutorial, and several other sites look useful, too. Buttons can be similarly skinned with regions and placed with details in a skin file, or simply use background images on themselves.


You might want to remind your boss that many people hate skinned applications and prefer they look the same as every other window application. If they're running their own skin manager, they can get upset when your application doesn't follow the expected rules.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this