Hi all, does anyone know how to compile a resource file in Chinese with a English SDK? Each time I tried to compile, I got error message complaining "RComp failed ..." Must I compile the Chinese resource file in a Chinese SDK? Thank you!
Hi LiuxG,
I am developing an application in which i write into a file in one .cpp files and read it back and display in an EDWIN placed in side a form.When i see the form in view mode it displays each character in the edwin separated by a box shaped thing but when i view it in edit mode it just shows perfect.I think theres some problem coz of different formats in writing buffer and reading buffer for a file( TBuf for writing and TBuf8 for reading ).
i tried taking a big buffer and constantly appending to it the contents of the small TBuf8 buffer but it didnt work.Can you plz tell me what should i change in the following code to get it perfectly work ?
/////////////////////////////////////////////////////////////////////////////////
Writing in a file in one source file
/////////////////////////////////////////////////////////////////////////////////
TBuf<256> GetBuf;
GetBuf.Copy(*(iAppDialog->TextEngine()->GetTextForTodo()));
TBuf<256> TempFile;
TBuf<128> Dir;
TempFile.Format(_L("\\system\\apps\\form\\temporary.txt"));
Dir.Format(_L("\\system\\apps\\form\\"));
RFs fileSession;
User::LeaveIfError(fileSession.Connect());
CleanupClosePushL(fileSession);
fileSession.MkDir(Dir); // Ignore return value
RFile file;
if (file.Replace(fileSession, TempFile, EFileWrite) != KErrNone)
{
CAknInformationNote* informationNote = new
(ELeave)CAknInformationNote;
informationNote->ExecuteLD(_L("Failed To Open File"));
CleanupStack::PopAndDestroy(); // close fileSession
return;
}
TPtrC8 ptr((TUint8*)GetBuf.Ptr(), GetBuf.Size());
CleanupClosePushL(file);
file.Write(ptr);
file.Close();
CleanupStack::PopAndDestroy();
CleanupStack::PopAndDestroy();
///////////////////////////////////////////////////////////////////////////////
Reading from that same file in another source file
///////////////////////////////////////////////////////////////////////////////