WEB开发网
开发学院手机开发Windows Mobile 开发 Windows Mobile平台上重写Back健的行为 阅读

Windows Mobile平台上重写Back健的行为

 2010-08-22 12:56:00 来源:WEB开发网   
核心提示:// If back key is overriden, back button messages are sent in a WM_HOTKEY to the menu bar// with the id VK_TBACK in the LPARAM.if (VK_TBACK == HIWORD(lParam) &&

// If back key is overriden, back button messages are sent in a WM_HOTKEY to the menu bar

// with the id VK_TBACK in the LPARAM.

if (VK_TBACK == HIWORD(lParam) && (0 != (MOD_KEYUP & LOWORD(lParam))))

{

// Send a message to the check box to see if it's checked or not

HWND hwndCheck = GetDlgItem(hwnd, IDC_CHECKBACK);

if (BST_CHECKED == SendMessage(hwndCheck, BM_GETCHECK, 0, 0))

// check box is enabled, so we process the back key

SHSendBackToFocusWindow(Msg, wParam, lParam);

}

else

{

// not enabled, revert to default back behaviour

MessageBox(hwnd, tszBackText, tszBackCaption, MB_OK | MB_ICONINFORMATION);

SHNavigateBack();

}

}

break;

default:

bReturn = FALSE;

break;

}

return bReturn;

}

上一页  1 2 3 4 

Tags:Windows Mobile 平台

编辑录入:coldstar [复制链接] [打 印]
赞助商链接