Solved

IPictureDisp: Displaying from.

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ - Convert a wString to char * 9 508
Retrieve PID of MicrosoftEdge.exe with GetForegroundWindow() 6 121
sorting efficency of sorting algorithm 30 102
Issues with C++ Class 19 80
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…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

911 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

20 Experts available now in Live!

Get 1:1 Help Now