The problem I face is the fact that it is not possible to draw to one hdc from multiple threads simultaneously. I have found out that it is possible to create a bitmap, lock it for the write access and get the pointer to the bitmap data in memory. This thread is about this topic, however I struggle with implementing all this.
My first question is: if I want to get this pointer to the data, does it matter how the bitmap was created (CreateCimpatibleDC() or CreateDIBitmap())?
The second question is: how to get that pointer? In this thread it is received from the CreateDIBSection() function.
Could anyone provide me with the tiny example how to access the data using the pointer please? Thanks in advance.