473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

IPictureDisp from OleCreatePictureIndirect

I am using VS.Net 2003 and I need to create a IPictureDisp pointer that
points to a picture object.

IPictureDisp *pd;
PICTDESC pdesc;
memset(&pdesc,0,sizeof(pdesc));
pdesc.cbSizeofstruct = sizeof(pdesc);
pdesc.picType = PICTYPE_BITMAP;

pdesc.bmp.hbitmap = static_cast
<HBITMAP>LoadImage(hInst,MAKEINTRESOURCE(resourceI D),IMAGE_BITMAP,0,0,LR_LOADMAP3DCOLORS);

pdesc.bmp.hpal = NULL;

HRESULT hr =
OleCreatePictureIndirect(&pdesc,IID_IPictureDisp,T RUE,(void**)&pd);

after this is done "pd" doesn't seem to contain any useful information.
what's wrong here?
Nov 17 '05 #1
0 2295

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: trojacek | last post by:
I'm trying to load image data stored in an OLE field into an image list, that will be used by a treeview to show icons. This is at run time. To do this, I'm trying to load the field which...
1
by: john | last post by:
I'm working on an add-in and one of the methods in the extensibility model takes an object of type IPictureDisp. How can i get this in .Net? I've tried loading up bitmap, image and icon classes,...
0
by: Frank Oquendo | last post by:
I'm developing an addin for an application. All interaction takes place via COM. I've had no luck trying to associate an icon with a UI element such as a button within the host application. So I...
6
by: Minfu Lu | last post by:
I got problems with the WinAPI call OleCreatePictureIndirect() in C#. Has anybody ever used this function call in C#? Thanks, Minfu
2
by: Map Reader | last post by:
Greetings, I am converting an old VB6 application to use .NET. One of the old controls loads icons from the disk and displays them. However, the transparent color turns to blue somewhere in the...
3
by: =?Utf-8?B?WWFlbA==?= | last post by:
public class MatarotHost : AxHost { public MyHost() : base("02FD5840-C1A3-448E-8310-98611DF58281"){ } public IPictureDisp GetIPictureDispOfPicture(Image image) { return...
4
by: =?Utf-8?B?WWFlbA==?= | last post by:
Hi, com add-in vs.net 2003 & outlook 2003 & c# I need to access to protected method of AxHost, How can I do this? I get nothing after the dot (base.), Why? This is my code: I need to set icon on...
1
by: =?Utf-8?B?WWFlbA==?= | last post by:
Hi, I have problem is with return stdole.IPictureDisp in this method if the computer don't have vs.net installed. I created a com add-in for outlook 2003 in vs.net 2003 c#. if I calling...
0
by: =?Utf-8?B?WWFlbA==?= | last post by:
I created a com add-in for outlook 2003 in vs.net 2003 c#. My problem is with return type stdole.IPictureDisp. if I calling stdole.IPictureDisp Pic =...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.