|
In addition to what Jochen has mentioned, I would look at WireShark which is a tool to view network communications. I have found it invaluble for debugging network type applications, though I think client and server have to be on different machines (I could be wrong on that one) for Wireshark to record the data.
|
|
|
|
|
Wireshark is a must have for network programming
...I do remember some issue with seeing the loopback data, but I can't remember it 100%... think you get spoiled having a bunch of computers sitting on your desk at all times.
|
|
|
|
|
Myself I doubt a beginner with no experience in sockets is going to get much use out of wireshark.
|
|
|
|
|
I don't know, I started using it almost immediately, while debugging my first network type application.
|
|
|
|
|
Member 10757148 wrote: 1- how can i test the connection between client and server???
Write TWO applications.
One does only client.
One does only server.
For testing you can there run each individually in TWO instances of VS 2010. (You can run from the command line as well but you will probably want to use the debugger in VS.)
Member 10757148 wrote: 2- how my server could have a list of connected clients???
You should try reading up a bit on sockets. Much of it won't make sense but it will give you some more basics on 'how' a server handles multiple clients.
That said I would STRONGLY suggest that you first start with only a single client.
|
|
|
|
|
I downloaded a project from codeproject that makes multiple selection posibible on a CTreeCtrl. The link is: [^]
The downloaded project works fine, I mean it works to select multiple lines with the Ctrl key.
I created a project on my own, taking from the downloaded project just CCustomTreeCtrl files, because I need just CCustomTreeCtrl. So, my problem is that it does not work to select multiple lines in the tree control in my project, but in the downloaded project it does. How can this be? I cannot figure it out. I checked and double checked to see if there's any notable difference, and I can't see any.
|
|
|
|
|
At first glance, that article seems to be more geared towards rubber banding a selection. While Ctrl+Click may work, too, there may be extra code there that is messing you up. Perhaps you could use Paul DiLascia'c code from here, or a related article (alas with more features) from here.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Thanks for your reply and for the provided links.
|
|
|
|
|
I tried the code from the second link. It behaves the same as the code from Syed Babu from codeproject. If I select multiple items using Ctrl and left mouse button it selects JUST THE LAST 2 previously selected items; the first item selected in a row of three is always deselected. I don't get it, I have the same code as the original code. There's something strange here.
|
|
|
|
|
The code looks fine actually. Can you elaborate the problem you are facing in this code?
mohsinmunawar [at] gmail [dot] com
|
|
|
|
|
|
I cannot attach the two projects here. I don't see any attach button. Can I send you on a private mail the two projects and have a quick look, please?
|
|
|
|
|
Sure that will be great. My email address is:
mohsinmunawar [at] gmail [dot] com
|
|
|
|
|
Dear all:
I implement a application, when I log in windows, the application will auto
start, and write registry in HKEY_CURRENT_USER,
SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run.
The context of registry is a wav file path.
I put the wav file and the application in the same folder.
My code show as below:
HKEY hKey = HKEY_CURRENT_USER;
TCHAR filePath[MAX_PATH];
TCHAR dirPath[MAX_PATH];
GetCurrentDirectory(MAX_PATH, dirPath);
StringTruncate(filePath, dirPath, "\\Default.wav");
WriteReg(hKey, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion"), _T("Sound"), filePath);
My question is:
when I log in windows, the registry value always equal to C:\Windows\system32\Default.wav, Not my folder path.
How can I write the right wav file path after windows log in?
Thanks for your help, Victor.
|
|
|
|
|
Did you check that writing to the registry was successful?
|
|
|
|
|
Dear Jochen:
I use the same code, but different condition.
condition 1: windows run stable, it write the registry success with my folder.
condition 2: after log in windows, it write the C:\Windows\system32 path.
Thanks for your help, Victor.
|
|
|
|
|
What is the value of filePath at the time of writing? Hint: it's not what you think it is.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Dear David:
I know the filePath equal to C:\Windows\system32.
The value of registry which I write is different between log in windows and run windows stable.
How can I write the same value in log in windows?
|
|
|
|
|
cedricvictor wrote: I know the filePath equal to C:\Windows\system32. So then why continue to use it?
cedricvictor wrote: The value of registry which I write is different between log in windows and run windows stable. Which has nothing to do with anything.
cedricvictor wrote: How can I write the same value in log in windows? Why not just use:
TCHAR filePath[MAX_PATH] = _T("C:\\abc\\123\\Default.wav");
WriteReg(hKey, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"), _T("Sound"), filePath);
All that said, I suspect you are wanting to use ::GetModuleFileName(NULL, ...) instead.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
It is right, Firstly, you should use ::GetModuleFileName(NULL, ...) to get the path of your application image,
and then, get what you want by this path.
If you set the path as const value, it's not convenient!
|
|
|
|
|
I'm not sure why you replied to me with this (as opposed to cedricvictor), but thanks for the affirmation.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Sorry, I just agree with your opinions, so I can't help myself to reply you.
|
|
|
|
|
Hi, is CMap object can be copied to another CMap oject?
I can't find a member function in CMap class.
And if I want to implement deep copy, do I need to loop it , copy every element to another manually?
|
|
|
|
|
Why not try it and see what the result is?
|
|
|
|
|
As far as I know, CMap has not such a facility. On the other hand, the std::map[^]...
Veni, vidi, vici.
|
|
|
|