PasteFace trouble :(

  • Thread starter Anton Antonov via OfficeKB.com
  • Start date
A

Anton Antonov via OfficeKB.com

Hello Everybody!!!

Configuration:
Operating System Windows 2003 sp1
Outlook 2000 sp3

Problem statement:
The strange problem appeared. I'm write Outlook Add-in with tool bar. I
want to create button with a picture. However, the following strange thing
occurs, method PasteFace returns E_FAIL. And pictures respectively are not
put into the button. Moreover is even more strange, the fact that under
Visual Studio debuger this method doesnormally passed!?

Other Add-in, for example OutlookSpy, works properly.

// put bitmap into Clipboard
::OpenClipboard(NULL);
::EmptyClipboard();
::SetClipboardData(CF_BITMAP, (HANDLE) hFinalBmp.m_hBitmap);
::CloseClipboard();

// set style before setting bitmap
hRes = spCmdButton->put_Style(Office::msoButtonIconAndCaption);
hRes = spCmdButton->PasteFace(); <-- FAILED
 
A

Anton Antonov via OfficeKB.com

Dmitry, thank you very much!

We using 16x16x16 bitmaps and it does not work properly.
I'm tried to use 16x16x256 bitmaps and my toolbar buttons assume they
pictures.
 

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