|
again iam getting window coordiantes.not parent co-ordinates
please help me.
CProfileWindow myWindow;
HWND hParentWnd = ::GetParent(myWindow);
::ScreenToClient(hParentWnd, &cp1);
|
|
|
|
|
Didn't you said you are calling it from OnTimer of your child window? If that's the case, then you should get the handle of that window for GetParent(...).
Btw, are you using mfc?
|
|
|
|
|
"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
|
|
|
|