Solved

IPictureDisp: Displaying from.

Posted on 1999-01-15
1
331 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now