IMHO DrawDIB() code has an error. As I know you cannot do such things as :
BITMAPINFO &bmInfo = *(LPBITMAPINFO)hDIB;
It's wrong because HANDLE is not the same as void* ,it is just declared so. If you do so, bmInfo is filled in with garbage. If you want to get access to the real pointer to data of handle - must use GlobalLock() function
It can be like that:
PVOID pDIB = GlobalLock(hDIB);
BITMAPINFO &bmInfo = *(LPBITMAPINFO)pDIB;
How can i resize the view and frame size accordint to the bitmap size. i.e. when i load a bitmap i want the view and the fram size to be adjusted according to the size of bitmap. If the bitmap is very big i.e biggier then the normal size of the view then scroll bar should be added. I am using SDI in MFC. How should i achieve this.
I want to create animation using bitmap .I do heard about bitblt and others but no onw helps in getting starting .Plz i need help .So,any one knows he's welcome.i want to show moving wavforms in mine animation with time on x-axis and voltages on y-axis.
Dear friend i tried this code but when GetBitampAndPallete function call is encountered in OnPaint function,the "GetBitampAndPallete " is not called .So iam able to see only the black & white Images.Can u help me.
iam working in VC++6.