|
Taka Muraoka wrote: Memory is an obvious constraint. Even if they were all empty strings, that's a huge amount of memory, not considering the overhead Windows introduces. And since list controls were never designed to handle such a large number of items, it's going to be unusably slow. If it's even possibe at all - I'm sure there's some 16-bit-based limit somewhere And your users will hunt you down with a very large axe.
Not to mention the delay that Windows introduces when it redraws the entire list after inserting each one . The axe is quite large indeed
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
2) is a trick question. The list control behaves relatively well up to about 5000 or so entries, in terms of update speed, scrolling, etc. After that, you have to switch to using 'virtual' mode in order for it to behave well.
The list control allocates memory for each item added. Trying to add 109 entries will cause the system to consume all available physical memory, followed by enlarging the page file. I believe the process will fail long before all of the items are added, as Windows limits the maximum page file size. In any case, your system will essentially lock up due to resource consumption.
A second poor behavior is screen updating. If you leave screen updates turned on during the item addition, that will slow the process (and make the screen flash a lot).
Software Zen: delete this;
|
|
|
|
|
Hi,
I'm getting following errors while creating 3 classes as mentioned below ...
//---------------------------
class CConfig
{
//declarations
};
//---------------------------
#include "Config.h"
class CDlg
{
CConfig m_config; //no errors
};
//---------------------------
#include "Config.h"
class CDump
{
void MyFun(CConfig config); //errors
};
//---------------------------
in class CDump i'm getting some errors as ...
error C2146: syntax error : missing ';' before identifier 'config'
error C2501: 'CConfig' : missing storage-class or type specifiers
error C2501: 'config' : missing storage-class or type specifiers
as far as class CDlg is concerned i'm able to declare and use the object of CConfig but why doesn't it work in the other case?
Thanks,
Kranti
-- modified at 23:59 Monday 6th March, 2006
|
|
|
|
|
Kranti1251984 wrote: #include "CConfig.h"
Is it #include "CConfig.h" or #include "Config.h"
Nibu thomas
Software Developer
|
|
|
|
|
I'm sorry, it is
#include "Config.h"
|
|
|
|
|
Kranti1251984 wrote: I'm sorry, it is
#include "Config.h"
Now it should work!
Nibu thomas
Software Developer
|
|
|
|
|
No, that's the problem. Even though, correct header file is included, it works fine with CDlg but not with CDump.
What should I do?
|
|
|
|
|
I don't think that the line you are showing is having the problem in CDump because the errors are talking about some other variable called m_config but here(in CDump ) you have declared a variable called config .
Nibu thomas
Software Developer
|
|
|
|
|
The same line with prototype of the function, is creating problems for the variable config of type CConfig.
-- modified at 0:02 Tuesday 7th March, 2006
|
|
|
|
|
I have this problem when I have 2 or more file Included eachothere (file 1 include file 2 & file 2 include file 1)
Iman Ghasrfakhri
|
|
|
|
|
I had tried this. But logically, it should not work and it doesn't work.
But the problem i've mentioned is not the same one.
|
|
|
|
|
Hello,
I am using the bit of code below in a function to send instructions thru the serial port to some equipment and also to read off some feedback from
the equipment:
WriteFile(hCOM1, txbuff, 8, &bytesRead, NULL);
ReadFile(hCOM1, rxbuff, 8, &bytesRead, NULL);
Power= (((int)rxbuff[6])%4)*256 + (int)rxbuff[5];
When i am testing this function alone, it seem to work perfectly and obtain nice readings. However, when i integrate it with the rest of the program i find that the function gives wierd readings.I later found that this was due to the ReadFile portion reading the recieved portion at an offset, meaning there was some meaningless data before my actual portion of the feedback.
eg
I expect 255 255 43 .....
instead i get 05 04 255 255 43...
I managed to solve this problem by making use of the PURGE command.
However, i would like to know, why does the offset of data occurr ?
Is there any better way to solve this problem instead of PURGE ?
Thanks
|
|
|
|
|
The serial port has an input buffer of usually around 16 characters. Anything that is received by the serial port but not read by an application will be just sitting there waiting to be read. A good practice is to clear the input buffer (just read until you can't read any more) when you open the serial port, and then make sure you keep up with all the reads after that.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
*
***
******
********
I have some problems to make this triangle for my hobby.
John,K
|
|
|
|
|
<font color=blue>const int</font> nMaxLines = 4;
<font color=blue>for</font>(<font color=blue>int</font> lnCount=0;lnCount<nMaxLines;lnCount++)
{
<font color=green>
<font color=blue>for</font>(<font color=blue>int</font> nStars=0;nStars<=(lnCount*2);nStars++)
{
cout<<"*";
}
cout<<endl;
}
Nibu thomas
Software Developer
|
|
|
|
|
1.how can i find the location of whitespace character in the file like tab, space etc??
|
|
|
|
|
I guess you are using MFC ...
Use CStdioFile ..
Using ReadString method of CStdioFile read a line of text and search for occurrence of the specified characters in that line.
Keep searching in this manner till EOF .
Nibu thomas
Software Developer
|
|
|
|
|
why is CView and CDocumnet created in the function?? any relation among them?
|
|
|
|
|
derek7 wrote: why is CView and CDocument created in the function?? any relation among them?
I don't see any CView and CDocument in the function.
Nibu thomas
Software Developer
|
|
|
|
|
Hello, everyone,
I want to implement such requirement as making a windows service on vista,
the service can display ui to user. How can I do? Where I can find the example?
Best Regards.
|
|
|
|
|
The proper name is an 'Interactive Session', check out this[^] MSDN article which explains about them.
Under Windows Vista interactive sessions are being fazed out though, check out this[^] blog entry by Larry Osterman (from Microsoft) which explains the reasons behind not using them.
Gavin Taylor
w: http://www.gavspace.com
-- modified at 0:13 Tuesday 7th March, 2006
|
|
|
|
|
These articles are very helpful to me, thanks!
|
|
|
|
|
Is there any method to dismiss the system modal dialog box programmatically?
|
|
|
|
|
|
to delete modelless dialog window
void CRVDlg:: OnExit()
{
OnCancel();
}
void CRVDlg::OnCancel()
{
DestroyWindow();
}
void CRVDlg::PostNcDestroy()
{
CDialog::PostNcDestroy();
if(m_pParent)
{
(CVCDlg*)m_pParent)->Obj=NULL;
}
delete this;
}
JAYARAJ
|
|
|
|