Daniele Cruciani
Programmatore Developer PHP/MySQL Freelance
mobile: +39 3489215204

icq skype msn linkedin fb t ff youtube picasa google
seconds to the end of World
End of World 21 December, 2012 11:11:00
Hire me before that day! | don't bother

You are here

Simulate user input

    void CMyAppView::SignalImageStored()
    {
           TKeyEvent aKeyEvent;
           TEventCode aType;
           aKeyEvent.iCode = EKeyMenu;
           aKeyEvent.iScanCode = EStdKeyMenu;
           aType = EEventKey;
           iCoeEnv->SimulateKeyEventL(aKeyEvent, aType);
    }
    

    iCoeEnv is a member of CAknView class, this is useful to open menu automatically, maybe after a laps of time.

    ... and this cause only menu event, not the corresponding key be pressed when menu is visible, so setting a timer event that cause SignalImageStored be called (i.e. from a CActive derived class) could not cause select action. There can be some problem if the view is no more visible/activated ... (to be added a test on active state of this view.

    English
    Tags: