×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    69

    Overloading CEikDocument::OpenFileL() on Embedded Apps

    Hi!

    The topic on Embedded Apps and Document Handlers says that i have to overload CDocument::OpenFileL()? but how do i exactly overload it? what functions do i put inside there?

  2. #2
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Spain
    Posts
    329

    Did you find a solution?

    It would be nice if you wrote it in this forum.

    Thanks.

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    well, it depends on what you are trying accomplish. I don't know if it works for embedded apps, but you can try something like this to change a doc file...
    Code:
    CFileStore* CMyDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs)
        {
        Process()->SetMainDocFileName(KFileStore);
        return CEikDocument::OpenFileL(aDoOpen, KFileStore, aFs);
        }

  4. #4
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Spain
    Posts
    329
    Hi,

    Thanks for your response.

    I'm opening the file in the AppUi class and returning null to the framework.

    Code:
    CFileStore* CmimeDocument::OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs &aFs){
      iAppUi->OpenFileL(aFilename);
      return NULL;
    }
    Now my problem is that I want my app to exit itself, but if I call Exit() before return NULL the framework gives me an error. So I was thinking how to auto-exit, maybe setting a RTimer for a short time.

    Thanks
    Toni

Posting Permissions

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