when u go to sum sites u see those Flash adverts...the ones in which pictures float over your screen and stuff...they aren't confined to a window or anything...obviously the flash player must be calling sum APIs but how would i go about doing sumthing like that myself? i cant find any APIs that would let me do that...
It is just pure evil!
It is just pure evil!
Does that mean that it is probably JAVA and not asm (a little evil would be C++) :grin:
writing to the desktop itself is not such a problem, i create a compatible DC, load a bitmap into it, get a DC for the desktop window, then perform a BitBlt from the memory DC to the desktop...the problem arises when i try to refresh the desktop
i tried getting the desktop handle and then calling InvalidateRect, but this seems to have no effect at all...i need to know how i can create the effect when u right click on the desktop and choose 'refresh'...
thanks
i tried getting the desktop handle and then calling InvalidateRect, but this seems to have no effect at all...i need to know how i can create the effect when u right click on the desktop and choose 'refresh'...
thanks
Those advertisements are confined to a window, you just don't see it. They use javascript to create a new browser window, specifying no border or title bar.
So if you wanted to achieve the same effect in your program, you would do the same. Create a completely empty window.
So if you wanted to achieve the same effect in your program, you would do the same. Create a completely empty window.
...the problem arises when i try to refresh the desktop
invoke SHChangeNotify, SHCNE_ASSOCCHANGED, SHCNF_FLUSH, NULL, NULL
Is it floating over the whole screen or just inside the browser window?
Those advertisements are confined to a window, you just don't see it. They use javascript to create a new browser window, specifying no border or title bar.
So if you wanted to achieve the same effect in your program, you would do the same. Create a completely empty window.
thanks, that does the trick...only problem now is to figure out how to draw non-rectangular bitmaps...a program that could do it would be nice but if not i guess i would just have to use paths, fill them and save that to a bitmap file, leaving sum pixels 'undefined'...
thanks
comrade,
yes it floats over the whole screen, it can do that because the window is maximized and if u get a handle to the window DC u can use BitBlt to write a bitmap anywhere on the window :grin:
It Internet Explorer window is NOT maximized, can it float outside IE window?
i dont know abt that but i guess its more complicated than just setting the window mode to transparent :mad:
i tried it but when i try to move the bitmap around the screen, it doesnt work as expected
my approach is to invalide the whole screen using invalidaterect, whenever i drag the bitmap with a mouse...i can drag it but the problem is with updating the screen...i thought since the window was transparent, the stuff below it would just get drawn instead when InvalidateRect is called...but in reality it uses a brush to paint the client area, so that its no longer transparent...now what??
:confused:
i tried it but when i try to move the bitmap around the screen, it doesnt work as expected
my approach is to invalide the whole screen using invalidaterect, whenever i drag the bitmap with a mouse...i can drag it but the problem is with updating the screen...i thought since the window was transparent, the stuff below it would just get drawn instead when InvalidateRect is called...but in reality it uses a brush to paint the client area, so that its no longer transparent...now what??
:confused:
nm figured it out!!!!! i wasn't using the proper flags in the arguments to RedrawWindow!! thats a big hint!!!
and comrade, i *think* it mite be possible to use my method to do it even without the window being maximized and transparent...but of that im not too sure...i will have to see
i'll post sum code shortly
and comrade, i *think* it mite be possible to use my method to do it even without the window being maximized and transparent...but of that im not too sure...i will have to see
i'll post sum code shortly
thanks, that does the trick...only problem now is to figure out how to draw non-rectangular bitmaps...
You still need a rectangular bmp, but you can use SetWindowRgn to give the containing window a shape.hmm...i've moved a little past where i was, but not much
before i can worry abt non-rectangular bitmaps, i need to tackle this one annoying problem that has popped up
dl this zip file, it has the source code + .exe
http://members.aol.com/anotherway83/weird.zip
to run it, u launch the program, then left click once anywhere...this will draw the bitmap at the top left...after that, u right click anywhere and the bitmap will get drawn there...to close the program, u left click again
things seem fine when the distance between right clicks is larger than 250 pixels (thats the width of the bitmap)...but if its any less (in any direction), then only that part of the bitmap which does not overlap the area where it previously was, gets drawn correctly...the rest does get drawn, but the pixels are combined in such a way that whats below gets shown...just see it for yourself, i cant figure out how to get around this problem
and here is what i am after:
http://www.pagetraffic.com/guide/flash-sample-popup.html
before i can worry abt non-rectangular bitmaps, i need to tackle this one annoying problem that has popped up
dl this zip file, it has the source code + .exe
http://members.aol.com/anotherway83/weird.zip
to run it, u launch the program, then left click once anywhere...this will draw the bitmap at the top left...after that, u right click anywhere and the bitmap will get drawn there...to close the program, u left click again
things seem fine when the distance between right clicks is larger than 250 pixels (thats the width of the bitmap)...but if its any less (in any direction), then only that part of the bitmap which does not overlap the area where it previously was, gets drawn correctly...the rest does get drawn, but the pixels are combined in such a way that whats below gets shown...just see it for yourself, i cant figure out how to get around this problem
and here is what i am after:
http://www.pagetraffic.com/guide/flash-sample-popup.html
http://www.pagetraffic.com/guide/flash-sample-popup.html
That effect will only work on some browsers.
That particular effect is done by positioning the flash movie within an HTML block element, and using a DOM manipulating Javascript, move it around the page. The movement is confined to the browser window. This behavior is specific to the browser and has nothing to do with Windows.
It sounds like you want to do the same thing, but without having it confined it to a window. There's a similar program by Spanksta on Icezelion's site. Hope it helps.
http://spiff.tripnet.se/~iczelion/files/Sprites.zip
thanks iblis, thats exactly what i was looking for....will look thru that code now