|
but we never declare types into a function
you answer, you answer, but do you try to understand the subject ?
TOXCCT >>> GEII power
|
|
|
|
|
first, never say never!
i admit i did not read the the thread completely, mu fault.
but, it is possible to declare a struct inside of a function. sure, the uses may be limited, but it can be useful sometimes. one case i can think of is a simple log file which uses the struct as a "record".
Sure, the "log reader" would need access to this struct too, which is why it's silly to have the struct inside the function.
But it can have uses. Not that I can think of any at the moment!
Bikram Singh
|
|
|
|
|
I apply ‘HIWORD’ macro to get the high byte from a WPARAM value,
HOW can I get a negative value?
For example: The value is –120,but what I get is 65416.
Thank you!!!
|
|
|
|
|
You want to find some material for C/C++ that discusses signed and unsigned types. Maybe you can look at cplusplus.com
-pete
|
|
|
|
|
Thanks a lot.
But I hope that someone can tell me a little about it.
|
|
|
|
|
Thanks,I get it.
DWORD dwWp = 4287102976;
short int aaa = (short int)(HIWORD(dwWp));
TRACE("value = %d\n",aaa);
It's OK!!
|
|
|
|
|
i use smtp send emails to our customers.
i am confused with cc and bcc, do you know differeces between cc and bcc? they look the same
cheers
includeh10
|
|
|
|
|
Courtesy copy. Use when you just want to let someone to know the mail has been sent to other people. If some one has an action to perform, do not CC them, sent it to them instead. Addressees in the To: list will see all the addresses in the CC: list. If you told Andy you would ask Bill something, send it To: Bill and CC: Andy.
Blind Courtesy Copy. Similar to the above, but the To:’s and CC:’s cannot see the BCC:’s. If Bill does not reply, send another message To: Bill and BCC: Bill’s boss. Bill will not know you ratted him out.
AGN
|
|
|
|
|
|
LOL! I almost mentioned this in the first post. Perhaps I should have.
CC’s have been part of standard business practice since way back, when the courtesy copy was created using sheets of carbon paper and typewriters, etc. This has led to the confusion that that CC stands for carbon copy.
AGN
|
|
|
|
|
|
|
|
|
|
I would like to get into to owner drawn controls (with MFC), can someone point me to and artical/s or example/s that explain how to do this, i cant seen to find any good ones
|
|
|
|
|
there are samples in VC CD, easy to learn
cheers
includeh10
|
|
|
|
|
I have two PC's running on a lan at home, with lan IP addresses of 192.168.0.101, and 192.168.0.100. The router has public IP address for the wan. I can find out what the public IP address, for example at http://www.whatismyip.com/, but I do not know how to write a VC++ application that will run on one of the lan PCs and programmatically find the public IP address. (I can find all the IP address for the local machines running the application.)
Can anyone set me straight? Will your solution work in more complex network environments?
A.G. Neville
|
|
|
|
|
Don't think you can do this from the PC. The public IP is set up on the router, and the PCs will have the internal IP address of the router set as their gateway. The PCs will have no knowledge of the external IP address of the router.
|
|
|
|
|
Thanks; perhaps I was being a bit too constraining in my post when I said execute the app on the local pc. I don't mind if the app has to bounce messages to off site, eg to a web server.
I have seen three 'apps' do it:
1) MyWanIP.exe. They state they send messages to a web server in the marketing blurb.
2) Xolox.exe. This is P2P app, hence there is a good chance there are messages bouncing around, as above
3) http://www.whatismyip.com/ (yes, not really an app and not on my PC) Again there is network traffic to and from my pc.
I can believe Graham is right, and there is no easy, local way. If I do it like the above applications, what network traffic needs to be sent and how do I dig into the result to find that IP address?
AGN
|
|
|
|
|
This: http://checkip.dyndns.org[^], is specifically meant to provide an easy way to parse for and find an external IP.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Thanks for info.
Yes the parsing looks easy. This certainly gets me started. I hope the web site does not go down ... my app will go with it.
Does anyone know how they do it?
AGN
|
|
|
|
|
That service has been around for years, and that site I posted is actually one of their recommend methods for getting the ip for client programs. The way it works is simple, since the webserver only sees your external IP on the packet, so that's what it shows. I can give you anything super specific, but that's the gist.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
In a multithreaded VC++ program, how can I find %of CPU/ thread from within the program and report it? Also how can I find the memory footprint of the process from within the program? Is it possible? (Not using any external tools like perfmon, just using C++ code from the program itself)
|
|
|
|
|