sách gpt4 ăn đã đi

c - ảnh chụp màn hình

In lại 作者:太空狗 更新时间:2023-10-29 15:59:06 30 4
mua khóa gpt4 giày nike

我正在尝试使用这段代码:

bool SaveBMPFile(char *filename, HBITMAP bitmap, HDC bitmapDC, int width, int height);

bool ScreenCapture(int x, int y, int width, int height, char *filename){
// get a DC compat. w/ the screen
HDC hDc = CreateCompatibleDC(0);

// make a bmp in memory to store the capture in
HBITMAP hBmp = CreateCompatibleBitmap(GetDC(0), width, height);

// join em up
SelectObject(hDc, hBmp);

// copy from the screen to my bitmap
BitBlt(hDc, 0, 0, width, height, GetDC(0), x, y, SRCCOPY);

// save my bitmap
bool ret = SaveBMPFile(filename, hBmp, hDc, width, height);

// free the bitmap memory
DeleteObject(hBmp);

return ret;
}

它抛出这些错误:

bot.c|185|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SaveBMPFile'|
bot.c|187|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ScreenCapture'|

我能做什么?尝试了不同的代码将无法正常工作,并尝试使用 Gdi+ - 也出现错误。

câu trả lời hay nhất

我想你不见了#include .

bool不是 C 中的原始类型。您必须包含 header 以获取其定义。

关于c - 截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12922348/

30 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress