|
If we look at the MSDN details of LVM_INSERTITEM message, the item index is a zero-based integer value. So, I guess List control is designed to support up to INT_MAX + 1 items.
|
|
|
|
|
You may insert many, many items (i.e. millions?) in a list view. However you'll quicky find that flooding the list view will slow down the UI to unacceptable levels (and will make you consider using the Virtual List-View Style].
Why don't you perform a test?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hellogany wrote: Can Any One have idea of maximum number of datas that can be viewable in list control.
That's governed by the height of the control."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
I have a simple program that uses WIN32_FIND_DATA with the usual GetFirstFile() GetNextFile() etc.
What I need to be able to do is find out if the directories I pass through are Indexed or not.
I cannot see an Indexed Attribute in WIN32_FIND_DATA, so that it obviously not the place to look.
Also, is there some way to programmatically set a Directory as Indexed?
Visual Studio 2008, Vista 64 Bit.
Thanks for any advice,
Bryan.modified on Sunday, February 21, 2010 4:10 PM
|
|
|
|
|
Now assuming that the target system is using NTFS, the Indexing service is running and that the folder you are interrogating is included in the list of items the service will index THEN the file attribute FILE_ATTRIBUTE_NOT_CONTENT_INDEXED[^] is your best bet.
Check Win32_ServerFeature in WMI for ID
71 Indexing Service
Then look at ISearchCrawlScopeManager[^] at ways to query the indexing service.
Hope this helps.Alan
|
|
|
|
|
Hi Alan,
looks like there is a bit more to this Indexing Service than just getting an attribute bit...
It seems to me that the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED is saying that the associated file is to be excluded from Indexing, so is not too useful for my purposes.
I have been looking at the OLE DB Provider and its interaction with the Indexing Service, but this "simple" project is not going to be as easy as I had hoped.
So I will leave this one on the back-burner for now.
Thanks,
Bryan.
|
|
|
|
|
Bryan Anslow wrote: It seems to me that the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED is saying that the associated file is to be excluded from Indexing, so is not too useful for my purposes.
Wouldn't the lack of the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED bit being set indicate this it is being indexed?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
True. IF, and it is a big one, you have the index service installed, running and the folder was in the list. Alan
|
|
|
|
|
The problem I have is essentially very simple.
I need to have multiple CDialog thread in my application that do not lock the primary UI thread. Their purpose will be to display specific data in each one.
My problem is that although I have been able to achieve this for one of the dialogs by
public:
CSimulator thSim;
...
thSim.CreateThread();
but any attempt I make to repeat this approach does not give me the dialog although no errors are generated at compile or runtime.
I have also tried using the
OnInitDialog() of my main dialog but this just results in the main dialog having the child dialog pasted over it. Not pretty.
Ultimately I am planning to use an SDI for the main interface with CDialog's for the children. This would allow the child dialogs to be arranged across multiple montiors independantly of the main UI.
Whilst MFC is quite an old thing to be using I have to be sure the application will run on ANY Windows platform without having to worry too much about dependancies (i.e. from XP to Windows 7). Also the target machines are tightly controlled so adding .Net to them is a no go before anyone suggests it.
So does anyone have any suggestions how best to create and manage multiple CDialog's?
Many thanksAlan
|
|
|
|
|
|
If I am understanding this correctly, your difficulty is that you are attempting to use modal dialogs. What you want is to use modeless dialogs. These are still based on CDialog but have some differences in what you need to do in some overridden methods and how you start them up. You do not need a seperate thread to run them, they are just fine on your main UI thread. I have talked about them before in this post. I haven't double checked if I have everything in there that you need, but there is at least a good part of it. This should give you some direction. If necessary I could try to fill more stuff in, but I have to head out to a baby naming this afternoon and have a six hour drive tomorrow, so I'm leaving it at this for now.
Good luckPlease do not read this signature.
|
|
|
|
|
Thank you for the suggestions. Modeless sounds like it could be what I need to do. I will experiment with your suggestions. Alan
|
|
|
|
|
Thank you for the suggestions and Modeless certainly works to a point.
Sorry if I am being a newbie but I have spent most of my time deep behind the UI so this is all a bit of a novelty.
The problem I have now is that when I spawn the modeless dialogs, overlapping them causes painting issues. i.e. each dialog becomes contaminted with whatever was infront of it when it takes focus.
Oddly this is does not happen on Windows 7 which is my development platform.
Now I am assuming this is because I am not handling the change in focus correctly, which I am looking into, but any suggestions?
I have to be able to spawn between 2 and 255 of my modeless dialogs (yes I know it is a lot) and be sure that they all repaint correctly.Alan
|
|
|
|
|
Hiya,
I need to send images to a server and want to use Base64 encoding.
Is there currently a library that will do this for me?
Thanks,
garyc
|
|
|
|
|
The wikipedia entry for Base64[^] has links to implementations. Scroll down to the "external links" section.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
You may also write your own, it isn't a daunting task.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hello,
I've got a question about variable argument list: Is there a possibility/what would be the best way to call a function with variable arguments, but the number and the type of the arguments is not know at compile time?
You could imagine the problem as follows ( printf is used here for simplicity):
You have an input txt file with the string and a variable number of parameters on each line:
e.g.
"id=%d, name=%s, age=%d" 1 "marci" 100
" a totally different string %d %d %c %x" 1 2 'Y' 10
" there is no rule, this string can be %s" "anything"
You have to use these inputs in the code as parameters for the printf function.
(e.g. for the first line printf("id=%d, name=%s, age=%d",1,"marci",100);
Thank you in advance,
yakabmarci
P.S. The resp. function is available as both as func(n,...) and func(n,va_list p)
|
|
|
|
|
i'd put the parameters into an array of strings. or, if you can derive all of your parameters from a common base type, put them into an array of CBaseType*s. then pass the array - it's cleaner than dealing with the varargs stuff.
|
|
|
|
|
i want to connect my application to all servers on LAN using TCP sockets.
UINT CD1MessageDlg::ScanLAN(LPVOID pParam)
{
unsigned int tf0, tf1, tf2, tf3;
CString tip = "";
CD1MessageDlg *t;
t=(CD1MessageDlg*)pParam;
BOOL x = 1;
for (tf0 = 192; tf0 <= 192; tf0++)
{
for (tf1 = 168; tf1 <= 168; tf1++)
{
for (tf2 = 109; tf2 <= 117; tf2++)
{
for (tf3 = 1; tf3 <= 255; tf3++)
{
tip.Format("%u.%u.%u.%u", tf0, tf1, tf2, tf3);
t->m_sConnectSocket.Connect(tip, 50000);
}
tf3 = 0;
}
tf2 = 109;
}
tf1 = 168;
}
return 0;
}
one more ques. can i reuse the same socket again and again for finding server as i'm doing in my this code.Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
you probably can - but if you fail to connect your socket will 'block' for the timeout, so you may want to use a socket pool
furthermore,
Manmohan29 wrote: for (tf0 = 192; tf0 <= 192; tf0++) { for (tf1 = 168; tf1 <= 168; tf1++) {
loops are redundant, and in
Manmohan29 wrote: tip.Format("%u.%u.%u.%u", tf0, tf1, tf2, tf3);
you're not specifying a port - so what do you hope to connect to ?
|
|
|
|
|
Garth J Lancaster wrote: for (tf0 = 192; tf0 <= 192; tf0++) { for (tf1 = 168; tf1 <= 168; tf1++) {
loops are redundant
this code is for only testing purpose. i will modify my function to take ip address range from user.
Garth J Lancaster wrote: tip.Format("%u.%u.%u.%u", tf0, tf1, tf2, tf3);
you're not specifying a port - so what do you hope to connect to ?
i'm specifying port 50000
t->m_sConnectSocket.Connect(tip, 50000); Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
Manmohan29 wrote: i'm specifying port 50000
my mistake - I had forgotten the Connect() parameters - I was thinking you were specifying the timeout ..
in which case, as I said, if you get a connect fail, you'll have to wait for the timeout for the socket to become available again I think ...
'g'
|
|
|
|
|
Consider the possibility to use "multicast" http://en.wikipedia.org/wiki/IP_multicast[^].
Check with your network administrator if this is possible in you environment, before spreading a potentially huge number of independent identical flows, or you may risk to sit down your network.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
emilio_grv wrote: Check with your network administrator if this is possible in you environment
It is not possible in our college network as told by our N/W Admin.
Thanx. Future Lies in Present.
Manmohan Bishnoi
|
|
|
|