帮忙给加个注释,小弟实在是看不懂
BOOL CDib::LoadDib(UINT uIDS, LPCSTR lpszDibType)
{                                
ASSERT(m_dwLength == 0L); LPCSTR lpszDibRes = MAKEINTRESOURCE(uIDS);
HINSTANCE hInst = AfxGetInstanceHandle();
HRSRC   hRes    = ::FindResource(hInst, lpszDibRes, lpszDibType);
HGLOBAL hData   = ::LoadResource(hInst, hRes); if (hRes != NULL && hData != NULL)
{
char *lpBuf = (char *)::LockResource(hData);
m_dwLength = ((LPBITMAPFILEHEADER)lpBuf)->bfSize;
if (! AllocMemory())
return FALSE;

for (register DWORD i=0;i<m_dwLength;++i)
*(m_lpBuf+i) = *(lpBuf+i);
}
else
    {
CString str = lpszDibRes;
str += " : Read Resource error!";
AfxMessageBox(str);
return FALSE;
} if (m_lpBMFH->bfType != 0x4d42)
{
CString str = lpszDibRes;
str += " : Invalid bitmap file!";
AfxMessageBox(str);
return FALSE;
}                

if (IS_WIN30_DIB(m_lpBMIH))
ASSERT((m_lpBMIH->biBitCount==1)||(m_lpBMIH->biBitCount== 4)||
   (m_lpBMIH->biBitCount==8)||(m_lpBMIH->biBitCount==24));
else
ASSERT((m_lpBMCH->bcBitCount==1)||(m_lpBMCH->bcBitCount== 4)||
   (m_lpBMCH->bcBitCount==8)||(m_lpBMCH->bcBitCount==24));
   
m_lpData = (LPSTR)m_lpBMFH + m_lpBMFH->bfOffBits;
m_nBits = m_lpBMIH->biBitCount;

return TRUE;
}