LoadImage加载资源中的位图有关问题
LoadImage加载资源中的位图问题
一般用LoadImage加载位图,我都是从某个路径直接加载位图;如果我先把位图导入资源里,比如ID为IDB_BMP,可不可以用LoadImage来载入?
谢谢。
------解决方案--------------------
可以。
不过建议用CBitmap的LoadBitmap来加载
------解决方案--------------------
当然可以了。
LR_LOADFROMFILE Loads the image from the file specified by the lpszName parameter. If this flag is not specified, lpszName is the name of the resource.
不要选择这个属性
------解决方案--------------------
不要用参数 LR_LOADFROMFILE
------解决方案--------------------
就是字符串参数,套个宏将id类型转换一下
MAKEINTRESOURCE(your id)
------解决方案--------------------
同意楼上,LoadImage函数还可以参考下《Windows界面编程第二篇 半透明窗体》
http://blog.csdn.net/morewindows/article/details/8451632
一般用LoadImage加载位图,我都是从某个路径直接加载位图;如果我先把位图导入资源里,比如ID为IDB_BMP,可不可以用LoadImage来载入?
谢谢。
------解决方案--------------------
可以。
不过建议用CBitmap的LoadBitmap来加载
------解决方案--------------------
当然可以了。
LR_LOADFROMFILE Loads the image from the file specified by the lpszName parameter. If this flag is not specified, lpszName is the name of the resource.
不要选择这个属性
------解决方案--------------------
不要用参数 LR_LOADFROMFILE
------解决方案--------------------
就是字符串参数,套个宏将id类型转换一下
MAKEINTRESOURCE(your id)
------解决方案--------------------
同意楼上,LoadImage函数还可以参考下《Windows界面编程第二篇 半透明窗体》
http://blog.csdn.net/morewindows/article/details/8451632