Solved

IPictureDisp: Displaying from.

Posted on 1999-01-15
1
339 Views
Last Modified: 2008-02-01
Here is the MFC function call:

void CTest2Ctrl::SetP1(LPPICTUREDISP newValue)
{
// inside of here how do I display the picture pointed
// to by 'newValue', which is a pointer to an IPictureDisp
// object.
}
0
Comment
Question by:DanielJenkins
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 120 total points
ID: 1182319
The IPictureDisp interface is an automation interface (meaning it is derived from IDispatch). The easiest thing to do since you are using MFC is

CPictureHolder foo;
foo.SetPictureDispatch(newValue);
foo.Render(dc, rcRender, rcBounds);

If you are not familiar with CPictureHolder::Render(), look it up in the MFC documentation.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question