Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Global notes

From Wiki
Jump to: navigation, search
Article Metadata
Created: symbianyucca (30 Mar 2007)
Last edited: hamishwillee (23 Jul 2012)
Reviewer Approved    Thumbs up icon sm.jpg

Global notes can sometimes be really handy to use, since they show the note in their own window group and can also be used inside tight loops where normal notes fail to show. They do cause focus change in the application and can lead to problems on some platforms if a global error note is trying to display itself while a global wait note is active. Also you can't switch between applications while showing a global note. For these reasons progress & wait notes should be used instead of global wait notes.

Libraries needed:

LIBRARY aknnotify.lib eiksrv.lib

Header file needed:

#include <aknglobalnote.h>

Following code sample shows an example use of the global note:

void ShowNoteL(const TDesC& aMessage)
ShowGlobalNoteL(EAknGlobalInformationNote, aMessage);
void ShowGlobalNoteL(TAknGlobalNoteType aNoteType, const TDesC& aMessage)
iNote = CAknGlobalNote::NewL();
iNoteId = iNote->ShowNoteL(aNoteType,aMessage);
void StopGlobalNoteL(void)
if(iNote && iNoteId >= 0)
iNoteId = -1;

With this code you need to have the following member variables included in your class declaration:

TInt iNoteId;
CAknGlobalNote* iNote;

With the ShowGlobalNoteL() function the possible global note id values are:

- EAknGlobalInformationNote

- EAknGlobalWarningNote

- EAknGlobalConfirmationNote

- EAknGlobalErrorNote

- EAknGlobalChargingNote

- EAknGlobalWaitNote

- EAknGlobalPermanentNote

- EAknGlobalNotChargingNote

- EAknGlobalBatteryFullNote

- EAknGlobalBatteryLowNote

- EAknGlobalRechargeBatteryNote

- EAknCancelGlobalNote

- EAknGlobalTextNote

This page was last modified on 23 July 2012, at 08:00.
34 page views in the last 30 days.