|
"that window",which window should be handled,yes,iam calling from OnTimer(),can u explain in detail please,
sree.
-- modified at 7:12 Monday 19th June, 2006
|
|
|
|
|
If you are using mfc, then you can do this:
AfxGetMainWnd()->ScreenToClient(&cp1);
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
thank u very much,
really u helped me a lot,
sree.
|
|
|
|
|
Other than DDE, what other technologies exist through which two applications can communicate with one another?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
1.Com
2.Socket
3.Messages
4.Shared memory
5.Events, mutex etc
nave
|
|
|
|
|
Apart from already being said, there is pipes, named and unnamed.
|
|
|
|
|
one more WM_COPYDATA
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Remote Procedure Call (RPC).
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
1. Write data from memory to file on disk, read data from file back into memory
2. Null modem cable, loop it from COM1 to COM2 - one program writes to COM2 and the other reads from COM1 and vice versa
Just kidding ...
I've seen better runs in my shorts! - Patches O'Houlihan
|
|
|
|
|
How to access database(MS Access or Oracle) from c++ ?
sandi
|
|
|
|
|
Use CDatabase class
See Here [^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Guys,
Is there an easy way of enumerating the systems devices list to find out if there is not just a removable disk connected, but specifically an iPod?
Cheers,
Steve
|
|
|
|
|
Steverty wrote: Is there an easy way of enumerating the systems devices list to find out if there is not just a removable disk connected, but specifically an iPod?
is WM_DEVICECHANGE of any help!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Im not sure See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
Hello everyone,
I need to have a socket programming sample (a client and a single threaded server). I have found a lot of ones based on MFC (for example, by Microsoft's specific socket class). I prefer to have a socket client/server sample based on standard socket interface (like send, receive, accept, etc. which I can easily port to other platform, like Linux and UNIX). Could anyone suggest a client/server sample based on standard socket interface?
thanks in advance,
George
|
|
|
|
|
This may be a little too simple but a good starting point:
http://www.frostbytes.com/~jimf/papers/sockets/winsock.html
Check this one out as well:
http://beej.us/guide/bgnet/output/htmlsingle/bgnet.html
|
|
|
|
|
Thank you capricious_001!
They are just what I am looking for.
regards,
George
|
|
|
|
|
Hi,
I have tried your second sample. When compiled with Visual Studio, there are compiling errors dealing with "can not find header files", unistd.h, sys/socket.h, netinet/in.h, arpa/inet.h, sys/wait.h, it seems that they are Linux/UNIX specific header files, right?
How to port them to Windows platform?
regards,
George
|
|
|
|
|
Ok if you want to use it on a windows platform, replace those header files with:
#include <Winsock2.h>
Then everything should work out fine!
Robbie
|
|
|
|
|
Hi Robbie,
If you read through the source file for server (server.c), there are functions like waitpid and fork, I think they are not supported on Windows platform, right? It can not be solved by simply removing the header files, I have verified that if we simply remove the header files, function waitpid will not be supported.
regards,
George
|
|
|
|
|
Hey George,
All the examples there were built using a GCC based compiler. So if you want to compile using those header files, you can use a Windows based port of Linux called Cygwin. You can get it at:
http://www.cygwin.com
I am suggesting cygwin because it looks to me you want to build linux/unix based applications on a windows machine so using cygwin will make you feel right at home. If you dont want to get into cygwin (because it does take awhile to download and setup if your new to it), I suggest making a visit to http://gcc.gnu.org. I'm sure theres an MS-Win32 distribution of GCC on that site.
Robbie
|
|
|
|
|
Thank you Robbie!
Cygwin is a good idea. But I think if I want to choose Windows version gcc, only the gcc itself is not enough since it is only a compiler/linker and the header files still can not be found. Agree?
regards,
George
|
|
|
|
|
Hey Guys,
It must be a very simple mistake I am making however I am receiving a problem when passing a LPSTR value by reference.
I have 2 functions. Below are their prototypes:
bool GetRSLocation_Reg(LPSTR&);
bool retrieveLogFileLocation(LPSTR&);
LPSTR RegLocation
if(GetRSLocation_Reg(RegLocation)){
cout << "The output of the RegLocation var is correct here: " << RegLocation << endl;
if(retrieveLogFileLocation(RegLocation)){
}
}
The first function returns in a file path and assigns it to a LPSTR variable by reference. When outputting the referenced value WITHIN the function definition of "GetRSLocation_Reg" to console, it is correct. Before the "retreiveLogFileLocation" function is called, RegLocation also returns the correct value. However within function definition for retreiveLogFileLocation, the contents of the variable RegLocation have changed. It appears to be holding gibberish :s
Would anyone know what I am doing wrong that is causing this?
Thanks
Robbie
|
|
|
|
|
Probably within the GetRSLocation_Reg function you assign a temporary string (maybe allocated on the stack) to the RegLocation pointer. This string cannot be used after exiting from function, because the stack is reused by other calls.
You can try another way, by allocating a space for RegLocation before calling the function:
bool GetRSLocation_Reg(LPSTR location)
{
. . .
strcpy(location, .....);
return true;
}
char RegLocation[256];
if(GetRSLocation_Reg(RegLocation))
{
. . .
}
Alternatively, you can use CString class (in MFC projects) or std::string class from STL.
|
|
|
|