VC中,我用WIN32编程,用LoadBitmap()

来源:百度知道 编辑:UC知道 时间:2024/05/24 15:24:15
它的第二个参数是什么,用MFC可用资源ID,这里怎么不行,我尝试载入BMP的位图,但资源文件夹里显示不出
总之不知道怎么将BMP格式的文件载入HBITMAP 中

LoadBitmap
The LoadBitmap function loads the specified bitmap resource from a module's executable file. This function has been superseded by the LoadImage function.

HBITMAP LoadBitmap(
HINSTANCE hInstance, // handle to application instance
LPCTSTR lpBitmapName // name of bitmap resource
);
LoadBitmap(g_hinst, MAKEINTRESOURCE(IDB_LINE));

Parameters
hInstance
[in] Handle to the instance of the module whose executable file contains the bitmap to be loaded.
lpBitmapName
[in] Pointer to a null-terminated string that contains the name of the bitmap resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The MAKEINTRESOURCE macro can be used to create this value.
Return Values
If the function succeeds, the return value is the handle to the specified bitmap.

If the function fails, the return value i