|
Shaheen.India wrote: I have used a List box control and it showing some files full path. I want to show this path one by one when it find out like "Searching in xp". But it display all path at a time. Can any one help me.
Have you tried using DlgDirList[^]?
|
|
|
|
|
|
Do you mean that you run a loop looking for the files, when you find one you add the path to the list, but the list only gets redrawn once your loop is done thus all your hits appear at once? If so, you have 3 options i can think of right now:
1. do the search in a different thread and send/post your hits towards the GUI thread
2. do your search with a timer
3. do your search in idle-time (when your GUI thread has no messages to process)
p.s: You could also try simply forcing your list to be redrawn in your loop with e.g. using RedrawWindow, but that would be an ugly solution.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for your reply. Yes, I have used it in loop, that's why the problem arise
|
|
|
|
|
Another option you can do is within your loop, when you find a file you are most likely doing
m_ListBox->AddString(xxxx)
Immediately after you do the AddString, you can add
m_ListBox->UpdateWindow() and that will cause the list box to show the new data.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hi,
I want to launch outlook using ShellExecuteEx and I am able to launch it. But I want to pass file (mydoc.doc) as a parameter to it. So that it will open an outlook evelop and attach this file to it.
SHELLEXECUTEINFO shExecInfo;
shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shExecInfo.fMask = NULL;
shExecInfo.hwnd = NULL;
shExecInfo.lpVerb = NULL;
shExecInfo.lpFile = "OutLook";
shExecInfo.lpParameters = "C:\\test\\mydoc.doc";
shExecInfo.lpDirectory = NULL;
shExecInfo.nShow = SW_MAXIMIZE;
shExecInfo.hInstApp = NULL;
ShellExecuteEx(&shExecInfo);
Please let me know what wrong with this code.
Thanks
SNI
|
|
|
|
|
Does it work if you simply run outlook with a doc parameter from a console or using RUN in start menu? Maybe you need to specify other parameters to let Outlook know what you want it to do with that doc.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for reply. But I tried with other parameters but it is failing and giving following msg
"The command line argument is not valid. Verify the switch you are using." Is there any switch needs to be provided while specifying the file name.
SNI
|
|
|
|
|
Check out here[^], it says, the command line argument for attaching a file is /a <path to file>
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Hi,
I would like to make it so that when the cursor is over my window it has a custom look. How can I achieve this with win32?
Thanks,
Steve
|
|
|
|
|
One way is to handle the WM_SETCURSOR[^] message. A different way would be to specify your own cursor handle when registering a window class.[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
wibblewoo wrote: I would like to make it so that when the cursor is over my window it has a custom look. How can I achieve this with win32?
Using cursors![^]
|
|
|
|
|
Oh God I don't know how I didn't find that when I was looking.
Thanks.
|
|
|
|
|
wibblewoo wrote: Oh God I don't know how I didn't find that when I was looking.
MSDN has an interesting set of "Using xxxx" series. If interested type in "Using" into the index edit box and you'll see a bunch of articles.
|
|
|
|
|
As per google, MTU(Maximum transmission unit) can have maximum value of 1500 bytes but I am sending more then 1500 bytes data over socket from one application to other(on differnet m/c).It is going fine. I have tried up to 3500 bytes.
Please tell that what is the maximum size of MTU and how can I find out?
Thanks in advance.
Regards,
Vishal Soni
|
|
|
|
|
what's MTU ?
This signature was proudly tested on animals.
|
|
|
|
|
Maximum transmission unit
|
|
|
|
|
The MTU effects only packet size. You can use send specifying bigger buffers as the MTU, but -i belive it's TCP's job- TCP will cut your data into ~MTU sized packets, send that over, and the receiver side will put the fragments together to "recreate" your data. Or am i missing the point here?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
I am trying to send 3500 byts.On the receiver side,I have not implemented the code to take care of fragmented packets.So both client and server application have not functionality to deal with fragmented packets.
Without this,I am able to send and receive more then 1500bytes but as per MTU,it should not get more then 1500 bytes.
So there is lot of confustion related to MTU? In which case it is linked to TCP/IP send/receive size.
Thanks and Regards,
Vishal Soni
|
|
|
|
|
Vishal Kumar Soni wrote: So both client and server application have not functionality to deal with fragmented packets.
That's fine, since TCP/IP does it for you.
Vishal Kumar Soni wrote: Without this,I am able to send and receive more then 1500bytes but as per MTU,it should not get more then 1500 bytes.
So there is lot of confustion related to MTU? In which case it is linked to TCP/IP send/receive size.
Possibly packet fragmentation is an internal detail, hidden to the application layer.
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]
|
|
|
|
|
Vishal Kumar Soni wrote: So both client and server application have not functionality to deal with fragmented packets.
Your code doesn't, but the code **you call** does. I bet your code doesn't perform checksums on the data you send either - doesn't mean that doesn't happen (the ethernet layer will do that). I bet your code doesn't work out which computers your data should go through to get between client and server either - again, that doesn't mean that it doesn't happen.
Vishal Kumar Soni wrote: So there is lot of confustion related to MTU?
Not really. Look at Wikipedia's page on MTU[^] - it quite clearly says that the MTU is the maximum size of data packet that can be transmitted by a layer of a communication protocol. Looking at the table of MTUs on that page, you can see that the MTU size depends on the transport you're using. Imagine you have this link to your server:
Client <-- <small>Wireless (802.11)</small> --> Gateway <-- <small>Ethernet</small> --> Gateway <-- <small>FDDI</small> --> Server
There are three different transports with three different MTUs (802.11=2272 bytes, Ethernet = ~1500, FDDI = 4500). Without an underlying layer that automatically adjusts for those different MTUs, your code would have to handle it all.
As ever with networking questions, I would recommend you download and become familiar with the IBM Networking Redbook[^].
|
|
|
|
|
As CPallini said, you don't need to fiddle with fragmentation. You just need to Send and Recv, fragmentation is done by the TCP/IP layer, also it ensures you that you get your data in the same order you sent it, so don't worry about "puttinng your fragments together in the right order" on any side.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks for reply.
This problem started from live system at customer side.Sender application is sending 1800 bytes on socket but reciever side is receiving only 1460 bytes.Then one of my senior colleague asked me that it MTU problem so we need to change our implemataion.
|
|
|
|
|
Vishal Kumar Soni wrote: Then one of my senior colleague asked me that it MTU problem so we need to change our implemataion
Hi Vishal,
I have read the other responses and mostly agree with them for 99.9% of engineers. However there are valid reasons why some network engineers choose to enable a Large MTU Network[^]. By reducing SYN/ACK cross-talk you can significantly reduces network overhead and consequently increase network throughput. There are essentially two ways to improve TCP performance... one is by increasing the MTU and the other is enabling RFC-1323[^] known as the TCP window scale option.[^]
The answer to your question is that the MTU is generally "Auto-Discovered[^]" by default. You can disable this option and enforce a specific maximum transmission packet-size, however... if there is ONE router which cannot handle the oversized packet, it will send back an ICMP error message and cause the packet to resent in smaller chunks... this is known as packet fragmentation and is very harmful for throughput.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi David,
Thanks for information.
According to previous discussion, we can send more then 1500 bytes over TCP/IP socket connection without caring the MTU size.At application level we don't need to implement fragmenation and defragmentaion.
So I can continue with this?
Regards,
Vishal Soni
|
|
|
|