Programming outside of window's windows

Hello All, and I just had a question about how this little gadget works, and how it can work outside of a window. The program is a Clippy prank that runs outside of Microsoft Word, but it runs outside of a window. The address of it is:

http://www.rjlpranks.com/pranks/clippy/

I've also seen this in linux too, with a little penguin on the bottom of the screen. So how exactly would you do this? I don't really care about the pop-up window, I just care about how to break the window barrier. I was thinking about trying to program it like it was outside of windows, like an OS, but that seems like overkill to me. Thanks!
Oh, and the program does allow you to interact with windows when clippy shows up.
I haven't looked at the page, but going on what you are describing, I'd say the program is just creating it's own window, giving it the "always on top" property, and not giving it any border/menu/etc so it can be freely drawn.
Ok, I get what you're saying, but that still doesn't explain why the window border cannot be seen at all.
Sure it does. Just create the window with no border. It won't draw a border if the window doesn't have one.

Look up CreateWindowEx on MSDN and look at all the window styles.
Look up non-rectangular windows. What you see is a window indeed, just not a rectangular one.
I can see Clippy's using WS_EX_LAYERED to escape Office's main window.

From MSDN's "Windows Features" entry:
http://msdn.microsoft.com/en-us/library/ms632599%28v=vs.85%29.aspx

Layered Windows

Using a layered window can significantly improve performance and visual effects for a window that has a complex shape, animates its shape, or wishes to use alpha blending effects.

Andy

P.S. Any Linux type who are reading this and feel left out, there is always the Linux "port" of Clippy: http://vigor.sourceforge.net/screenshots/

P.P.S. I found vigor while trying to track down an open source clippy-esqe "assistant": I was thinking about using it with an educational program for young kid's (first few years of primary/elementary school). Didn't manage to find one, so if you ever come across one!
Last edited on
Ok, I'll look into them. Thanks!
Topic archived. No new replies allowed.