Hi, I didn't have much time to check your code completely, but I think the source line: if(!(hDC = ::GetDC(0))) throw 0; // create the 16-bit DIBSECTION is incorrect. You re-initialize the local parameter hDC, which was sent by the call to your DrawDIBSection(..) function in the OnDraw method. It will be set to a DC for the desktop, by ::GetDC(0). This hDC is used for the BitBlt(..) command later. Not a sollution, but just a hint...:) Istvan Eperjesy
I
Istvan Eperjesy
@Istvan Eperjesy