?
Solved

How to copy object in Visual C++ 6.0

Posted on 2006-05-25
3
Medium Priority
?
391 Views
Last Modified: 2010-05-18
I'm using Visual C++ 6.0 with GDIPlus and need to copy Image object. Is it possible to copy an object?
If that is not possible, is there any solution to create global object (accessible from all functions in the class) for Image object
e.g:
this code give me error when i put it in outside winmain:

Image myImage(L"picture.bmp");
0
Comment
Question by:iphone
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 2000 total points
ID: 16767640
Image *myImageCopy = myImage.Clone();
0
 

Author Comment

by:iphone
ID: 16768202
wow many thanks,
may i know how to destroy an object?

thanks
0
 
LVL 32

Expert Comment

by:jhance
ID: 16768313
delete myImageCopy;
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

850 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