Window transparency without titlebar transparency?

BlitzMax Forums/MaxGUI Module/Window transparency without titlebar transparency?

ryanmsmith(Posted 2006) [#1]
Can MaxGUI make a window transparent without making the titlebar transparent? The easiest example of what I'm asking for is OS X's Terminal program when the background is set to be somewhat transparent - the titlebar is not affected. When I use SetGadgetAlpha on a window in BMax, the titlebar is also made transparent.


Dreamora(Posted 2006) [#2]
No you can't without adding such functionality to the module yourself.

And just as sidenote: Alpha only works on OSX, in case you plan to do crossplattform.


WendellM(Posted 2006) [#3]
Ahh, so that's why SetGadgetTransparent is included. It doesn't do anything in Windows, but works nicely (for windows and panels, anyway, but not buttons) in MacOS... It would be handy to have mention of that in the docs, along with a list of which gadgets it works with.


Punksmurf(Posted 2006) [#4]
I didn't even know about that command, but why doesn't it work under Windows? Ever since Win2K came out, window transparency shouldn't be a problem...


Dreamora(Posted 2006) [#5]
The problem is that the current windows module is targeted at Windows 98 not Windows XP. For that reason we are restricted to long outdated stuff (the used TextArea shows that as well ...). If you want to have newer technology you will need to implement it yourself.

Another reason is, that the UI system itself has no graphics hardware accelerated gadgets on Windows < Vista, for that reason, using alpha has a serious impact on most systems ... you can do it through graphics driver but it won't make the user happy normally :) Vista only has graphics accelerated UI, which is why it wouldn't be a problem there at all.

(and just before anyone mentiones those nice funny graphics overlay things like windowblinds, object dock and the like: Those use a hardware graphics overlay to the desktop, so they disable the regular stuff normally and draw their own hardware accelerated stuff above the desktop)

Don't ask me why it isn't mentioned in the docs to be OSX only in its current state (to make this happen btw, the OSX 10.1 and 10.2 support was dropped, unlike windows where officially dead declared horses sadly still are enforced). perhaps it was meant to be implemented on Linux / Windows side as well.


Punksmurf(Posted 2006) [#6]
The problem is that the current windows module is targeted at Windows 98 not Windows XP. For that reason we are restricted to long outdated stuff (the used TextArea shows that as well ...). If you want to have newer technology you will need to implement it yourself.


Why is that so? BlitzMax is targeted at XP, so it would be nice but not required if it wouldn't run on Win98. Well, at least, I wouldn't miss it. Who uses Win98 anyway?

Another reason is, that the UI system itself has no graphics hardware accelerated gadgets on Windows < Vista, for that reason, using alpha has a serious impact on most systems ... you can do it through graphics driver but it won't make the user happy normally :) Vista only has graphics accelerated UI, which is why it wouldn't be a problem there at all.

To me it seems that XP uses hardware acceleration for the GUI. If you do not install your graphics driver, the gui builds really slow but once installed there's no noticable slowdown. Why would installing the driver have an effect on the rendering of the GUI if it doesn't make hardware acceleration possible? Plus, on my old system (xp2400, 2ghz, 1gb ram) there is no visible slowdown when I have loads of transparent windows open. I have a fairly large display (1920x1200) so that SHOULD slowdown if it was not accelerated.

Well, at least that is what it seems to me, but I do not have any technical knowledge. So, please tell me where I'm wrong :)

(and just before anyone mentiones those nice funny graphics overlay things like windowblinds, object dock and the like: Those use a hardware graphics overlay to the desktop, so they disable the regular stuff normally and draw their own hardware accelerated stuff above the desktop)

I don't have any of that fancy stuff.

Furthermore, where is this SetGadgetTransparent function? I did a full text search on my BlitzMax folder (fully sync'ed) but I cannot find it. Also, bMax throws a compile error when I try this function: Compile Error: Identifier 'SetGadgetTransparent' not found
(On WinXP, that is).

Edit: ah, that should be SetGadgetAlpha. Looking at the .max source, it should be possible to set the alpha of a panel in windows but it doesn't work. Didn't look at the underlying stuff tho'.


Dreamora(Posted 2006) [#7]
No it wont work.
As SetGadgetcolor does not work as well (outside Panels from what I know).

And why it is targeted at Win98+ not XP+ ... don't ask me. I would assume because there are still Windows user here trusting in stone age, long dead and since over 6 months officially abandoned OS ...
Actually I dislike the dicision that we (ie the rest of the users that do not follow the believe missassumption that XP = bad) have to suffer due to the support for something that is not used on system that are needed for usefull Max2D usage anyway (ie real 3D hardware)