Share via


Dynamic Assignment of SK1

4/8/2010

You can set the left soft key (SK1) to change depending on when a most recent event (MRE) occurs. The change includes a reset of the text associated with the softkey, and also execution of a Shell command when the softkey is hit. The programming elements that are used to set SK1 to reflect a change in event are the MREINFO structure and MRESetSoftkeyEvent function.

Note

Beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.

These APIs are defined in the <Adaptation Kit>\Public\Ossvcs\Oak\Inc\Mre.h file.

struct MREINFO {
   UINT cbSize;
   DWORD dwFlags;
   int iPriority;
   DWORD tDontOverwrite; // Do not overwrite this event until 
                         // (GetTickCount() >= tDontOverwrite).
                         // Ignored if 0.
   TCHAR* pszLabel;
   SHELLEXECUTEINFO* psei;
};
HRESULT MRESetSoftkeyEvent(
   const MREINFO* pmi
);

Remarks

The status data identifiers (SDIDs) SDID_MRE and SDID_ACTIVE_CALLCOUNT events from statstor are monitored by the Shell. All SDIDs are defined in the <Adaptation Kit>\Public\Ossvcs\Oak\Inc\Sdids.h file. The Shell changes SK1 according to the MREINFO structure. As with Windows Mobile Standard, SDID_ACTIVE_CALLCOUNT takes precedence over SDID_MRE.

OEMs should modify the information associated with SDID_MRE in statstor if they want to customize it. If the SDID_MRE event occurs, but the data associated with it is malformed, the default SK1 assignment will be used.

See Also

Other Resources

Soft Keys