Anyway...
You said : "WordMail is a subclassed version of msword.exe used by Outlook
as the email editor. As such it runs in the Word process space and not in the
Outlook
process space. Picture and Mask take IPictureDisp objects, which cannot be
passed across process boundaries, therefore the exceptions."
In this example
myButton .Picture = AxHelper.GetIPictureDispFromImage(BitmapAddDocumen t);
Is executed in the word process and BitmapAddDocument is a resource file
that will be called from the word process.
As I said, my object oriented implementation let me, depending on the
specific add-in application run the same "code". The code shown earlier will
be called from an outlook context as well as from word context but obviously
with different instances.
So when it comes to run wordEditor for a new mail, this code will be called
in word context to create buttons in word context.
I don't see why this then does not work!?
Thank you very much
"Ken Slovak - [MVP - Outlook]" wrote:
That sort of thing is what you need to mask the image. As I said before you
cannot use the Mask or Picture properties from an out-of-process call.
The example you cite isn't C++, it's VB 6 code. It just uses a lot of Win32
API calls.
To use that code you'd need to translate it into C# or VB.NET and take
especial care with the memory management and release calls so you don't leak
handles.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Hichem S" wrote in message
...
Look at this C++ example :
http://support.microsoft.com/kb/288771
You see that it's a bit specific!
it's not only : button.mask = image!!
Thanks