|
Thanks for replying.
There's a lot of permutations to the things you're saying, but don't forget I can overload a function and apply my own set of parameters to it, so long as I make sure I can identify with at least one of the functions already declared in the class.
That was one of the things that attracted me to the function with the 'void*' parameter (because it was already declared and I could use its 'void*' to transfer the struct data to it, and do my work where it's defined).
Considering the amount of effort I might have to invest in order to make this creative idea of mine work, even if I were to succeed, in the end the poor person coming behind me might become lost (most likely would become lost) in the convolution behind the cleverness. That said, I am beginning to feel maybe I should just stick to something simpler; ESPECIALLY if it works!!
William
Fortes in fide et opere!
|
|
|
|
|
TOXCCT >>> GEII power
|
|
|
|
|
WREY wrote:
I DO NOT want to declare 'MyStruct' as global
just curious but, WHY ???
TOXCCT >>> GEII power
|
|
|
|
|
To preserve the "principle of encapsulation".
Bikram Singh
|
|
|
|
|
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.
|
|
|
|