CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: CImage's save

  1. #1
    Join Date
    Dec 2007
    Posts
    50

    Question CImage's save

    I save image using CImage class and fail if I mention the path selected from a CFileDialog object
    That means I can straightly save the stream with a CImage variable as
    m_img.Save(_T("image.png"));

    but it seems unable to work with this path
    m_img.Save(_T("C:\\Documents\\image.png"));


    I have 2 buttons on my dialog, one to save the stream as specified in my first example, and another is to save as in the second. I press the first button to see a file created and press the second one to see nothing.
    If I try to get comerror I will see 80004xxx (I forget what xxx is)


    Any help please ?????????

  2. #2
    Join Date
    Dec 2007
    Posts
    50

    Re: CImage's save

    Before executing the button press events I have codes to check the m_img's NULLable, I find it's not NULL before saving. I also see the path in debug view.
    Help me please, or I am not finishing this exercise. I'd like to solve as many exercises as possible to make up for my mistakes. It's too late now I almost can't sit and wait for you anymore..
    Last edited by Chipmunk Baby; May 14th, 2009 at 06:44 AM.

  3. #3
    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    379

    Re: CImage's save

    Hi,
    Well it works when I use an absolute path.

    Are you sure the "Documents" folder exists?

    Alan

  4. #4
    Join Date
    Dec 2007
    Posts
    50

    Re: CImage's save

    Of course, I choose to save it as an image file from a browse button invoking an instance of CFileDialog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured