×

Discussion Board

Results 1 to 15 of 17

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    20

    Hide/Show My App and Getting Key Like #123...

    Hi, I could hide my application by this codeSymbian C++ s6)


    CEikonEnv::Static()->RootWin().EnableReceiptOfFocus(EFalse);
    CEikonEnv::Static()->RootWin().SetOrdinalPosition(-1000, ECoeWinPriorityNeverAtFront);


    Now, I do not know how can I show it again, because the Symbian focus is located on another app after Set Ordinal.
    Could you please help me for finding a solution?
    it is important to me that my app appears with a specific code like #123 ...
    If you know better way I would appreciate help me.

    Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: Hide/Show My App and Getting Key Like #123...

    try searching for threads talking about CaptureKey, or check wiki for exmaples. Then when you capture the key, just use the SetOrdinalPosition to bring your app back to teh front(that also should have wiki exmaple, as well as loads of old discussion threads).

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    20

    Re: Hide/Show My App and Getting Key Like #123...

    Thanks for your reply.

    I have just found a class as you can check here:

    " http://wiki.forum.nokia.com/index.ph...ui_application "

    Then I have added this class to my app as CKeyCapture class and when I am writing this code :

    CKeyCapture* MyKey = new CKeyCapture;

    in MyAppUi::ConstructorL()

    I have an error like "Error : CKeyCapture :no appropriate default constructor available "
    Could you please help me for getting the point. ?

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

    Re: Hide/Show My App and Getting Key Like #123...

    try it like:

    CKeyCapture* MyKey = new(ELeave)CKeyCapture();

  5. #5
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: Hide/Show My App and Getting Key Like #123...

    Try to do like this:

    in MyAppUi.h
    Code:
    class CCapKey2AppUi : public CAknAppUi, MKeyCallBack 
        {
        ...
        ...
        private:
           CKeyCapture* iMyKey;
        ...
        }
    in MyAppUi.h cpp in MyAppUi::ConstructorL()
    Code:
    iMyKey = CKeyCapture::NewL( this );

  6. #6
    Registered User
    Join Date
    Jul 2009
    Posts
    20

    Re: Hide/Show My App and Getting Key Like #123...

    Thanks for your reply.

    it does not work, and shows me some errors like :

    error C2065: 'iMyKey' : undeclared identifier
    \SRC\MYappui.cpp(79) : error C2664: 'NewL' : cannot convert parameter 1 from 'class MYAppUi *const ' to 'class MKeyCallBack &'

    Thanks,

  7. #7
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: Hide/Show My App and Getting Key Like #123...

    Are you sure that you have already declared iMyKey in the header file?

Posting Permissions

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