草庐IT

cClrBits

全部标签

C++ 屏幕截图

如何使用C++捕获屏幕截图?我将使用Win32。请不要使用MFC代码。 最佳答案 #include"windows.h"//shouldbelessthanandgreaterthaninsteadof\"intCaptureBMP(LPCTSTRszFile){//Source[1]HDChdcScr,hdcMem;HBITMAPhbmScr;BITMAPbmp;intiXRes,iYRes;//CreateanormalDCandamemoryDCfortheentirescreen.The//normalDCprovidesa