with CreateDIBSection() we create an array of DIB's pixels .. but it's a copy and not a pointer :(
when i change 1 pixel or draw a rectangle, i must re-create the DIB's and then draw the result.
Private bmpPtr() As Long
ReDim bmpPtr(ImageWidth * ImageHeight - 1)
hBitmap = CreateDIBSection(hdc, bmpInfoHeader, BI_RGB, ByVal bmpPtr, 0, 0)
but when i do:
bmpPtr(PosY * Width + PosX) = color
the value is changed on 'bmpPtr' but not on Bitmap or HDC :(