Simulare eventi dell'interfaccia

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

iCoeEnv è un membro di CAknView , questo è utile per aprire il menu automaticamente, ad esempio dopo un ritardo di tempo

... e questo genera solo l'evento menu, e non l'altra eventuale azione associata al tasto quando il menu è visibile, così impostando un timer ed un active object in ascolto che chiama SignalImageStored non può causare l'evento select. Ci possono essere alcuni problemi se la vista in questione non è visibile .. bisognerebbe testare lo stato di activated di this view.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.