×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    24

    i want to lock my program to portrait

    I used the following code to lock my program to work only as portrait

    Code:
    #ifdef TMGN_SYMBIAN_5
        CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
        if(appUi){
            QT_TRAP_THROWING(appUi ->SetOrientationL( CAknAppUi::EAppUiOrientationLandscape));
        }
        #endif
    but i get an error that CEikonEnv is unknown i inluded #include <eikenv.h> and i again get that there is no such file name.

    I wonder how to make this code work or if there is another way of locking the application to portrait given that my application is self signed."i cann't access extra capabilities"

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: i want to lock my program to portrait

    Code:
    #ifdef Q_OS_SYMBIAN
    #include <AknAppUi.h>  // Need libs avkon cone eiksrv
    #endif
    ...
    ...
    #ifdef Q_OS_SYMBIAN
        // lock orientation
        CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
        if(appUi){
            QT_TRAP_THROWING(appUi ->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape));
        }
    #endif

Similar Threads

  1. Controlling Num Lock and Caps Lock Icon Display
    By pgarofalo in forum Symbian
    Replies: 1
    Last Post: 2010-04-21, 00:23
  2. portrait/landscape detection
    By tacchan666 in forum Mobile Java General
    Replies: 12
    Last Post: 2009-06-19, 18:27
  3. Device lock under program control
    By jellinek in forum Symbian
    Replies: 1
    Last Post: 2008-11-24, 19:22
  4. MIDlet for Portrait and Landscape
    By bemar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-07-26, 09:43
  5. Nokia forward-lock and OMA v1.0 forward-lock
    By fausti in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2003-03-18, 10:11

Posting Permissions

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