Discussion Board

Results 1 to 6 of 6
  1. #1
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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 symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    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 david.caabeiro's Avatar
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    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 Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    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 savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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
  •  
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