What could be the possible reasons of getting return code as 0 from GetBitmap()
?
BITMAP bmInfo;
int rc = bitmap->GetBitmap (&bmInfo);
int ec = GetLastError();
The value returned by GetLastError()
is also 0. MSDN doesn't give any help and all the forums where similar questions have been asked are silent.
To give you some context, I have an instance of CBitmap and I am attaching a second instance of CBitmap to the same HBITMAP using code similar to the following:
CBitmap first;
:
:
CBitmap second;
second.Attach ((HBITMAP)first);
BITMAP bmInfo;
second.GetBitmap (&bmInfo);
The call to GetBitmap()
fails for second
and not for first
.