Office clipboard full make my add-in crach

M

moise.zapater

Hi,

I'm developping a MS Outlook COM Add-in. Creating my custom office
toolbar, I use the Office::_CommandBarButton->PasteFace() function to
add an icon to a button.
Every thing works fine while the Office Clipboard is not full.

Here is my code:

// put bitmap into Clipboard
::OpenClipboard(NULL);
::EmptyClipboard();
::SetClipboardData(CF_BITMAP, (HANDLE)hBmp);
::CloseClipboard();
::DeleteObject(hBmp);

// Set icon
hr = spCmdButton->PasteFace();

The EmptyClipboard() function clear the Windows' clipboard not the
Office one.

So here are my questions:

Anybody has already managed this kind of issue?
Is there a way to clear the office clipboard?
Is there a way to use the windows clipboard rather than the office
one?

Thanks,

Moses
 
B

Baji

Hi,

You can try using mask & image properties of the commandbar button
instead of the PasteFace(), that can solve your problem I feel.

Thanks,
Baji.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top