Archived

This topic is now archived and is closed to further replies.

DirectX windowed blitting WITHOUT a window?

This topic is 6356 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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()

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites