I have a program that takes a shot of the screen in pascal:
uses Graphics,
LCLIntf,
LCLType;
var
Screen: TBitmap;
ScreenDC: HDC;
begin
Screen := TBitmap.Create;
ScreenDC := GetDC(0);
Screen.LoadFromDevice(ScreenDC);
ReleaseDC(0, ScreenDC);
Screen.SaveToFile("Screen.bmp");
end.
My question rests on the LoadFromDevice()
, and SaveToFile()
functions. What function(s), (if any), could be used to implement these in the C programming language. Trying to keep away from third party libraries as close a possible. (WinAPI)