DirectX windowed blitting WITHOUT a window?

Started by
4 comments, last by SikCiv 23 years, 9 months ago
Ive seen some apps, including WinAmp blit to the desktop without using a standard window, some even arent rectangular. Im sure its easy to do without the use of DirectDraw, but my app uses DirectDraw and I need to blit a DDraw surface with a non rectangular blit (using a colorkey) to the screen *with* automatic clipping (using a DirectX Clipper object). This is easy using a standard window, all u do is attach a clipper object to the wHnd of the app, but my app wont have a window, its just blitting to the desktop. How do I attach a clipper object to my app? Can I just supply the apps current rect, or can I create an invisible window and attach a clipper to it that way?

  Downloads:  ZeroOne Realm

Advertisement
You won''t be able to do that. You need to have a window to init DX, however you may be able to get away with using the desktop window for your window. I think there''s an API GetDesktopWindow, which will return the hWnd of the desktop. Then you *may* be able to attach DirectX stuff to it and init DirectX with it... Why do you want to use DirectX on the desktop? You could just use BitBlt if it''s just for a simple logo or something...

Anyhow if you think you can attach a clipper object to the Desktop using it''s hWnd then have fun! I''d be interested to know how it turns out.
- Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
So if DX needs a hWnd to attach to, can I make the apps window invisible?


My problem with attaching DX to the desktop is that the user will not be able to switch to other apps,due to the lack of a clipper...

  Downloads:  ZeroOne Realm

I''m no expert on the subject, but I think overlays might solve your problem. The only problem with overlays is that it''s not supported by all video cards.





ByteMe95::~ByteMe95()
ByteMe95::~ByteMe95()My S(h)ite
What makes you think WinAMP doesn''t use a window? Windows applications must have a window to process messages (ignoring console apps, which WinAMP obviously isn''t) - and WinAMP does, because it shows up on the tasklist.

What WinAMP does it draw everything itself, including non-client areas (the window border, etc) - if it has them. It''s quite possible that it is just a borderless window, too

You can make non-rectangular windows using regions - start with looking at the SetWindowRgn Platform SDK function.

TheTwistedOne
http://www.angrycake.com
TheTwistedOnehttp://www.angrycake.com
Wasnt there a demo in the DirectX SDK with a mosquito that flies around the desktop? It was an irregular shape and had no ''window'' look.

Shrapnel Games

This topic is closed to new replies.

Advertisement