|
Im not exactly sure what you are trying to say with this are. I am not useing {} with the function in the class definition and that has been the stand that worked with every borland compiler I used in the past. I just recently started using Visual Studio.NET(2002) and now the convension gives me errors. I have even gotten errors trying to compile sample cade that was included with the Visual Studio Software. I wish I had the computer in front of me with compiler on it to try things out. but i have to wait till I get home to try anything.
|
|
|
|
|
lubatomy wrote:
the class definition in one file and them the actual code for the functions in a seperate file
These are the same thing. Typically, the declaration of a class typically goes in the .h file, and the definition of a class goes in the .cpp file.
Anyway, at the top of the .h file, do you have something like:
#if !defined(AFX_MYCLASS_H__83972473_D4D1_4923_9BD8_0FD75D2FB39C__INCLUDED_)
#define AFX_MYCLASS_H__83972473_D4D1_4923_9BD8_0FD75D2FB39C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class myclass
{
}
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Can any one of tell me how to get ip address from mac address . i know i can get it by using rarp command but i want to get it by using my program... Thanks in Advance
|
|
|
|
|
That I know of, the IP address is tied to the NIC, but not vice versa. Correct? If so, then you'll need to call gethostname() followed by gethostbyname() .
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hello David thanks for ur response but i think those functions wil not work with mac address i suppose ..
they r working only for hostname or ipaddress..
if i am wrong tell me the way for getting ip address from given mac address
|
|
|
|
|
In addition to kuphryn's suggestion, the MAC and IP addresses can also be obtained from GetAdaptersInfo() . I've an example of this if you would like me to send it to you.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
One solution is GetIpNetTable().
Kuphryn
|
|
|
|
|
Hello Kuphryn !! thanks for ur hint.... but by using the GetIpNetTable() function we r able to get the ip address present in our host computer arp entry but i want a function like gethostbyname() which gives ip address of specified system name present in the LAN, bcos in my application i am capturing the mac address i don't know how to get the ip address from that .. the arp entry contain a very few entries only .. if u find any solution please do reply
|
|
|
|
|
it compiles, runs, but makes nothing transparent. my code runs well on WinXP and Win 2000.
in the MSDN is written, that it should also work with win98!
does anybody has a clue? or an implementation of a alphablend funtion?
the code i use is:
//blalba
BLENDFUNCTION blend;
blend.BlendOp = AC_SRC_OVER;
blend.AlphaFormat = 0;
blend.SourceConstantAlpha = 110;//(wichtigster parameter (zw. 0 - 255))
blend.BlendFlags = 0;
AlphaBlend(dcMemBackground, 0, 0, nWidth, nHeight, dcMemForeground, 0, 0, nWidth, nHeight, blend);
thanx, greets
|
|
|
|
|
I belive lot of other apis like this one is OS dependened.
Tech.Support : Mam, is your pc running under windows?
Customer : No actually its close to the main door.
|
|
|
|
|
I am having a difficult time trying to get a value to increment. What I mean is if I have a static control for example called CValue that each time a button is pressed it will increase the value by one. So if CValue = 10 and the button is pressed, I want it to change the value of CValue to 11. Each time I try to do this, the compiler says some crap about converting CString to an int is impossible or something. I cannot remember because I just got out of bed to write this so that I may have a reply by the morning.
Can someone please help me. I know this is easy 'i think' but it has me tickled pink.
Thankyou
Ashman
|
|
|
|
|
Have you tried something like:
CString strValue;
CValue.GetWindowText(strValue);
int nValue = atoi(strValue) + 1;
CValue.SetWindowText(strValue);
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
DavidCrow wrote:
CString strValue;
CValue.GetWindowText(strValue);
int nValue = atoi(strValue) + 1;
CValue.SetWindowText(strValue);
Whoops!
CString strValue;
CValue.GetWindowText(strValue);
int nValue = atoi(strValue) + 1;
strValue.Format(_T("%d"), nValue);
CValue.SetWindowText(strValue);
INTP
|
|
|
|
|
No, BIG whoops! Thanks.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
What about GetDlgItemInt()?
SetDlgItemInt(IDC_MYCONTROL,MyCtrl.GetDlgItemInt(IDC_MYCONTROL) + 1);
onwards and upwards...
|
|
|
|
|
hello together,
i have a strange problem with the following asm command;
__asm call 0h
This command should jump to the next instruction and put the value of the position where the last call was made onto the stack! Well, it should, but i only get this message:
error C2415: improper operand type
Any ideas?
Thanks in advance!
|
|
|
|
|
How about:
__asm
{
call 0h
}
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
|
Indeed. It used to be that you had to do it that way (whether that was with Borland's compiler or Microsoft's compiler, I forget), but I've not done inline assembly in nearly a decade.
Are you sure that is a valid statement (for an Intel platform)?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I have a program that manages documents on a central area in the network and I need to tell if a file is in use by someone ele, when I try to open it. The program runs on each machine that access the central archive (no program runs on the server that holds the files). What is the right or the best way to do it ? Can I try to lock the file or rename it and see by the error returned if the file is open ? Is there any API function that tells me that ? If it´s a Word Doc, for instance, the Word gives me a hint, but Notepad doesn´t. I want to send my own msg to the user, despite of the app used to open the file. Is it possible ?
|
|
|
|
|
check out sdk's CreateFile() proc. if specified file is somehow locked, you get an invalid handle. you may then call GetLastError():
hope this helps...
|
|
|
|
|
or you could look at good old _sopen, passing the _SH_DENYRW flag
onwards and upwards...
|
|
|
|
|
hello,
i want to install my application (.exe) in a remote m/c. how to first copy the exe file to the remote m/c... .i know that a service is required to install & start in the remote m/c . now i want to install that remotely . how do i achieve that.???? please tell me how to install the application remotely ...i need it urgent.
please send code , article... urls...
|
|
|
|
|
skpanda wrote:
how to first copy the exe file to the remote m/c
How about CopyFile() , MoveFile() , or SHFileOperation() ?
For the rest, it sounds like you'll need RPC.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hello guys,
I think there is a bug in C++.
I had a very strange bug in my app but I fixed it..
What happened was somewhere in my code I wrote:
CString sTemp;
...//doStuff
sTemp = ((A_INTEGER == myObj.GetIntValue())? GetString("1"):GetString("2"));
...do more stuff
What happened now was that I used that sTemp string to put text in a list-control...
when I used the statement shown above and R1C2(Row1Column2) was filled with GetString("2") and R2C2 was filled with GetString("1") then in R1C5 the leftmost character was deduced by 1... When also R3C2 was filled with GetString("2") then R1C5 was deduced by 2 and so on...
in the other way no bug appeared....
The ONLY change I made in the code was that I replaced the line:`
sTemp = ((A_INTEGER == myObj.GetIntValue())? GetString("1"):GetString("2"));
with:
if(A_INTEGER == myObj.GetIntValue())
sTemp = GetString("1");
else
sTemp = GetString("2");
Which is still basically the same thing just in a different notation...
Does anyone know why this bug appeared?????
Any comments are welcome....
Greetings,
A puzzled programmer....
|
|
|
|