Get Pixel color fastest way?
问题 I'm trying to make an auto-cliker for an windows app. It works well, but it's incredibly slow! I'm currently using the method "getPixel" which reloads an array everytime it's called. Here is my current code: hdc = GetDC(HWND_DESKTOP); bx = GetSystemMetrics(SM_CXSCREEN); by = GetSystemMetrics(SM_CYSCREEN); start_bx = (bx/2) - (MAX_WIDTH/2); start_by = (by/2) - (MAX_HEIGHT/2); end_bx = (bx/2) + (MAX_WIDTH/2); end_by = (by/2) + (MAX_HEIGHT/2); for(y=start_by; y<end_by; y+=10) { for(x=start_bx; x