如何加载图标
STDMETHODIMP Xbox::GetBitmap(/*[out, retval]*/ IPicture** oPicture)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
*oPicture = NULL;
return S_OK;
}
上面是原代码:
我需要把 *oPicture 设置为一个资源图标,资源图标名称为 IDI_ICON1
请问应该怎么搞,谢谢。
以下是VB的源码,测试通过,可以做为参考:
Private Function ICreateCommand_GetBitmap() As stdole.IPicture
Set ICreateCommand_GetBitmap = LoadResPicture(101, 1)
End Function
帮助文件中这样写到:
Description
This property allows you to set the Bitmap/Icon picture that will be shown on your own command button.
Syntax
iPicture = GetBitmap ( );