Yeah, basically creating a video of the screen. I'm not using DirectX, just standard GDI functions:
//get the device context for the desktop
HDC dc = GetDC(NULL);
//create a dc compatible with the desktop
HDC mDc = CreateCompatibleDC(dc);
//create a bitmap compatible with desktop of desired size width, height
HBITMAP hbm = CreateCompatibleBitmap(dc,
//select the bitmap on the memory device context
SelectObject(mDc, hbm);
//BitBlt the image from the desktop onto the bitmap
//BitBlt(mDc, 0, 0, width, height, dc, 0, 0, SRCCOPY);
and then later I call GetDIBits to retrieve the actual bitmap information (in the same format, no colourspace conversion).
This process involves reading from video ram, where some drivers are heavily optimised towards writing to video ram only. So the video driver spends a long time reading, and i'm guessing that while this takes place no other video functions can be invoked, which effectively 'pauses' the screen, including pointer movement. Only seems to happen on crappy (even some new!) hardware (i'm looking at YOU S3! :) ).
Disabling the video acceleration in the troubleshooting section of the advanced display settings, I think, effectively disables the invocation of GDI and 3D accelerations the driver/card may perform and the windows software implementation performs it all, which solves the 'jerky mouse' problem for those who experience it.
What I want to be able to do is programatically change that setting, rather than ask users to do so ...
Main Topics
Browse All Topics





by: WxWPosted on 2003-07-29 at 01:31:02ID: 9026238
Screen capture, what do you mean. You create a video that contains the screen or part of it?
Do you use DirectX to do it ?