×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    126

    Reading/writing a file

    Hi,
    I want to read a text file and draw the data from the file in form of listbox(CAknSingleGraphicStyleListBox).
    Can some one tell me how shld i do that and suggest me some sample code which does the same.
    Thanks in advance

  2. #2
    Super Contributor
    Join Date
    Oct 2005
    Posts
    739

    Re: Reading/writing a file

    Quote Originally Posted by kalyanich
    Hi,
    I want to read a text file and draw the data from the file in form of listbox(CAknSingleGraphicStyleListBox).
    Can some one tell me how shld i do that and suggest me some sample code which does the same.
    Thanks in advance
    You can put data as items in the list box.

    read from file and put it as the first item in the list box.


    peter

  3. #3
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    126

    Re: Reading/writing a file

    Hi,
    Can u suggest some sample code for doing that bcoz i am unable to do that.
    That would be very helpfull

  4. #4
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Reading/writing a file

    Quote Originally Posted by kalyanich
    Hi,
    I want to read a text file and draw the data from the file in form of listbox(CAknSingleGraphicStyleListBox).
    Can some one tell me how shld i do that and suggest me some sample code which does the same.
    Thanks in advance
    Hi kalyanich,

    ///////////////////////////
    RFs fs;
    fs.Connect();
    RFile tfile;
    TInt err=tfile.Open(fs,_L(""),EFileRead);
    if(err==KErrNone)
    {
    TInt fileSize;
    tfile.Size(fileSize);
    HBufC8* hBuf=HBufC8::NewL(fileSize+1);
    TPtr8 ptr=hBuf->Des();
    tfile.Read(ptr);
    ///
    Read data from the file into decriptor then after perform parsing on that perticular descriptor through You can get string from the desc, and convert in 16 bit desc, after add in listbox item...for listbox example in the sdk.. and forum..
    ......
    }
    tfile.Close();
    fs.Close();


    hope it will help you..!
    NO gain without pain..!

Similar Threads

  1. Warning message while reading/writing data in to a file.
    By ashishga in forum Mobile Java General
    Replies: 15
    Last Post: 2009-01-01, 03:51
  2. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Symbian
    Replies: 35
    Last Post: 2008-01-17, 09:12
  3. Creating and installing SIS file...
    By Himanshu_Joshi in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-04-12, 17:36
  4. How to create mbm file?
    By qt_raip in forum Symbian Tools & SDKs
    Replies: 13
    Last Post: 2004-05-12, 11:07
  5. Replies: 0
    Last Post: 2002-11-19, 08:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×