Click here to Skip to main content
15,920,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: problem in storing in txt file Pin
David Crow25-Sep-06 6:29
David Crow25-Sep-06 6:29 
AnswerRe: problem in storing in txt file Pin
With_problem26-Sep-06 16:37
With_problem26-Sep-06 16:37 
GeneralRe: problem in storing in txt file Pin
David Crow27-Sep-06 2:35
David Crow27-Sep-06 2:35 
Questionany good link for database? Pin
With_problem24-Sep-06 18:12
With_problem24-Sep-06 18:12 
AnswerRe: any good link for database? Pin
Hamid_RT24-Sep-06 18:15
Hamid_RT24-Sep-06 18:15 
AnswerRe: any good link for database? Pin
ThatsAlok4-Oct-06 7:58
ThatsAlok4-Oct-06 7:58 
Generalexception handeling Pin
Bram van Kampen24-Sep-06 14:08
Bram van Kampen24-Sep-06 14:08 
GeneralRe: exception handeling Pin
Christian Graus24-Sep-06 15:09
protectorChristian Graus24-Sep-06 15:09 
GeneralRe: exception handeling Pin
Bram van Kampen24-Sep-06 15:16
Bram van Kampen24-Sep-06 15:16 
GeneralRe: exception handeling Pin
Christian Graus24-Sep-06 15:18
protectorChristian Graus24-Sep-06 15:18 
GeneralRe: exception handeling Pin
Bram van Kampen24-Sep-06 16:15
Bram van Kampen24-Sep-06 16:15 
GeneralRe: exception handeling Pin
Christian Graus24-Sep-06 16:31
protectorChristian Graus24-Sep-06 16:31 
GeneralRe: exception handeling Pin
Bram van Kampen25-Sep-06 13:58
Bram van Kampen25-Sep-06 13:58 
GeneralRe: exception handeling Pin
Stephen Hewitt24-Sep-06 16:18
Stephen Hewitt24-Sep-06 16:18 
Questionproblem with code after switching to visual studio 2005 Pin
swatgodjr24-Sep-06 10:51
swatgodjr24-Sep-06 10:51 
AnswerRe: problem with code after switching to visual studio 2005 Pin
Christian Graus24-Sep-06 12:34
protectorChristian Graus24-Sep-06 12:34 
GeneralRe: problem with code after switching to visual studio 2005 Pin
swatgodjr24-Sep-06 13:06
swatgodjr24-Sep-06 13:06 
GeneralRe: problem with code after switching to visual studio 2005 Pin
Christian Graus24-Sep-06 14:14
protectorChristian Graus24-Sep-06 14:14 
GeneralRe: problem with code after switching to visual studio 2005 Pin
swatgodjr24-Sep-06 14:50
swatgodjr24-Sep-06 14:50 
GeneralRe: problem with code after switching to visual studio 2005 Pin
Christian Graus24-Sep-06 15:01
protectorChristian Graus24-Sep-06 15:01 
GeneralRe: problem with code after switching to visual studio 2005 Pin
swatgodjr24-Sep-06 15:19
swatgodjr24-Sep-06 15:19 
GeneralRe: problem with code after switching to visual studio 2005 Pin
Christian Graus24-Sep-06 15:32
protectorChristian Graus24-Sep-06 15:32 
QuestionMemory Hogger!? Pin
MacGadger24-Sep-06 7:43
MacGadger24-Sep-06 7:43 
I want to Copy a Bitmap from the CImageList and copy to CBitmap object, i tried this function i tool from the Codeguru, but whenever i call this function everytime it increases the Memory usage of my Program. can anyone tell me how to control this ???

void GetImageFromList(CImageList *lstImages, int nImage, CBitmap *destBitmap)
{
//First we want to create a temporary image list we can manipulate
CImageList tmpList;
tmpList.Detach();
tmpList.Create(lstImages);

//Then swap the requested image to the first spot in the list
tmpList.Copy( 0, nImage, ILCF_SWAP );

//Now we need to get som information about the image
IMAGEINFO lastImage;
tmpList.GetImageInfo(0,&lastImage);

//Heres where it gets fun
//Create a Compatible Device Context using
//the valid DC of your calling window
CDC dcMem;
dcMem.CreateCompatibleDC (GetWindowDC());

//This rect simply stored the size of the image we need
CRect rect (lastImage.rcImage);

//Using the bitmap passed in, Create a bitmap
//compatible with the window DC
//We also know that the bitmap needs to be a certain size.
destBitmap->CreateCompatibleBitmap (this->GetWindowDC(),
rect.Width (), rect.Height ());

//Select the new destination bitmap into the DC we created above
CBitmap* pBmpOld = dcMem.SelectObject (destBitmap);

//This call apparently "draws" the bitmap from the list,
//onto the new destination bitmap
tmpList.DrawIndirect (&dcMem, 0, CPoint (0, 0),
CSize (rect.Width (), rect.Height ()), CPoint (0, 0));

//cleanup by reselecting the old bitmap object into the DC
dcMem.SelectObject (pBmpOld);

}

Please help me whts wrong in this CODE ? or if u have any idea how to Copy the Single Bitmap from Image list and copy to CBitmap tell me how ??
AnswerRe: Memory Hogger!? Pin
Christian Graus24-Sep-06 16:12
protectorChristian Graus24-Sep-06 16:12 
AnswerRe: Memory Hogger!? Pin
Hamid_RT26-Sep-06 6:31
Hamid_RT26-Sep-06 6:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.