Discussion Board

Results 1 to 15 of 17

Hybrid View

  1. #1
    Registered User ArvinShahidi's Avatar
    Join Date
    Jul 2009
    Posts
    20
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    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 ArvinShahidi's Avatar
    Join Date
    Jul 2009
    Posts
    20
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    try it like:

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

  5. #5
    Nokia Developer Moderator A.A.M.'s Avatar
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,308
    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 ArvinShahidi's Avatar
    Join Date
    Jul 2009
    Posts
    20
    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 Moderator A.A.M.'s Avatar
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,308
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved