S
Spacetech
Im trying to make it so I can read something out of a file and get it
into a string so I can see if It matches what IM looking for.
Here is what I got:
HANDLE hFile;
DWORD wmWritten;
char strVal[1024];
hFile =
CreateFile("settings.ini",GENERIC_READ|GENERIC_WRITE,
0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
if(ReadFile(hFile,strVal,1024,&wmWritten,NULL) ==
"ontop=1"){
AppendMenu(hSubMenu, MF_STRING|MF_CHECKED, TOP,
"&Always On Top");
}
else if(ReadFile(hFile,strVal,1024,&wmWritten,NULL) ==
"ontop=0"){
AppendMenu(hSubMenu, MF_STRING|MF_UNCHECKED, TOP,
"&Always On Top");
}
else{
AppendMenu(hSubMenu, MF_STRING|MF_CHECKED, TOP,
"&Always On Top");
}
I got this: "error: ISO C++ forbids comparison between pointer and
integer"
I am useing Code::Blocks v1.0
Please Help
into a string so I can see if It matches what IM looking for.
Here is what I got:
HANDLE hFile;
DWORD wmWritten;
char strVal[1024];
hFile =
CreateFile("settings.ini",GENERIC_READ|GENERIC_WRITE,
0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
if(ReadFile(hFile,strVal,1024,&wmWritten,NULL) ==
"ontop=1"){
AppendMenu(hSubMenu, MF_STRING|MF_CHECKED, TOP,
"&Always On Top");
}
else if(ReadFile(hFile,strVal,1024,&wmWritten,NULL) ==
"ontop=0"){
AppendMenu(hSubMenu, MF_STRING|MF_UNCHECKED, TOP,
"&Always On Top");
}
else{
AppendMenu(hSubMenu, MF_STRING|MF_CHECKED, TOP,
"&Always On Top");
}
I got this: "error: ISO C++ forbids comparison between pointer and
integer"
I am useing Code::Blocks v1.0
Please Help