|
I am having error that shown below
Unhandled exception at 0x7c812afb in GUI2.exe: Microsoft C++ exception: CFileException at memory location 0x015ff79c..
fp2.Read(text, text.Getlength()) can't work
|
|
|
|
|
Nicholas Amh wrote: fp2.Read(text, text.Getlength()) can't work
That's what I previously explained to you. Please read the documentation and learn how to use variables, classes, their properties and methods.
|
|
|
|
|
CStdioFile ipFile;
if(ipFile.Open(_T("C:\\abc.txt"), CFile::modeRead | CFile::shareExclusive | CFile::typeText) == 0)
{
cout<<"unable to open file.";
return 0;
}
CString str;
while( ipFile.ReadString(str) != NULL)
{
cout<<str<<endl;
}
ipFile.Close();
This code works inside your project? no?
|
|
|
|
|
Hi, Thanks for helping out. But it don't work.
|
|
|
|
|
some error, exception or just wrong output?
|
|
|
|
|
Thank you theCPkid. I knew where is the error. I can't put CFile::shareExculsive or shareDenyRead ot etc. Thanks alot
|
|
|
|
|
glad your problem is solved now.
|
|
|
|
|
Anyone know how to color the background , Text and the border of the an owner drawn CButton ?
|
|
|
|
|
[this]shows how to set text color. inside the same function, you can draw a background color and border.
|
|
|
|
|
|
Have a look at this[^]
- ns ami -
|
|
|
|
|
There is no simple set functions to change the color of a button. You have to owner draw it. She the Owner Draw Button Step-by-Step [^] article.
modified on Wednesday, October 21, 2009 8:04 AM
|
|
|
|
|
No.
You can use Shell buttons
|
|
|
|
|
|
Hi All,
I am using visio2003 to draw a class diagram , in that for a class i have given a method and for that i have WPARAM and LPARAM as the parameters .But in visio there is no option to give WPARAM and LPARAM as parameters in method for a class.Can anyone tell me how to do it.
Thanks,
Hari
|
|
|
|
|
Hi All,
I need very basic program in c using UTF charecter.
For example:
Give the input as UTF character and Print the same input as a output.
Thanks in Advance..........................
Mohan T
|
|
|
|
|
Is this using microsoft products. If so then why the need for C rather than C++. Might be able to help
Iain
|
|
|
|
|
Thanks for ur reply...But we created all codes in C..only this part pending......
Mohan T
|
|
|
|
|
So are you restricted to C because of a technology choice. You are using Microsoft. You need to look for support for "locale". Possibly can help but google is your friend.
|
|
|
|
|
You can use the MultiByteToWideChar() api to convert a UTF character to UNICODE character.
|
|
|
|
|
Hi
I am getting below error while compiling the my source code in VC++(Win32). But the same code get complied in another machine. i don't know why?
fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
if provide me the step great help full
regards
gopal
|
|
|
|
|
Right click on project->properties->configuration manager button-> Active solution configuration
Make sure that if you are using a 32 bit machine, then solution configuration is x86 and if you are using 64 bit, then it shud' be x64 
|
|
|
|
|
Hi
My machine is 32bit windows xp. I have done done configuration x64 in Active solution configuration earlier. but still i am getting same error
Regards
Gopal
|
|
|
|
|
for 32 bit, your platform should be x86. make sure to set it as active. if you still get the above error, then good luck! 
|
|
|
|
|
There's another option properties->configuration properties ->Linker->Advanced->Target Machine. 
|
|
|
|