Solved

IPictureDisp: Displaying from.

Posted on 1999-01-15
1
341 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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.

860 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