因为项目的关系,需要根据图像路径,创建CBitmap对象。起初查资料找到了LoadBitmap这个函数,根据CSDN得
BOOL LoadBitmap ( LPCTSTR lpszResourceName );
Parameters
lpszResourceName:Points to a null-terminated string that contains the name of the bitmap resource.
以为这里的lpszResourceName参数是文件路径名,但经过尝试,失败了!找了很多资料才发现问题。