BOOL XAP_Win32Dialog_PluginManager::_onCommand(HWND hWnd, WPARAM wParam, LPARAM /*lParam*/) { // This handles WM_COMMAND message for the top-level dialog. WORD wId = LOWORD(wParam); switch (wId) { // LIST TAB case XAP_RID_DIALOG_PLUGIN_MANAGER_BTN_ACTIVE: return 0; case XAP_RID_DIALOG_PLUGIN_MANAGER_BTN_INSTALL: event_Load(); return 0; case XAP_RID_DIALOG_PLUGIN_MANAGER_LBX_LIST: { m_curSelection = getListSelectedIndex( wId ); refreshPluginInfo(); return 0; } case IDOK: case IDCANCEL: EndDialog(hWnd,0); return 0; default: // we did not handle this notification UT_DEBUGMSG(("WM_Command for id %ld\n",wId)); return 0; // return zero to let windows take care of it. } }
BOOL XAP_Win32Dialog_WindowMore::_onCommand(HWND hWnd, WPARAM wParam, LPARAM /*lParam*/) { WORD wId = LOWORD(wParam); int nItem; switch (wId) { case XAP_RID_DIALOG_WINDOWMORE_LIST: switch (HIWORD(wParam)) { case LBN_SELCHANGE: // NOTE: we could get away with only grabbing this in IDOK case nItem = getListSelectedIndex(wId); m_ndxSelFrame = getListDataItem(wId, nItem); return 1; case LBN_DBLCLK: nItem = getListSelectedIndex(wId); m_ndxSelFrame = getListDataItem(wId, nItem); EndDialog(hWnd,0); return 1; default: return 0; } break; case IDCANCEL: // also XAP_RID_DIALOG_WINDOWMORE_BTN_CANCEL m_answer = a_CANCEL; // fall through case IDOK: // also XAP_RID_DIALOG_WINDOWMORE_BTN_OK EndDialog(hWnd,0); return 1; default: // we did not handle this notification UT_DEBUGMSG(("WM_Command for id %ld\n",wId)); return 0; // return zero to let windows take care of it. } }
BOOL AP_Win32Dialog_InsertHyperlink::_onCommand(HWND hWnd, WPARAM wParam, LPARAM /*lParam*/) { WORD wId = LOWORD(wParam); switch (wId) { case IDCANCEL: setAnswer( a_CANCEL ); EndDialog(hWnd,0); return 1; case IDOK: { char buf[PATH_MAX]; getControlText( AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK, buf, PATH_MAX ); setHyperlink(buf); } setAnswer( a_OK ); EndDialog(hWnd, 0); return 1; case AP_RID_DIALOG_INSERTHYPERLINK_LBX_LINK: { UT_sint32 result = getListSelectedIndex( wId ); if( result != LB_ERR ) { char buf[PATH_MAX]; getListText( wId, result, buf ); setControlText(AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK, buf); } } return 1; default: // we did not handle this notification UT_DEBUGMSG(("WM_Command for id %ld\n",wId)); return 0; // return zero to let windows take care of it. } }