I have a windows-based application to port from C++/MFC to C++/CLR. The core program is used to manipulate and inspect high resolution, 16-bit, grayscale images. In WIN32, I created a DIB and allocated my own 8-bit buffer. Each time the raw image was manipulated, I simply transferred the updated 16-bit data into the DIB's buffer, using a 16->8 bit LUT and repainted the window to render the new image.

In the C++/CLR platform, using a Form as the rendering destination I need to use a Bitmap or Image class that I have little familiarity with. I have seen plenty of example code that creates a bitmap by simply loading an image from a file. However, I am having trouble finding example code that allows me to create the image from scratch and allow me access to the bitmap buffer in order to manipulate the image data myself. Can anyone provide an example or point me to a reference that discusses this topic?

Thanks in advance.....