×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2004
    Location
    Russia, Novosibirsk
    Posts
    18

    How to get the Application object?

    I have project made with Appwizard on Visual Studio 6.0. It created *app, *container, *doc, *ui - classes. So, How can I get the pointer to the app object?(or to doc, container, ui object)

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    whay do you need it ? and where in the system you would like to use it ?

    yucca

  3. #3
    Registered User
    Join Date
    Mar 2004
    Location
    Russia, Novosibirsk
    Posts
    18
    I have a library that uses some function, i.e. Myfunc();
    i want to do something like this:
    #define Myfunc() GetApp()->GetMyEngine()->Myfunc()

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    hmmm

    all processes are using their own memory space, processes can't use pointers from other processes in side them.

    So if you are thingking of using a pointer from other app that is running in different process, then you should forget it.

    yucca

  5. #5
    Registered User
    Join Date
    Mar 2004
    Location
    Russia, Novosibirsk
    Posts
    18
    Yucca, you didn't understand me, i call Myfunc() from the same app. In my project there are no globals, so I don't know how to get the pointer to the current application.

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    inside you app you could get pointer to your appui like this:

    CCoeEnv::static()->AppUi() ,or
    CEikonEnv::Static()->EikAppUi()

    Look the appui class headers & SDK documentation and you'll see how to get application & document class pointers from appUi.

    yucca

  7. #7
    Registered User
    Join Date
    Mar 2004
    Location
    Russia, Novosibirsk
    Posts
    18
    Thank you very much, Yucca.

Posting Permissions

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