Adding picture to outlook command button
-
Hi, I am developing the COM addin for outlook 2000 with Windows XP OS. I am facing the problems while adding the picture on the button of the toolbar. as I have added the picture on outlook 2003 sucessfully but the API put_Picture i have used in OL2003 is not working with OL2000.. Is there any way to do same??:(( Knock out 't' from can't, You can if you think you can :cool:
-
Hi, I am developing the COM addin for outlook 2000 with Windows XP OS. I am facing the problems while adding the picture on the button of the toolbar. as I have added the picture on outlook 2003 sucessfully but the API put_Picture i have used in OL2003 is not working with OL2000.. Is there any way to do same??:(( Knock out 't' from can't, You can if you think you can :cool:
;-)Try using
tempButton->Style=Office::msoButtonIconAndCaption; tempButton->Caption="Hello"; // Puts the text on the button tempButton->FaceId=67;
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
;-)Try using
tempButton->Style=Office::msoButtonIconAndCaption; tempButton->Caption="Hello"; // Puts the text on the button tempButton->FaceId=67;
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
Thanks man, I have the idea about it... but this work only for the faceid's provided by Outlook itself.. I want to add custom face to the button using the picture and mask i created. Thanks for instant reply. Knock out 't' from can't, You can if you think you can :cool:
-
Hi, I am developing the COM addin for outlook 2000 with Windows XP OS. I am facing the problems while adding the picture on the button of the toolbar. as I have added the picture on outlook 2003 sucessfully but the API put_Picture i have used in OL2003 is not working with OL2000.. Is there any way to do same??:(( Knock out 't' from can't, You can if you think you can :cool:
Hi use this one: void SetBitmap(CComQIPtrtempButton,const int& imageId) { CComQIPtr < Office::_CommandBarButton> spButton(tempButton); ATLASSERT(spButton); bool transparence; HBITMAP hBmp =(HBITMAP)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(imageId),IMAGE_BITMAP,0,0,NULL); // put bitmap into Clipboard ::OpenClipboard(NULL); ::EmptyClipboard(); ::SetClipboardData(CF_BITMAP, (HANDLE)hBmp); ::CloseClipboard(); ::DeleteObject(hBmp); // set style before setting bitmap spButton->PutStyle(Office::msoButtonIconAndCaption); HRESULT hr = spButton->PasteFace(); spButton->PutVisible(VARIANT_TRUE); } jhala ki sang aplyakade sagle ahe Cheers "Peace of mind through Technology"
-
Hi use this one: void SetBitmap(CComQIPtrtempButton,const int& imageId) { CComQIPtr < Office::_CommandBarButton> spButton(tempButton); ATLASSERT(spButton); bool transparence; HBITMAP hBmp =(HBITMAP)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(imageId),IMAGE_BITMAP,0,0,NULL); // put bitmap into Clipboard ::OpenClipboard(NULL); ::EmptyClipboard(); ::SetClipboardData(CF_BITMAP, (HANDLE)hBmp); ::CloseClipboard(); ::DeleteObject(hBmp); // set style before setting bitmap spButton->PutStyle(Office::msoButtonIconAndCaption); HRESULT hr = spButton->PasteFace(); spButton->PutVisible(VARIANT_TRUE); } jhala ki sang aplyakade sagle ahe Cheers "Peace of mind through Technology"
Thanks you yaar. Knock out 't' from can't, You can if you think you can :cool: