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
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