How to use LoadImage
- From: "B" <manojnab84@xxxxxxxxx>
- Date: 24 Apr 2005 21:55:47 -0700
I have the following code inside my COM addin in C++ that adds a couple
of menu buttons to Microsoft Outlook:
HBITMAP hBmp =(HBITMAP)::LoadImage(param1,param2,IMAGE_BITMAP,
0, 0,LR_LOADMAP3DCOLORS);
::OpenClipboard(NULL);
::EmptyClipboard();
::SetClipboardData(CF_BITMAP, (HANDLE)hBmp);
::CloseClipboard();
::DeleteObject(hBmp);
cmdBarButton->put_Style(Office::msoButtonIconAndCaption);
cmdBarButton->PasteFace();
I want to load a bmp named say "myPic.bmp" to my menu button.
1) Do I have to add this bmp into the resource files of my project ?
2) What should the parameters to the function(param1 and param2 above)
be?
3) In some examples I came across param1 =
_Module.GetResourceInstance() . What does this imply?
4) What exactly is param2 ? Is it the name of the image to be loaded ?
Please help me out. Code snippets would be of great help.
Thanks,
B.
.
- Follow-Ups:
- Re: How to use LoadImage
- From: Dmitry Streblechenko
- Re: How to use LoadImage
- Prev by Date: Re: Where is mimeole.h
- Next by Date: OWA URL from MAPI mailbox store object
- Previous by thread: Iconvertersession - Encoding type
- Next by thread: Re: How to use LoadImage
- Index(es):