Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
4/8/2010
A soft key's label can be programmatically refreshed from the registry by posting a message.
Note
Beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.
The following code example shows how to refresh the right soft key (SK2)'s label.
void GetHomeToRefreshSK2()
{
HWND hwndHome = FindWindow(TEXT("DesktopExplorerWindow"), NULL);
PostMessage(hwndHome, HM_RELOAD_BUTTON, VK_TSOFT2, 0);
return;
}
This functionality can be used to update the soft key in response to an external event, such as plugging a camera into a Windows phone. To refresh the left soft key label, pass in the parameter VK_TSOFT1 instead.