help picking free GUI library in C++

Started by
5 comments, last by moeron 18 years, 7 months ago
I need a free GUI library that will allow me to grab and use the hwnd of a window or certian frame, and if possible as a second request, for it to be as multi platform as possible. Ive been looking through alot of free C++ gui libraries, and I cant tell which ones will give me direct access to a window or frame's hWnd. I need to be able to use the hWnd to display out put from a 3d engine that i have alot of code working with already.(the Revolution 3D engine)Not from a 3d engine that comes inside the gui library.
Advertisement
I don't know much about GUIs but I think that wxWindows is what you are asking for (and it's multi plataform, even with that name :p).

But I think that's a little heavyweight for games... :x
I'm working on something like this... the "cross-platform" compatibility is the tricky part, actually.

A good idea is to use a static member function of a globally-known class type... like a Window finder. You could make it a policy class, which would allow for multiple-platform support.

eg Policy class:

class Win32Find{
// etc...
static HWND find(int key); // or some other key value
};

Plug that in as a template parameter to your WindowFinder template, and then typedef it

typedef WindowFinder<Win32Find> Win32WindowFinder;

Then, within your Win32-specific code, you'd call:

hwnd = Win32WindowFinder::find(0);

Or what have you.

The trick is to know the type of your window finder, so that you can actually call the static function. Sometimes you can pass that (Win32WindowFinder) as a template parameter to other classes, and then reference it later.

Just some ideas... incase you were crazy enough to want to do this your self

[smile]
my_life:          nop          jmp my_life
[ Keep track of your TDD cycle using "The Death Star" ] [ Verge Video Editor Support Forums ] [ Principles of Verg-o-nomics ] [ "t00t-orials" ]
Original post by k0ns0l3
(and it's multi plataform, even with that name :p).

Its current name is actually wxWidgets. ;)

Qt is also a possibility, if the GPL license is ok with you. Both have their advantages and disadvantages, depending on the way you look at them.


Hope this helps.
Has anyone seen JavaCoolDude's XML GUI Library for opengl window modeling? It's really cool. I wonder if there's any GUI libraries like that, that use XML to draw it out, that'd be really neat.
Hum... I heard Qt had to be payed for being used in commercial projects.. But I can be mistaken... and I usually i'm! :p

The idea that I had was that wxWindows was the current name and wxWidgets was the old name... :P
The only thing gui related I used was wxHaskell (wxWidgets binding for Haskell) and Swing, so.... And I tried to use XPCE for Swi-Prolog, but... I dropped that idea... :P
Quote:Original post by k0ns0l3
Hum... I heard Qt had to be payed for being used in commercial projects.. But I can be mistaken... and I usually i'm! :p

The idea that I had was that wxWindows was the current name and wxWidgets was the old name... :P
The only thing gui related I used was wxHaskell (wxWidgets binding for Haskell) and Swing, so.... And I tried to use XPCE for Swi-Prolog, but... I dropped that idea... :P


Yea Qt does cost if you plan to release a project commerically. But the previous poster alluded to that by mentioning its free if you use it solely according to the guidelines of the GPL (GNU Public License).

Hope that clears it up a little,
-moe.ron

moe.ron

This topic is closed to new replies.

Advertisement