Click here to Skip to main content
15,890,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 13:44
Demosthenes Tecumseh20-Feb-07 13:44 
GeneralRe: Multiple list boxes in main window Pin
PJ Arends20-Feb-07 15:29
professionalPJ Arends20-Feb-07 15:29 
AnswerRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 14:01
Demosthenes Tecumseh20-Feb-07 14:01 
QuestionMemory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 9:42
pavanbabut20-Feb-07 9:42 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Mark Salsbery20-Feb-07 10:05
Mark Salsbery20-Feb-07 10:05 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Blake Miller20-Feb-07 10:21
Blake Miller20-Feb-07 10:21 
GeneralRe: Memory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 11:40
pavanbabut20-Feb-07 11:40 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Mark Salsbery20-Feb-07 12:17
Mark Salsbery20-Feb-07 12:17 
How are you checking this? There's no accurate way that I know of.

Try this if you'd like:
MEMORYSTATUS OrigMemoryStat;
::GlobalMemoryStatus(&PrevMemoryStat);
 
TRACE(_T("********************************\n"));
 
for (int i = 0; i < 100; ++i)
{
   HGLOBAL hGlobal = ::GlobalAlloc(GHND, 2000);
   ::GlobalFree(hGlobal);
 
   MEMORYSTATUS MemoryStat;
   ::GlobalMemoryStatus(&MemoryStat);
   TRACE(_T("********************************\n"));
//   TRACE(_T("dwTotalPhys %lu Bytes\n"),MemoryStat.dwTotalPhys);
//   TRACE(_T("dwAvailPhys %lu Bytes\n"),MemoryStat.dwAvailPhys);
//   TRACE(_T("dwTotalVirtual %lu Bytes\n"),MemoryStat.dwTotalVirtual);
//   TRACE(_T("dwAvailVirtual %lu Bytes\n"),MemoryStat.dwAvailVirtual);
//   TRACE(_T("dwMemoryLoad %lu%%\n"),MemoryStat.dwMemoryLoad);
   TRACE(_T("** Delta dwAvailPhys %li Bytes\n"), (long)MemoryStat.dwAvailPhys - (long)OrigMemoryStat.dwAvailPhys);
   TRACE(_T("** Delta dwAvailVirtual %li Bytes\n"), (long)MemoryStat.dwAvailVirtual - (long)OrigMemoryStat.dwAvailVirtual);
}
 
TRACE(_T("********************************\n"));

Trust the OS Unsure | :~ Suspicious | :suss:


"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."

GeneralRe: Memory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 13:21
pavanbabut20-Feb-07 13:21 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Maximilien20-Feb-07 13:37
Maximilien20-Feb-07 13:37 
GeneralRe: Memory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 13:41
pavanbabut20-Feb-07 13:41 
Question[Message Deleted] Pin
Anil K P20-Feb-07 7:48
Anil K P20-Feb-07 7:48 
AnswerRe: Get Background color of an active wondow in MFC program Pin
David Crow20-Feb-07 7:52
David Crow20-Feb-07 7:52 
QuestionRe: Get Background color of an active wondow in MFC program Pin
Mark Salsbery20-Feb-07 8:02
Mark Salsbery20-Feb-07 8:02 
AnswerRe: Get Background color of an active wondow in MFC program Pin
toxcct20-Feb-07 8:47
toxcct20-Feb-07 8:47 
GeneralMigration VC++ Pin
world.wild.web20-Feb-07 7:41
world.wild.web20-Feb-07 7:41 
GeneralRe: Migration VC++ Pin
Mark Salsbery20-Feb-07 8:08
Mark Salsbery20-Feb-07 8:08 
GeneralRe: Migration VC++ Pin
Hamid_RT20-Feb-07 18:30
Hamid_RT20-Feb-07 18:30 
GeneralRe: Migration VC++ Pin
Anilkumar K V20-Feb-07 23:44
Anilkumar K V20-Feb-07 23:44 
GeneralRe: Migration VC++ Pin
world.wild.web21-Feb-07 3:07
world.wild.web21-Feb-07 3:07 
QuestionDetecting Unicode Fonts using Win32 API Pin
Dave_Roach20-Feb-07 6:41
Dave_Roach20-Feb-07 6:41 
AnswerRe: Detecting Unicode Fonts using Win32 API Pin
Mark Salsbery20-Feb-07 7:32
Mark Salsbery20-Feb-07 7:32 
GeneralRe: Detecting Unicode Fonts using Win32 API Pin
Dave_Roach20-Feb-07 8:29
Dave_Roach20-Feb-07 8:29 
GeneralRe: Detecting Unicode Fonts using Win32 API Pin
Mark Salsbery20-Feb-07 8:45
Mark Salsbery20-Feb-07 8:45 
QuestionReturning LRESULT in DefWindowProc() Pin
VFaul20-Feb-07 6:29
VFaul20-Feb-07 6:29 

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.