Hi + Window Q's

Hi Everyone,

I recently came across juce and it may be just what we’ve been looking for for a cross-platform app (far from audio though). Hats off to Jules and all who are making this gem possible! From what I’ve seen so far it’s very impressing.

On to the question about DocumentWindow / ResizableWindow:

  1. Is it possible to create a desktop window with (semi)transparent background? Under Win32 it currently throws an exception - haven’t fully debugged it yet though.

  2. Can we have a full screen desktop window with no window decorations or tittlebar?

We are working on a medical app and really need these features, especially the latter.

Sorry if this has been discussed before, I couldn’t find anything on this.


Hi there spiderman, glad you could take a break from fighting super-villains to come and join us.

Well yes, it’d work, but will redraw very slowly on win32 when the window is big, because of the dumb way that windows handles transparency. The DocumentWindow class isn’t really designed to do transparency, as it fills itself with solid colour.

But if you’re after a full-screen undecorated window, you could just use a normal component, rather than a ResizableWindow, and make it full-size. That’d be fine.

Or maybe what you’re after would be a fixed transparency for the whole window? Win32 can do that, though I’ve never written anything to use it. If that’s a feature that you wanted, it’d probably be possible to add it to the ComponentPeer class.

… just download and open JUCE.chm help file. See the DocumentWindow (Component, ResizableWindow) index for functions that correspond to your needs:

  1. to get rid of a title bar, you have to create a simple component and to add it to your desktop (addToDesktop).

  2. setDropShadowEnabled (false); //to get rid of the shadow effect (DocumentWindow)

  3. setBackgroundColour (Colour(xx, yy, zzz ).withAlpha(.5f)) //to make your document window semi-transparent (ResizableWindow)


Actually super-villains are hard to find these days, so now I fight bits and bytes and electrons. Lot more of them and lot more predictable.

Well, really the FS window would do fine, we can certainly live without transparency, which would be mostly for a non-rectangular main container/window (e.g. with very rounded corners). I can imagine the hassle and also the cross-platform issues.

Okay, so instead of an explicitly initialised Resizable (setBackGroundColor) can I use a Component for the desktop and pack other (any?) omponents inside of it, like menus / toolbars etc??

Sorry if the questions are too novice, I’ll try to get up to speed.

Ptomaine, thanks for the info, going to check them out.

If you were inclined to peruse the ResizableWindow code, you’d learn that it is just a custom Component (and in fact pretty much everything you can create for the screen in Juce is too).

It’s a Component that draws a title bar at the top, handles logic for resizing/maximising etc., and has a big fat space to hold your main window content - which would of course be a Component of your own design (which in turn would hold a bunch of other things). It’s very handy indeed, but there’s nothing ‘special’ about it - it’s just a Component that’s been designed to fulfil the task of making a ‘standard’ window.

We normally use ResizableWindow/DocumentWindow as a main app component base because that’s the type of interface we normally wish to have. If however you had no need for the window trimmings, you can simply create your own Component to your specifications. To clarify the point one final time, the application does not base itself around the ResizableWindow - we just tend to choose the ResizableWindow as the base Component for our application.

Simply design a Component to appear and act as you wish it to, and create it (and add it to the desktop) in your JUCEApplication subclass’ initialise() function. You’ll want to keep the docs handy too!

Good luck with your endeavours, I’m sure you’ll find Juce most refreshing and enjoyable to work with.