How to copy object in Visual C++ 6.0

Posted on 2006-05-25
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
this code give me error when i put it in outside winmain:

Image myImage(L"picture.bmp");
Question by:iphone
    LVL 32

    Accepted Solution

    Image *myImageCopy = myImage.Clone();

    Author Comment

    wow many thanks,
    may i know how to destroy an object?

    LVL 32

    Expert Comment

    delete myImageCopy;

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    This is an explanation of a simple data model to help parse a JSON feed
    This is about my first experience with programming Arduino.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    730 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

    19 Experts available now in Live!

    Get 1:1 Help Now