My program creates a window with the Windows API. I allocate a memory region with the VirtualAlloc() function, and with two for loops i iterate through it and change the RGB values of each pixel to cover the whole client are with a color.
After filling the buffer with the RGB data, i draw a rectangle to it, iterating again but just in a specific region of the buffer.
When the buffer is ready, the function StretchDIBits() displays the content of the buffer to the screen.
Is there a way to copy a HBITMAP image to my buffer?
Unfortunately i’m still a beginner and i’m still practicing and studying as selftaught, so i’m aware that there are probably tons of things i still don’t know that will probably answer my question right away.