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

Thread: CBitmap::Detach

Threaded View

  1. #1

    CBitmap::Detach()

    hi, when i Attach() a bitmap from file to a CBitmap like this:

    Code:
    CBitmap bmp;
    bmp.Attach((HBITMAP)LoadImage(NULL, GetAppPath() + "\\Images\\background.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION));
    will bmp.Detach() free the memory correctly? or do i need to just use bmp.DeleteObject()? or both?

    i tried searching for the Detach() function but i couldn't find anything..

    thanks
    Last edited by eXistenZ; July 17th, 2009 at 06:45 AM.

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