Jump to content
  • Advertisement
Sign in to follow this  
wi2fish

Getting the desktop bits

This topic is 4881 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

Hi everyone, I have a goal, and that is to get the whole desktop at a rate of 30FPS. For a desktop with two monitors, that's around 10MB and I didn't succeed so far. Currently I'm doing something like hdc = GetDC(NULL); // Get handle to desktop hdc_c = CreateCompatibleDC(hdc); SelectObject(hdc_c, hbm_mybitmap); BitBlit(hdc_c, ...., hdc, ...); // Copying the data once GetBitmapBits(hbm_mybitmap, mydata, count); // Copying the data a second time Could I do that faster with directx? Could I do that faster with win32 api? Please reply also if you know/think there is no faster way. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
An important question for you to answer I think would be what is it that you actually want to do with the desktop information? That answer could possibly aid in us helping you determine the best way to do what you want at sufficient speeds.

Share this post


Link to post
Share on other sites
Hi,

the functionality shall be similar to VNC (Virtual Network Computing), which displays the desktop of one computer on another one.

For this I have to get the screen buffer, compare it to a stored copy and transfer the difference.

(That's one part... Another one would be to display a 1280x2048 screen, that is an extended desktop, on one smaller window, e.g. 480x640, with zooming & panning & so forth.)

Share this post


Link to post
Share on other sites
Interesting. Unfortunately I have not heard of a way to capture the desktop, other than going through GDI. Hopefully, in Longhorn, this will change, since everything will be WGF-based, anyways. That would make for some cool projects - for one, a faster VNC. It may make for some pretty cool 3D desktops, too.

Share this post


Link to post
Share on other sites
It would still be great if there was a more direct way to access the bitmap bits... At the moment, they are copied *TWO TIMES* before I can access them. That's stupid.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!