thanks
解决方案 »
- 如何获得指定模块的DC?
- 视频图像的截取问题!!!
- 不用TRACE如何在调试时向输出窗口输出信息?@VS2005
- 谁用过MFC的CAsyncSocket?非阻塞,AsyncSelect, 一个线程里可以AsyncSelect多少个CAsyncSocket实例?
- 怎样使用RichEdit控件啊?
- mm买12寸宽屏笔记本,请大家推荐,散分
- 请告诉我ORCALE 9中文版的下载地址?
- 请问,安装鼠标钩子之后,在回调函数中怎么判断是什么鼠标事件阿?
- 各位大使,我定义了一个外部变量,但编译时却提示“无法解析的外部符号...”
- 请教关于nmake的问题
- 类似于自解压的文件实现思想是怎样的
- 有谁知道用mfc开发的ActiveX控件,加上滚动条?
The MAKEINTRESOURCE macro converts an integer value to a resource type compatible with the resource-management functions. This macro is used in place of a string containing the name of the resource. LPTSTR MAKEINTRESOURCE(
WORD wInteger
);
这个参数是什么意识?
假如我insert一bmp图片 资源id IDB_BITMAP1
那么如果我想用
HBITMAP LoadBitmap(
HINSTANCE hInstance,
LPCTSTR lpBitmapName
);
其中MSDN上说 lpBitmapName参数
[in] Long 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.
那么如何用MAKEINTRESOURCE宏来做呢?GIVE ME SAMPLE/.
添加picture控件对应的成员变量m_pic
BOOL CMy123Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
.........................
m_pic.SetBitmap(::LoadBitmap(NULL,MAKEINTRESOURCE(IDB_BITMAP1))); return TRUE;
}为什么不能显示图片呢?????
ASSERT(lpBitmapName);HBITMAP hBitmap = NULL;
hBitmap = (HBITMAP)LoadImage(NULL, lpBitmapName, IMAGE_BITMAP, 0, 0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE);
這是一個裝載圖標的語句。 bmp也類似吧。
thanks your code
但是,我想知道的是MAKEINTRESOURCE macro的用法,而不是如何load图片
那么 masterdog(掌门狗) 楼上那位(也就是我)的代码错在哪呢?