DIB example for C++ 5.0 and later

This example copies the LEADRasterView1 bitmap to the clipboard as a DIB. It pastes the DIB into LEADRasterView2 and reverses the image. It then gets a DIB from LEADRasterView2, sets the same DIB to LEADRasterView1, and repaints.

ILEADRasterProcess *pRasterProc=NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL,
                 IID_ILEADRasterProcess, (void**)&pRasterProc);
BeginWaitCursor();
int MyFlags = COPY_EMPTY + COPY_DIB + COPY_PALETTE;
m_LEADRasterView1.GetRaster().Copy(MyFlags);
m_LEADRasterView2.GetRaster().Paste(0);
pRasterProc->Reverse(m_LEADRasterView2.GetRaster());
long MyDib = m_LEADRasterView2.GetRaster().GetDIB();
m_LEADRasterView1.GetRaster().SetDIB(MyDib);
m_LEADRasterView1.ForceRepaint();
GlobalFree((HGLOBAL) MyDib);
pRasterProc->Release();
EndWaitCursor();