×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    How to get notification on change in Orientation.

    Hi,

    I developed one exe which display some graphics(text with some background image) on desktop. My TickerContainer class is derived from CBase. Now problem is that " how can i get event when user change display mode (portrait to landscape and vice-versa).

    i know that by implementing CEikAppUi::HandleResourceChangeL() in application, we get notification in HandleResourceChangeL. but my exe is not derived from CEikAppUi or CCoeControl.

    is there any solution to this problem?

    savaj.

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

    Re: How to get notification on change in Orientation.

    if you can not find any clean way, you could always have an timer that checks the Screendevice time to time, to see whether screen resolution has changed.

  3. #3
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: How to get notification on change in Orientation.

    You could try CCoeEnv::AddResourceChangeObserverL() , and then check the TWsEvent received to see if it helps, though I never tried it myself.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: How to get notification on change in Orientation.

    Since most events dispatched to various handlers are actually unwrapped from a generic Window Server event, you may try experimenting with a raw RWsSession first.

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: How to get notification on change in Orientation.

    You could try the watching for the EEventScreenDeviceChanged event and then acting on that, though personally I would log all events coming through and work out which one is the actual event when the switch happens.

    http://www.symbian.com/Developer/tec...tedEvents.html
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  6. #6
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: How to get notification on change in Orientation.

    Thanks to all for reply,

    Sorry for replying late, as i was OOO.

    i resolved issue in following way.

    first i enabled screen change event of my RWindowGroup
    iWindowGroup.EnableScreenChangeEvents();

    then implemented one EventListener. which is an Active object.
    EventListener notify on change in orientation.

    iWsSession.GetEvent(wsEvent); //TWsEvent wsEvent;

    switch (wsEvent.Type())
    {
    case EEventScreenDeviceChanged:
    {
    iClient->HandleKeyEventL(*wsEvent.Key(),EEventScreenDeviceChanged);
    break;
    }
    }


    savaj..

Similar Threads

  1. Profile change notification
    By yogesh.bhople in forum Symbian C++
    Replies: 6
    Last Post: 2010-08-06, 12:44
  2. Notification for change in battery level
    By venunet in forum Symbian C++
    Replies: 4
    Last Post: 2009-05-21, 08:43
  3. Wrong NaviPaneText after orientation change
    By dracula78 in forum Symbian User Interface
    Replies: 9
    Last Post: 2008-05-20, 16:31
  4. Item state change events - notification not recd when run on nokia 6630
    By chintan@geodesic.com in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-13, 07:51
  5. Can't change application UI orientation
    By SamoylovBoris in forum Symbian C++
    Replies: 5
    Last Post: 2007-07-25, 16:23

Posting Permissions

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