Click here to Skip to main content
15,918,516 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: File I/O Pin
David Crow6-Sep-05 4:48
David Crow6-Sep-05 4:48 
QuestionError when calling stored procedure from CRecordset Pin
Nandiator5-Sep-05 21:48
Nandiator5-Sep-05 21:48 
QuestionAdding CStringArray data into another CStringArray...help.. Pin
babyspidy5-Sep-05 20:59
babyspidy5-Sep-05 20:59 
AnswerRe: Adding CStringArray data into another CStringArray...help.. Pin
Neagoe Gabriel5-Sep-05 21:56
Neagoe Gabriel5-Sep-05 21:56 
AnswerRe: Adding CStringArray data into another CStringArray...help.. Pin
kakan5-Sep-05 22:00
professionalkakan5-Sep-05 22:00 
GeneralRe: Adding CStringArray data into another CStringArray...help.. Pin
babyspidy5-Sep-05 22:44
babyspidy5-Sep-05 22:44 
GeneralRe: Adding CStringArray data into another CStringArray...help.. Pin
babyspidy5-Sep-05 23:00
babyspidy5-Sep-05 23:00 
QuestionMemory requirement in CListCtrl Pin
rbbhosale5-Sep-05 20:52
rbbhosale5-Sep-05 20:52 
The following is my code for the listctrl
/////////////////////////////////////////////////////////////
lvItem.iImage = m_nIcon;
for (int i = 0; i<200;i++)
{
nChk ++;
szTest.Format("%d",nChk);
m_test = szTest;
UpdateData(FALSE);

// Set up item
lvItem.mask = LVIF_TEXT | LVIF_IMAGE;
lvItem.iItem = 0;
lvItem.iSubItem = 0;
lvItem.pszText = LPTSTR(LPCTSTR(szTest));
m_List.InsertItem (&lvItem);

// Set up time and date
CString szTimeDate = timeTimeStamp.Format(LOCALE_NOUSEROVERRIDE,
LANG_USER_DEFAULT);
int nIndex = szTimeDate.Find(" ");
CString szTime = szTimeDate.Right(szTimeDate.GetLength() - nIndex - 1);
CString szDate = szTimeDate.Left(nIndex);

nListCount = m_List.GetItemCount();
if(nListCount >1000)
m_List.DeleteItem (nListCount-1);
nListCount = m_List.GetItemCount();

// Insert Subitem in list control (date)
lvItem.mask = LVIF_TEXT;
lvItem.iSubItem = 1; // SubItem 1 is Date column
lvItem.pszText = LPTSTR(LPCTSTR(szDate));
m_List.SetItem(&lvItem);

// Insert Subitem in list control (time)
lvItem.iSubItem = 2; // SubItem 2 is Time column
lvItem.pszText = LPTSTR(LPCTSTR(szTime));
m_List.SetItem(&lvItem);
}
///////////////////////////////////////////////////////////
What I find is that the memory requirement increases as I increase the items
but as u can see I am removing the items from the List after the max. no of
items is reached still I find a large chunk of memory being taken up.
The memory requirement for say 1000 items is 2964K then it should remain the
same as I am deleting the extra items. How can I control this memory
requirement.?


Rohan
AnswerRe: Memory requirement in CListCtrl Pin
Neagoe Gabriel5-Sep-05 21:26
Neagoe Gabriel5-Sep-05 21:26 
AnswerRe: Memory requirement in CListCtrl Pin
David Crow6-Sep-05 4:55
David Crow6-Sep-05 4:55 
GeneralRe: Memory requirement in CListCtrl Pin
rbbhosale8-Sep-05 19:18
rbbhosale8-Sep-05 19:18 
GeneralRe: Memory requirement in CListCtrl Pin
David Crow9-Sep-05 2:39
David Crow9-Sep-05 2:39 
Questionproblem with&quot;temporary storage of images&quot; Pin
a_david1235-Sep-05 20:49
a_david1235-Sep-05 20:49 
AnswerRe: problem with&quot;temporary storage of images&quot; Pin
khan++5-Sep-05 21:07
khan++5-Sep-05 21:07 
AnswerRe: problem with&quot;temporary storage of images&quot; Pin
The Code Machine6-Sep-05 7:42
The Code Machine6-Sep-05 7:42 
QuestionGetting Color Of Control Pin
Identity Undisclosed5-Sep-05 20:42
Identity Undisclosed5-Sep-05 20:42 
AnswerRe: Getting Color Of Control Pin
G Haranadh5-Sep-05 21:14
G Haranadh5-Sep-05 21:14 
GeneralRe: Getting Color Of Control Pin
Identity Undisclosed6-Sep-05 0:18
Identity Undisclosed6-Sep-05 0:18 
AnswerRe: Getting Color Of Control Pin
ThatsAlok5-Sep-05 23:17
ThatsAlok5-Sep-05 23:17 
GeneralRe: Getting Color Of Control Pin
Identity Undisclosed6-Sep-05 0:16
Identity Undisclosed6-Sep-05 0:16 
Question,ow to create Dyanamic DSN in Access database using vc++ Pin
parims5-Sep-05 20:27
parims5-Sep-05 20:27 
JokeRe: ,ow to create Dyanamic DSN in Access database using vc++ Pin
toxcct5-Sep-05 21:04
toxcct5-Sep-05 21:04 
GeneralRe: ,ow to create Dyanamic DSN in Access database using vc++ Pin
toxcct6-Sep-05 1:12
toxcct6-Sep-05 1:12 
AnswerRe: ,ow to create Dyanamic DSN in Access database using vc++ Pin
David Crow6-Sep-05 5:01
David Crow6-Sep-05 5:01 
QuestionHow to develop a network printer monitor? Pin
wangdave5-Sep-05 20:25
wangdave5-Sep-05 20:25 

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.