| DaKocha (8) | |
|
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. | |
|
|
|
| modoran (1245) | |
|
Please read this to understand how it works: http://msdn.microsoft.com/en-us/library/ms997507.aspx | |
|
|
|
| DaKocha (8) | |
|
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. | |
|
|
|
| modoran (1245) | |
|
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 | |
|
|
|
| DaKocha (8) | |
| Thanks, I'll look into that. | |
|
|
|
| DaKocha (8) | |
|
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 | |
|
|
|
| EssGeEich (1007) | |
| What about DevIL? http://openil.sourceforge.net/ | |
|
|
|
| Krzysztof Kawa (3) | |
|
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
|
|
| DaKocha (8) | |
|
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 | |
|
|
|
| EssGeEich (1007) | |||
|
@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:
| |||
|
|
|||
| DaKocha (8) | |
|
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! | |
|
|
|
| EssGeEich (1007) | |
| 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? | |
|
|
|
| DaKocha (8) | |
| For Win7? | |
|
|
|
| EssGeEich (1007) | |
|
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
|
|
| DaKocha (8) | |
|
Aight then. I'll try things out and post results here. | |
|
|
|