Hi!

Someday I wondered if one could create a window with an arbitrary angle on the screen, for example it would be cool to "grab" it with the mouse and to make it spin around point like if it was "pinned" on the screen...

I know its possible to make a window with arbitrary shape, i ve seen it, it must use a transparence mask, for example a circular window, included in a square but one desnt see the square coz its transparent. (maybe even alphablending with the rest of win screen? kewl!)

The next step is: can we update this transparency mask on the fly while the application is running?
So we would draw the real nonrotated window offscreen (with the gdi i think its possible) then get this bitmap, copy it to a surface or sthg like that, rotate it or do some effects like stretching, tearing) , compute the transparency mask(everything outside the bitmap) and feed the copy it to another bitmap and feed this bitmap plus the transparency map to windows for displaying, all this each time window must be redrawn.

If its not possible to upddate the shape, maybe by getting the screen DC its possible to see whats "behind" our window , and use it as a background image for our picture?

Moreover, with a rotated window it would be cool to still be able to click on buttons, etc.
would there be a way to intercept mouse messages before they come into window procedures, or maybe to modify the coordinates of mouse events depending on the angle?

tell me what you think of it!
i m new to win

if its possible i would love to have my apps bouncing, trembling, exploding across the screen:)
Posted on 2003-11-19 14:11:23 by HeLLoWorld
Yes its possible!!

This demo has a starting window that does redimensioning "on the fly"!
http://www.pouet.net/prod.php?which=9461

(and has some interesting bugs showing that the mask bitmap is not the same as the image bitmap: just put the window past the border of the screen and see...)




Has somebody already done what I am talking of, with normal gdi windows displayed after transformations??
Posted on 2003-11-20 03:07:03 by HeLLoWorld
still nobody intersested, huh? :)
yeah, I m talkin alone to myself here:), so I think I ll have to code it myself, and it ll be amazing!... (hum, youll have to wait several years before I manage it hehe)
Posted on 2003-11-21 11:32:52 by HeLLoWorld
Well, I never did something like this in asm, but it's possible.. You have to create a Region, and then you use SetWindowRgn to make it transparent. I don't know whether it work's "on the fly" so you can rotate the window (you would have to redraw the window every time), but it should work..

yaXay
Posted on 2003-11-21 14:59:29 by yaXay
Im not sure, but I remember that in this board I see sometime ago, a post that have the (negate) best (not best... worst???) look of the application, that consist in put the toolbar in a diferent angle and 'xtrange' things like that..... O think that can help.


Nice day or night.
Posted on 2003-11-21 17:46:07 by rea
I'm pretty sure I've seen this done before. Or maybe it was Internet Explorer bouncing around the screen.
Posted on 2003-11-21 19:07:11 by drhowarddrfine


:alright:
Posted on 2003-11-21 20:29:41 by iblis
Thank you for the hints!
Posted on 2003-11-24 11:10:52 by HeLLoWorld