Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IPictureDisp: Displaying from.

Posted on 1999-01-15
1
Medium Priority
?
359 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 360 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

824 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