Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Adding picture to outlook command button

Adding picture to outlook command button

Scheduled Pinned Locked Moved COM
comjsonquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Laxman Auti
    wrote on last edited by
    #1

    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:

    _ G 2 Replies Last reply
    0
    • L Laxman Auti

      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:

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      ;-)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_

      L 1 Reply Last reply
      0
      • _ _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_

        L Offline
        L Offline
        Laxman Auti
        wrote on last edited by
        #3

        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:

        1 Reply Last reply
        0
        • L Laxman Auti

          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:

          G Offline
          G Offline
          Ganesh_T
          wrote on last edited by
          #4

          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"

          L 1 Reply Last reply
          0
          • G Ganesh_T

            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"

            L Offline
            L Offline
            Laxman Auti
            wrote on last edited by
            #5

            Thanks you yaar. Knock out 't' from can't, You can if you think you can :cool:

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups