|
classes?
I think you have to go through COM and export interfaces rather than instances of classes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hello,
What is the best way to export/save list items from a CListControl to file?
To read list line by line and export to file can be slow if i have many items in list, right?
I expect to have more then 50000 items in list, and there are 24 columns!
Please give some suggestion about this problem!
Thanks for any help!
termal
|
|
|
|
|
IMHO, there is something wrong with your design. The list control should be used only to display information, not to store it. Typically the data is stored somewhere in your document class (in case you are doing a SDI application) and is only displayed in the list control.
So if you want to save it, you don't interract with the list control.
If possible, try to separate the 'logic' and data storing from the way it is displayed.
|
|
|
|
|
Hi,
thank you for answer, i undersand what you mean!
regards
termal
|
|
|
|
|
BTW, if you need to insert so much data in your list control, it will probably be quite slow. I think (I'm not sure because I don't use this control a lot) that you can use a virtual mode. Instead of putting all your data into the control, you let the control ask your program what to display. In this way, only what is currently visible will be 'asked' by the control which should be faster.
|
|
|
|
|
You can use of a thread or timer for read and insert values to listctrl and you can use of CFile for save these values.
|
|
|
|
|
Some Windows filestore-explorer-type folders have on their left edges a displayed tree of folder and file names. The nodes of this tree can be collapsed and expanded by clicking on the node points.
Please, is there a function that I can call to make such a tree (not necessarily of folders and files) appear in a Windows program that I write?
|
|
|
|
|
MFC enabled developer? Go through CTreeCtrl class [^].
No MFC ? Use Tree View API [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
You want to use of CTreeCtrl,and if you search on the codeproject you can find customize treectrl.
|
|
|
|
|
Hi all,
In Visual Studio 2005, from one method in dll, I'd like to search the way how to find out the name of dll where this method is.
e.g.
TEST.dll
In TEST.dll, I've some methods like method1
and from method1, how can I find out the name "TEST.dll"
Many thanks in advance
Hope to hear the help soon.
|
|
|
|
|
|
Hello everyone,
Reading from book Windows Internals, we should use private bytes to monitor memory leak.
1. I think the reason why not using virtual bytes, is because there may be some shared materials counted as a part of virtual bytes -- like shared library and file map;
2. I think the reason why not using working set, is because sometimes working set is trimmed and sometimes not all committed virtual bytes are in working set -- like demand for zero scenario.
Are my understanding for (1) and (2) correct?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Are my understanding for (1) and (2) correct?
By chance have you asked either Dr. Russinovich or Mr. Solomon if your understanding of their book is correct?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks DavidCrow,
I have read the section of memory management, and it is only mentioned using private byte to monitor memory leak is correct. I want to do further analysis why using other parameters, like virtual bytes and working set to monitor memory leak is not correct to verify we truly understand the points of memory management.
It is appreciated if you could share your points.
have a good weekend,
George
|
|
|
|
|
Now do you check private bytes for monitor emmory leak what was result?
|
|
|
|
|
Thanks Hamid,
In my limited testing, private bytes keep increasing if there is memory leak, but I am not sure whether the general rule applies for all scenarios. It is appreciated if you could share some of your points.
regards,
George
|
|
|
|
|
Do you want to find memory leak of your program or all programs?
|
|
|
|
|
Only my program is ok, Hamid!
Any ideas?
regards,
George
|
|
|
|
|
About?
|
|
|
|
|
About how to detect memory leak?
regards,
George
|
|
|
|
|
|
Thanks Hamid,
This link only describes how to use general process to detect and fix memory leak. My question is whether it is correct to watch private bytes, working set or virtual bytes counter.
regards,
George
|
|
|
|
|
Did you use of CMemoryState for memory leak ?
|
|
|
|
|
No, Hamid. I am not using it since it is MFC stuff.
My original question is about how to use memory counter to monitor memory leak.
regards,
George
|
|
|
|
|
dear all
how to solve the following problem..thanks a lot..
for (int k = 0; k< 150; k++)
{
if (d[k] == c[k][0])
{
sum1 = c[k][0];
sum1 = sum1 + 1;
num1 = num1 + 1;
}
why sum1 can't accumulate..it always showed me 1 + the previous value...
Li Zhiyuan
5/10/2006
|
|
|
|