[求助]关于MFC示例DIBLOOK中的问题
关于下面这个函数:
DWORD WINAPI DIBWidth(LPSTR lpDIB)
{
LPBITMAPINFOHEADER lpbmi; // pointer to a Win 3.0-style DIB
LPBITMAPCOREHEADER lpbmc; // pointer to an other-style DIB
/* point to the header (whether Win 3.0 and old) */
lpbmi = (LPBITMAPINFOHEADER)lpDIB;
lpbmc = (LPBITMAPCOREHEADER)lpDIB;
/* return the DIB width if it is a Win 3.0 DIB */
if (IS_WIN30_DIB(lpDIB))
return lpbmi->biWidth;
else
/* it is an other-style DIB, so return its width */
return (DWORD)lpbmc->bcWidth;
}
其中lpbmi = (LPBITMAPINFOHEADER)lpDIB; 这句是强制类型转换么?
可是,lpDIB指向的是FILEHEADER,而lpbmi指向的是INFOHEADER啊.所以不明白这一句的意思是什么.请高手指点,谢谢:)