|
The thing is. I have to different instances of the program, one connects to another and they're connected. Then either of the programs can try to send a file to the other application. So i don't know which program will send the file and then i can't set up a recv function that blocks until it receives some data. So so i just create a new thread that loops the recv function and handles the data?
Thanks for your help.
|
|
|
|
|
You can use asynchronous socket, but it's a bit more complicated. There should be some articles about it here on codeproject.
But if you want to use recv, which is a blocking function, you can use select to chech if theres data to read...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
A close analogy with MFC is the CAsyncSocket class. If you inherit from it and
override classes like OnReceive you should be able program in a manner more
familiar to you.
Good luck,
Iain.
|
|
|
|
|
After reading Petzold, books about Garbage Collection and looked at MSDN to much, I had the Idea of comming up with a new Framework for Windows.
Goals I want to settle:
- Fully Garbage Collected
- Fully Object-Oriënted (Well, except the generated _tWinMain...)
- Really easy to use
- Thread supported
Well, as you can see, these four things are the most complicated to do it all together, but it seems to me it has to be possible.
A problem is that I can't do this alone, (It would take me years, I'm studying, have a job, etc...) so I need some people to help me out.
I know that you guys are the best (well, most of you are), so what do you think???
If you want to join, post a message (also if you've got some Ideas). I really want to do this!
Sjoerd van Leent
LPCTSTR Dutch = TEXT("Double Dutch ");
This has to be replaced with:
OString *dutch = new OString("Double Dutch ");
|
|
|
|
|
S van Leent wrote:
After reading Petzold, books about Garbage Collection and looked at MSDN to much, I had the Idea of comming up with a new Framework for Windows.
Goals I want to settle:
- Fully Garbage Collected
- Fully Object-Oriënted (Well, except the generated _tWinMain...)
- Really easy to use
- Thread supported
Well, as you can see, these four things are the most complicated to do it all together, but it seems to me it has to be possible.
A problem is that I can't do this alone, (It would take me years, I'm studying, have a job, etc...) so I need some people to help me out.
I know that you guys are the best (well, most of you are), so what do you think???
If you want to join, post a message (also if you've got some Ideas). I really want to do this!
Sorry dude, but it has been done yet: it is called the .NET Framework.
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
As I was expectiong this answer, not everything in this world is based on .NET, thereby, it's not only about useability but also about some fun.
LPCTSTR Dutch = TEXT("Double Dutch ");
|
|
|
|
|
Try googling for "Boehm GC".
|
|
|
|
|
Hi,
I have a VC+ 6.0 application, I would like that when it is launched (run) ... it's Dialog will be Minimized immediately so the user does not bothered it ... until they want so!
I did invoke CDialog::OnSysCommand(SC_MINIMIZE,SC_HOTKEY) & CWnd::OnSysCommand(SC_MINIMIZE,SC_HOTKEY) in OnInit() but it did not worked!
Any one can help?
Thank in-advanced,
|
|
|
|
|
See if this solution helps.
PostMessage(WM_SYSCOMMAND, SC_MINIMIZE);
Kuphryn
|
|
|
|
|
Hi Kuphryn,
Thank you very much for help, it works as a I wanted!
Many thanks,
ATC
|
|
|
|
|
|
hi,
I have tried to implement a error prompt dialog box which pops up when I execute some calculations in a dialog box. I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again. What should be a good way to have a dialog box to receive the data? By Modal dialog instead?
How do I actually do that inside a dialog class calling another dialog class?
|
|
|
|
|
oRion wrote:
I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again
Modeless dialog lives it's own life after it's created, handling window messages sended to him.
oRion wrote:
What should be a good way to have a dialog box to receive the data? By Modal dialog instead?
Yes.
oRion wrote:
How do I actually do that inside a dialog class calling another dialog class?
There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from.
They return IDOK, if the modal dialog was closed with OK.
Pavel
Sonork 100.15206
|
|
|
|
|
oRion wrote:
How do I actually do that inside a dialog class calling another dialog class?
Pavel wrote:
There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from.
They return IDOK, if the modal dialog was closed with OK.
Thanks for the reply. : )
I am not too sure where to set the modal dialog parent to the dialog? How to reference or get a handle in the parent dialog?
|
|
|
|
|
i've implemented an IShellBrowser, created an IShellView2 with CreateViewObject, but when i create a window with CreateViewWindow2 to display my files, i also get the "web view" on the left of the window.
i tried to remove it with FWF_NOWEBVIEW in FOLDERSETTINGS.fFlags, but the web view is still there...
how to remove it ?
|
|
|
|
|
Hi,
Please can someone tell me, where do I get the URL Encoder
for C++.
Many Thanks,
John
|
|
|
|
|
Err... what the hell is an "URL Encoder"?
Could you give an example what it should do?
-Dominik
|
|
|
|
|
Hi Dominik,
Apparently I want to encode a string in C++ and then store the same in a char field.
Thanks,
John
|
|
|
|
|
What does "encode" mean in this context?
|
|
|
|
|
Encode would imply parsing a string with values.
ex. if the string was www.yahoo.com before encryption,
after encryption it would be something like
www&&yahoo^com.
the characters would be replaced.
|
|
|
|
|
So you need a function which does the same as the function escape("") in JavaScript? I don't know any existing source which does this. But it should not be that hard to replace some characters with some other, especially if you use CString or STL strings.
|
|
|
|
|
Yes, I need something like escape in java!!!
Please can you help me out with it, I am pretty newbie in
C++.
Thanks Dominik,
John
|
|
|
|
|
|
Just as an aside through boredom theres also encoding of IP addresses. Its pretty stupid but quirky in a bored sort of way. Its basically turning each decimal octet into a hex string or octal string.
You can find out about that here -
http://www.pc-help.org/obscure.htm#hexip
boredom is a bad thing on a board like this
|
|
|
|
|
Use the InternetCanonicalizeUrl() function
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|