c++ read pixels with GetDIBits()
问题 I'm trying to create a function which is equivalent to the windows API GetPixel() function, but I want to create a bitmap of my screen and then read that buffer. This is what I've got (Mostly copy pasted from google searches), when I run it it only prints out 0's. I think I've got most of it right, and that my issue is that I don't know how to read the BYTE variable. So my question is, what do I need to do in order to get it to print out some random colors (R,G or B) with my for loop?