Any GUI library which is highly customizable and supports translucent windows?

Hello community, is there any GUI library which is highly customizable and supports translucent windows?

I tried WS_EX_LAYERED in winapi (for translucent windows) but ended up confused and annoyed.
I also tried juce but I'm lost there for some reason.

I'm an absolute beginner in this language (c++, used to program GUIs in Java with swing). And I use dev-c++.

Any good pointer is appreciated. And oh, wish you all a very happy new year :)

Regards,

DK.
Please read this to understand how it works:
http://msdn.microsoft.com/en-us/library/ms997507.aspx
Thanks for the link. But could you suggest some API with higher level of abstraction and with *.png files loading support?

I really need this because I need to do alot of drawing and therefore cant use C# or Java.
You use GDI+ API to load *.png files (and other image types).
http://msdn.microsoft.com/en-us/library/windows/desktop/ms533798(v=vs.85).aspx
Thanks, I'll look into that.
Hello again! I googled a bit but could'nt seem to find a snippet or two about loading *.png and stuff into GDI+.

Could you provide one?

Regards,

DK
What about DevIL? http://openil.sourceforge.net/
Hi, since you are a beginner I'd suggest switching to a modern IDE like Visual Studio or QtCreator, because dev++ is horribly outdated and includes an ancient version of the compiler.
I discourage you from trying to use apis like Win32 or GDI+ at least at your beginnigs with C++. Those are things of the past. We have a lot of modern ways to write UIs.

If you look for a simple, yet powerful and modern C++ GUI toolkit (swing looks like a cheap toy in comparison) then I suggest Qt ( http://qt-project.org ).
Last edited on
Thanks for the suggestions guys, but my Qs. are, would I be able to do BitBlt() with that DevIL thingee(with alpha bit ofcourse)? Or write translucent UI with per-pixel alpha-blended see-thru translucency with Qt?

Well, actually, fast internet connection is a problem here :-P that's why I resorted to dev-c++ for c++, MonoDevelop for .NET, and good old cmd tools for Java :-D

Replies appreciated :)

DK
@Krysztof Kawa:
There is an updated version of Dev-C++, it's called Orwell Dev-C++ (in constrast of Bloodshed Dev-C++) and it can be found here:
http://sourceforge.net/projects/orwelldevcpp/
I suggest DaKocha, anyways, to use this instead of the Bloodshed one.

DevIL ONLY Handles the loading of a image. An example of loading an image with alpha channel included is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ILuint Image = ilGenImage();
ilBindImage(Image);
if(!ilLoadImage("Image filename here"))
    // Cannot load!
ILuint Width = ilGetInteger(IL_IMAGE_WIDTH);
ILuint Height = ilGetInteger(IL_IMAGE_HEIGHT);
unsigned char Data = new unsigned char[Width * Height * 4];
ilCopyPixels(0,0,0,Width,Height,1,IL_RGBA,IL_UNSIGNED_BYTE,Data);
ilDeleteImages(1,&Image);
Image = 0;

// Use Data as a R8, G8, B8, A8 array.
// Data[0] = First pixel, red component
// Data[1] = First pixel, green component
// Data[2] = First pixel, blue component
// Data[3] = First pixel, alpha component

// Data[ (Width * Height * 4) - 1] = Last pixel, alpha component

delete[] Data;
Data = 0;
Thanks EssGeEich, I'll use that instead :D cant afford BIG downloads here.

AND so, I've to manually set each pixel then? Nifty steps :) gonna give a shot ;)

See ya round fellas!
Well, if you use the new Microsoft's D2D1 (Only for Vista SP2+), it's hardware accelerated and it's easy as drinking a glass of water. OT: Can you drink glass?
For Win7?
Yeah, for Windows 7 I think it requires SP1. Anyways I tried it on my W7 PC and it works perfectly. I made a Desktop game, with 32-bit transparency, Image loading from DevIL, and physics from Box2D which is about dragging object around and making them collide.
I use DevIL from a lot of times anyways, it's really useful.
Last edited on
Aight then.

I'll try things out and post results here.
Topic archived. No new replies allowed.