INT_PTR CSearchDialog::OnCommand(WPARAM wParam,LPARAM lParam) { switch(LOWORD(wParam)) { case IDSEARCH: OnSearch(); break; case IDC_BUTTON_DIRECTORY: { BROWSEINFO bi; TCHAR szDirectory[MAX_PATH]; TCHAR szDisplayName[MAX_PATH]; TCHAR szParsingPath[MAX_PATH]; TCHAR szTitle[256]; LoadString(GetInstance(),IDS_SEARCHDIALOG_TITLE,szTitle,SIZEOF_ARRAY(szTitle)); GetDlgItemText(m_hDlg,IDC_COMBO_DIRECTORY,szDirectory,SIZEOF_ARRAY(szDirectory)); bi.hwndOwner = m_hDlg; bi.pidlRoot = NULL; bi.pszDisplayName = szDisplayName; bi.lpszTitle = szTitle; bi.ulFlags = BIF_RETURNONLYFSDIRS|BIF_NEWDIALOGSTYLE; bi.lpfn = NSearchDialog::BrowseCallbackProc; bi.lParam = reinterpret_cast<LPARAM>(szDirectory); PIDLIST_ABSOLUTE pidl = SHBrowseForFolder(&bi); if(pidl != NULL) { GetDisplayName(pidl,szParsingPath,SHGDN_FORPARSING); SetDlgItemText(m_hDlg,IDC_COMBO_DIRECTORY,szParsingPath); CoTaskMemFree(pidl); } } break; case IDEXIT: DestroyWindow(m_hDlg); break; case IDCANCEL: DestroyWindow(m_hDlg); break; } return 0; }
void FindSequenceDialog::OnTextChange ( wxCommandEvent &ev ) { do_highlight->Disable() ; find_button->Enable() ; if ( c->vec->getGenomeMode() ) return ; int ql = getQuery().length() ; if ( ql < 3 ) { lb->Clear () ; vi.Clear () ; return ; } find_button->Disable () ; OnSearch ( ev ) ; #ifdef __WXMAC__ t->SetFocus () ; t->SetSelection ( ql , ql ) ; #endif }
/*---------------------------------------------------------------------- | PLT_MediaServer::OnAction +---------------------------------------------------------------------*/ NPT_Result PLT_MediaServer::OnAction(PLT_ActionReference& action, const PLT_HttpRequestContext& context) { /* parse the action name */ NPT_String name = action->GetActionDesc().GetName(); // ContentDirectory if (name.Compare("Browse", true) == 0) { return OnBrowse(action, context); } if (name.Compare("Search", true) == 0) { return OnSearch(action, context); } if (name.Compare("UpdateObject", true) == 0) { return OnUpdate(action, context); } if (name.Compare("GetSystemUpdateID", true) == 0) { return OnGetSystemUpdateID(action, context); } if (name.Compare("GetSortCapabilities", true) == 0) { return OnGetSortCapabilities(action, context); } if (name.Compare("GetSearchCapabilities", true) == 0) { return OnGetSearchCapabilities(action, context); } // ConnectionMananger if (name.Compare("GetCurrentConnectionIDs", true) == 0) { return OnGetCurrentConnectionIDs(action, context); } if (name.Compare("GetProtocolInfo", true) == 0) { return OnGetProtocolInfo(action, context); } if (name.Compare("GetCurrentConnectionInfo", true) == 0) { return OnGetCurrentConnectionInfo(action, context); } action->SetError(401,"No Such Action."); return NPT_SUCCESS; }
void TaskPanel::OnRepeatOutput(wxCommandEvent& e) { OnSearch(e); }