M
Matrixinline
Hi All,
I am getting error for the following code can you just let me know
what solution I need to implement so as to get transparent image on
CommandBarButton
1.) Using IPictureDisp, but this gives me theerror "wrong parameter".
HICON hIcon = LoadIcon(AfxGetApp()->m_hInstance,
MAKEINTRESOURCE(IDI_ICON));
PICTDESC pictdesc;
pictdesc.cbSizeofstruct = sizeof(PICTDESC);
pictdesc.picType = PICTYPE_ICON;
pictdesc.icon.hicon = hIcon;
IPictureDispPtr pPicture = NULL;
HRESULT hr = OleCreatePictureIndirect(&pictdesc, IID_IPictureDisp,
TRUE, (void**)&pPicture);
if (!FAILED(hr))
{ try
{ pButton->PutPicture(pPicture);
}
catch(_com_error e)
{ MessageBox(NULL, e.ErrorMessage(), _T("ERROR"), MB_OK);
}
}
I am getting error for the following code can you just let me know
what solution I need to implement so as to get transparent image on
CommandBarButton
1.) Using IPictureDisp, but this gives me theerror "wrong parameter".
HICON hIcon = LoadIcon(AfxGetApp()->m_hInstance,
MAKEINTRESOURCE(IDI_ICON));
PICTDESC pictdesc;
pictdesc.cbSizeofstruct = sizeof(PICTDESC);
pictdesc.picType = PICTYPE_ICON;
pictdesc.icon.hicon = hIcon;
IPictureDispPtr pPicture = NULL;
HRESULT hr = OleCreatePictureIndirect(&pictdesc, IID_IPictureDisp,
TRUE, (void**)&pPicture);
if (!FAILED(hr))
{ try
{ pButton->PutPicture(pPicture);
}
catch(_com_error e)
{ MessageBox(NULL, e.ErrorMessage(), _T("ERROR"), MB_OK);
}
}