![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I have developed a ATL C++ addin (Outlook 2002 & 2003) and I have run into an issue. I need to change the state of a button at runtime and part of this requirement is switching the button image. I have tried two methods and both exhibit the same symptom. The symptom is that the image does not change during normal conditions - however if I set a break poiint within in my debugger the Image does change. Is seems that this cause the control to redraw the image - probably because the control is invalidated and updated. So my question becomes how can I do this programatically? I have tried a few things to get the button control to redraw, but I believe I must be missing something. Is there a method that will allow me to force the control to redraw itself? Below are the methods I have used ... 1. OpenClipboard(NULL); EmptyClipboard(); SetClipboardData(CF_BITMAP, (HANDLE)hBmp); CloseClipboard(); spButton-PasteFace(); 2. PICTDESC pdBmp; pdBmp.cbSizeofstruct = sizeof(PICTDESC); pdBmp.picType = PICTYPE_BITMAP; pdBmp.bmp.hbitmap = hBmp; pdBmp.bmp.hpal = 0; IPictureDispPtr pPic; ::OleCreatePictureIndirect(&pdBmp, IID_IPictureDisp, TRUE, (LPVOID*) &pPic); spButton-PutPicture(pPic); |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add an Icon to a commandBarButton | David | Outlook and VBA | 1 | March 29th 06 05:39 PM |
how to add commandbarbutton to inspector window | Ram | Outlook and VBA | 0 | January 19th 06 06:07 AM |
how to add commandbarbutton to inspector window | Ram | Outlook - General Queries | 1 | January 18th 06 08:42 PM |
how to add commandbarbutton to inspector window | Ram | Add-ins for Outlook | 0 | January 18th 06 03:18 PM |
Outlook Addin CommandBarButton Click Event Not Firing | Stu | Add-ins for Outlook | 0 | January 17th 06 02:10 AM |