void StateGraphViewerPanel::renderToSVG(const wxString &Filename) { auto const Res = seec::Resource("TraceViewer") ["GUIText"]["Graph"]["RenderToSVG"]; if (!CurrentGraphSVG || CurrentGraphSVG->empty()) { wxMessageDialog Dlg(this, towxString(Res["NoGraphMessage"]), towxString(Res["NoGraphTitle"])); Dlg.ShowModal(); return; } wxTempFile Out(Filename); if (!Out.Write(*CurrentGraphSVG)) { wxMessageDialog Dlg(this, towxString(Res["GraphWriteFailedMessage"]), towxString(Res["GraphWriteFailedTitle"])); Dlg.ShowModal(); return; } if (!Out.Commit()) { Out.Discard(); return; } }
void DlgffDPjrProperties::AdminEditThumb() { int ThumbnailIndex=ApplicationConfig->ThumbnailModels->SearchModel(ffdProject->ThumbnailName); if ((ThumbnailIndex<0)||(ThumbnailIndex>=ApplicationConfig->ThumbnailModels->List.count())) return; if (!ApplicationConfig->ThumbnailModels->List[ThumbnailIndex]->IsCustom) { QString OldName=ffdProject->ThumbnailName; QString NewName=ffdProject->ProjectThumbnail->SaveAsNewCustomModelFile(ffd_MODELTYPE_THUMBNAIL); ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels); ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName); DlgImageComposer Dlg(ffdProject,ApplicationConfig,this); Dlg.InitDialog(); if (Dlg.exec()==0) { ffdProject->ProjectThumbnail->SaveModelFile(ffd_MODELTYPE_THUMBNAIL,NewName); ApplicationConfig->ThumbnailModels->FillModelType(ffd_MODELTYPE_THUMBNAIL); ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels); ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName); } else { QFile(NewName).remove(); (*ApplicationConfig->ThumbnailModels->NextNumber)--; ffdProject->ThumbnailName=OldName; ApplicationConfig->ThumbnailModels->FillModelType(ffd_MODELTYPE_THUMBNAIL); ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels); ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName); } } else { DlgImageComposer Dlg(ffdProject,ApplicationConfig,this); Dlg.InitDialog(); if (Dlg.exec()==0) { ffdProject->ProjectThumbnail->SaveModelFile(ffd_MODELTYPE_THUMBNAIL,ApplicationConfig->ThumbnailModels->List[ApplicationConfig->ThumbnailModels->SearchModel(ffdProject->ThumbnailName)]->FileName); ApplicationConfig->ThumbnailModels->FillModelType(ffd_MODELTYPE_THUMBNAIL); ui->ThumbCB->PrepareTable(true,ApplicationConfig->ThumbnailModels); ui->ThumbCB->SetCurrentModel(ffdProject->ThumbnailName); } } ThumbChanged(); }
std::vector<unicode_t> InputStringDialog( const char* FieldName, NCDialogParent* Parent, const unicode_t* Message, const unicode_t* Str ) { if ( !FieldName ) { clInputStrDialog Dlg( Parent, Message, Str ); return Dlg.ShowDialog(); } clInputFieldDialog Dlg( FieldName, Parent, Message, Str ); return Dlg.ShowDialog(); }
void ValueListCtrl::OnModify(wxCommandEvent& event) { long Item = GetSelectedItem(); if(Item == -1) { return ; } wxListItem ListItem; ACE_Configuration::VALUETYPE Type = (ACE_Configuration::VALUETYPE)GetItemData(Item); wxString Name = GetItemText(Item); switch(Type) { case ACE_Configuration::STRING: { ACE_TString Value; m_pConfig->get_string_value(m_Key, Name, Value); wxString ValueText(Value.fast_rep()); ValueDlg Dlg(this, Name, ValueText); if(Dlg.ShowModal() != wxID_OK) { return; } Value = (const char*)Dlg.GetStringValue(); m_pConfig->set_string_value(m_Key, Name, Value); } break; case ACE_Configuration::INTEGER: { u_int Value; m_pConfig->get_integer_value(m_Key, Name, Value); ValueDlg Dlg(this, Name, Value); if(Dlg.ShowModal() != wxID_OK) { return; } Value = Dlg.GetUINTValue(); m_pConfig->set_integer_value(m_Key, Name, Value); } break; case ACE_Configuration::BINARY: { wxMessageBox("Binary modification not supported (why don't you implement it?)"); //assert(0); } break; } DisplaySection(m_Key); }
void CSrScriptView::OnScriptLoad() { CFileDialog Dlg(TRUE, ".psc", "", OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, SR_SCRIPTFILE_FILTER, this); int Result = Dlg.DoModal(); if (Result != IDOK) return; CString Filename = Dlg.GetPathName(); CSrScriptFile* pNewScript = new CSrScriptFile; bool fResult = pNewScript->Load(Filename); if (!fResult) { delete pNewScript; SrEditShowError("Failed to load script file '%s'!", Filename); return; } pNewScript->SetIsModified(false); m_Scripts.Add(pNewScript); SetCurrentScript(pNewScript); m_ScriptList.SetCurSel(AddScriptList(pNewScript)); }
void CDlgAdminEfcEffectList::OnModify() { int nNo, nResult; PCInfoEffect pInfoEffect; CDlgAdminEfcEffect Dlg(this); CPacketADMIN_EFC_RENEWEFFECT Packet; nNo = m_List.GetNextItem (-1, LVNI_SELECTED); if (nNo < 0) { return; } pInfoEffect = (PCInfoEffect)m_pLibInfo->GetPtr (m_List.GetItemData (nNo)); Dlg.Init (m_pMgrData, TRUE); Dlg.SetInfo (pInfoEffect); nResult = Dlg.DoModal (); if (nResult != IDOK) { return; } Dlg.GetInfo (pInfoEffect); Packet.Make (pInfoEffect->m_dwEffectID, pInfoEffect); m_pSock->Send (&Packet); }
void CDlgAdminCharMotionList::OnModify() { int nNo, nResult; DWORD dwMotionListID; PCLibInfoMotion pLibInfo; CDlgAdminCharMotion Dlg(this); CPacketADMIN_CHAR_RENEWMOTION Packet; nNo = m_List.GetNextItem (-1, LVNI_SELECTED); if (nNo < 0) { return; } dwMotionListID = nNo + 1; UpdateData (); pLibInfo = m_pMgrData->GetLibInfoMotion (); Dlg.Init (m_pMgrData, m_dwMotionTypeID, dwMotionListID, m_nGrpIDSub); Dlg.SetList (pLibInfo); nResult = Dlg.DoModal (); if (nResult != IDOK) { return; } Dlg.GetList (pLibInfo); Packet.Make (m_dwMotionTypeID, dwMotionListID, pLibInfo); m_pSock->Send (&Packet); }
// This is an example of an exported function. SCRIPT_PIPE_DLL_API int ExtensionModuleInit(int ix) { // pExecFunc = NULL; ix;// compiler food. wxLogDebug("Got into DLL" ); // Here is proof that the DLL was dynamically loaded and this Init function // called. wxDialog Dlg( (wxWindow*)NULL, (wxWindowID)-1, "mod-script-pipe - Dialog Loaded by Plug In", wxPoint(0,0)); #if 0 ShuttleGui S( &Dlg, eIsCreating ); S.StartStatic( "Scripter Initialising" ); S.StartHorizontalLay(); S.Id(wxID_CANCEL).AddButton( "Cancel" ); S.Id(wxID_OK).AddButton( "OK" )->SetFocus(); S.EndHorizontalLay(); S.EndStatic(); #endif Dlg.Fit(); Dlg.Move( 100,100 ); int id = Dlg.ShowModal(); // return -1 for cancel, anything else for OK. return (id==wxID_CANCEL)?-1:42; }
void CDlgAdminMapObject::OnModify() { int nResult; DWORD dwObjectID; PCInfoMapObject pInfo; CPacketADMIN_MAP_RENEWMAPOBJECT Packet; CDlgAdminMapObjectEdit Dlg(this); nResult = m_List.GetNextItem (-1, LVNI_SELECTED); if (nResult < 0) { return; } dwObjectID = m_List.GetItemData (nResult); pInfo = (PCInfoMapObject)m_pLibInfoMapObject->GetPtr (dwObjectID); Dlg.Init (m_pMgrData); Dlg.SetData (pInfo); nResult = Dlg.DoModal (); if (nResult != IDOK) { return; } Packet.Make (Dlg.m_pInfoMapObject); m_pSock->Send (&Packet); }
bool ExcDialog(LPCWSTR ModuleName,LPCWSTR Exception,LPVOID Adress) { string strAddr; strAddr.Format(L"0x%p",Adress); string strFunction=GetFunctionName(From); #ifndef NO_WRAPPER if(Module && !Module->IsOemPlugin()) #endif // NO_WRAPPER { strFunction+=L"W"; } FarDialogItem EditDlgData[]= { {DI_DOUBLEBOX,3,1,72,8,0,nullptr,nullptr,0,MSG(MExcTrappedException)}, {DI_TEXT, 5,2, 17,2,0,nullptr,nullptr,0,MSG(MExcException)}, {DI_TEXT, 18,2, 70,2,0,nullptr,nullptr,0,Exception}, {DI_TEXT, 5,3, 17,3,0,nullptr,nullptr,0,MSG(MExcAddress)}, {DI_TEXT, 18,3, 70,3,0,nullptr,nullptr,0,strAddr}, {DI_TEXT, 5,4, 17,4,0,nullptr,nullptr,0,MSG(MExcFunction)}, {DI_TEXT, 18,4, 70,4,0,nullptr,nullptr,0,strFunction}, {DI_TEXT, 5,5, 17,5,0,nullptr,nullptr,0,MSG(MExcModule)}, {DI_EDIT, 18,5, 70,5,0,nullptr,nullptr,DIF_READONLY|DIF_SELECTONENTRY,ModuleName}, {DI_TEXT, -1,6, 0,6,0,nullptr,nullptr,DIF_SEPARATOR,L""}, {DI_BUTTON, 0,7, 0,7,0,nullptr,nullptr,DIF_DEFAULTBUTTON|DIF_FOCUS|DIF_CENTERGROUP,MSG((From == EXCEPT_KERNEL)?MExcTerminate:MExcUnload)}, {DI_BUTTON, 0,7, 0,7,0,nullptr,nullptr,DIF_CENTERGROUP,MSG(MExcDebugger)}, }; MakeDialogItemsEx(EditDlgData,EditDlg); Dialog Dlg(EditDlg, ARRAYSIZE(EditDlg),ExcDlgProc); Dlg.SetDialogMode(DMODE_WARNINGSTYLE|DMODE_NOPLUGINS); Dlg.SetPosition(-1,-1,76,10); Dlg.Process(); return Dlg.GetExitCode()==11; }
void CIVUI_TestDlg::OnBnClickedTest() { CFileDialog Dlg(TRUE); if ( IDOK == Dlg.DoModal() ) { CString strPath = Dlg.GetPathName(); //打开硬盘中的图形文件 HANDLE hFile=CreateFile( strPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile==INVALID_HANDLE_VALUE) { return; } DWORD dwFileSize=GetFileSize(hFile,NULL);//获取文件字节数 if (dwFileSize == INVALID_FILE_SIZE) return; BYTE* pTemBuf = new BYTE[dwFileSize]; DWORD dwByteRead = 0; BOOL bRc = ReadFile(hFile,pTemBuf,dwFileSize,&dwByteRead,NULL);//把文件读入内存缓冲区 CloseHandle(hFile);//关闭打开的文件 m_pISnapShotSender->OnSnapShotSend(0, 0, 0,pTemBuf, dwFileSize); delete[] pTemBuf; } }
// Вызов редактора имени кодовой страницы void EditCodePageName() { UINT Position = CodePages->GetSelectPos(); if (IsPositionStandard(Position)) return; FARString CodePageName = CodePages->GetItemPtr(Position)->strName; size_t BoxPosition; if (!CodePageName.Pos(BoxPosition, BoxSymbols[BS_V1])) return; CodePageName.LShift(BoxPosition+2); DialogDataEx EditDialogData[]= { {DI_DOUBLEBOX, 3, 1, 50, 5, {}, 0, MSG(MGetCodePageEditCodePageName)}, {DI_EDIT, 5, 2, 48, 2, {(DWORD_PTR)L"CodePageName"}, DIF_FOCUS|DIF_HISTORY, CodePageName}, {DI_TEXT, 0, 3, 0, 3, {}, DIF_SEPARATOR, L""}, {DI_BUTTON, 0, 4, 0, 3, {}, DIF_DEFAULT|DIF_CENTERGROUP, MSG(MOk)}, {DI_BUTTON, 0, 4, 0, 3, {}, DIF_CENTERGROUP, MSG(MCancel)}, {DI_BUTTON, 0, 4, 0, 3, {}, DIF_CENTERGROUP, MSG(MGetCodePageResetCodePageName)} }; MakeDialogItemsEx(EditDialogData, EditDialog); Dialog Dlg(EditDialog, ARRAYSIZE(EditDialog), EditDialogProc); Dlg.SetPosition(-1, -1, 54, 7); Dlg.SetHelp(L"EditCodePageNameDlg"); Dlg.Process(); }
void CLogViewDlg::DoFileSaveCmd() { if(m_LogList.GetItemCount() <= 0) return; CTime curTime = CTime::GetCurrentTime(); CString strPathName; strPathName.Format(_T("XLog_%04d_%02d_%02d_%02d_%02d_%02d"), curTime.GetYear(), curTime.GetMonth(), curTime.GetDay(), curTime.GetHour(), curTime.GetMinute(), curTime.GetSecond()); CFileDialog Dlg(FALSE); Dlg.m_ofn.lpstrFilter = _T("XLog\0*.xlog\0"); Dlg.m_ofn.lpstrFile = strPathName.GetBuffer(MAX_PATH); if(Dlg.DoModal() == IDOK) { strPathName.ReleaseBuffer(); strPathName = Dlg.GetPathName(); if(strPathName.Find(_T(".")) == -1) { strPathName += _T(".xlog"); } if(!XSaveLogFile(strPathName, ListViewQueryLogCallback, (void*)&m_vctLogInfo)) { AfxMessageBox(_T("Failed to Save File.\r\nCheck if the file is valid?"), MB_OK | MB_ICONWARNING); } } strPathName.ReleaseBuffer(); }
void CHDFTestDoc::OnFileOpen() { // TODO: Add your command handler code here char szFileFilter[]={"*.hdf|*.hdf|*.l3m_8D_chlo|*.l3m_8D_chlo|*.l3m_8D_SST_4|*.l3m_8D_SST_4||"}; CFileDialog Dlg(true,NULL,NULL,OFN_HIDEREADONLY,szFileFilter,NULL); if (Dlg.DoModal()!=IDOK) { return ;} CString filename = Dlg.GetPathName() ; if(filename.IsEmpty()) return; //CReadHdfData *readHdf = new CReadHdfData(); phdfDataSet = new CHDFDataset(); phdfDataSet->open((LPSTR)(LPCTSTR)filename); //phdfDataSet->ReadHDFVSData((LPSTR)(LPCTSTR)filename);¿××¢ÊÍ //phdfDataSet->ReadHDFVData((LPSTR)(LPCTSTR)filename);¿××¢ÊÍ phdfDataSet->ReadHDFHead(); phdfDataSet->ReadAllSdsAttr(); // readHdf->SetFilename(filename); // readHdf->ReadHDFHead(); // readHdf->ReadSdsAttr(0); // readHdf->ReadSdsData(0); AfxMessageBox("¶ÁÈ¡HDFÎļþ³É¹¦£¡"); return; }
LRESULT CIdentitiesPage::OnBnClickedIdentityNew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { UserIdentity *pNewIdentity = new UserIdentity(); pNewIdentity->m_ID = g_pNewPrefs->ObtainNewIdentityID(); CUserIdentityDlg Dlg(pNewIdentity); int result = Dlg.DoModal(); if (result == 1) { g_pNewPrefs->m_UserIdentitiesList.Add(pNewIdentity); int newitemnum = m_IdentityCtrl.AddString(pNewIdentity->m_Description); if (newitemnum != LB_ERR) { m_IdentityCtrl.SetCurSel(newitemnum); m_IdentityCtrl.SetItemDataPtr(newitemnum,pNewIdentity); } else ATLASSERT(FALSE); } else { delete pNewIdentity; } return 0; }
bool CDuffDlg::SaveLog() { CFileDialog Dlg(FALSE,StringFromResource(IDS_SAVELOG_DLG_TITLE),StringFromResource(IDS_DUFF_LOG_DEFAULT_FILENAME),OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,StringFromResource(IDS_SAVELOG_FILENAME_FILTER),this); CString Temp; if ( Dlg.DoModal() == IDOK) { CString Temp; CFile f; if ( f.Open(Dlg.GetFileName(), CFile::modeCreate |CFile::modeWrite /*| CFile::typeText | CFile::shareExclusive */) ) { for (int i= 0; i < m_StatusLogPage.m_StatusLog.GetItemCount(); i++) { CString Temp; Temp.Format(StringFromResource(IDS_SAVELOG_FILE_FORMAT),m_StatusLogPage.m_StatusLog.GetItemText(i,0),m_StatusLogPage.m_StatusLog.GetItemText(i,1) ); f.Write(Temp,Temp.GetLength()); } f.Close(); Temp.Format(StringFromResource(IDS_SAVELOG_FINISHED),Dlg.GetFileName()); Log(Temp); } else { Temp.Format(StringFromResource(IDS_SAVELOG_ERROR),Dlg.GetFileName()); Log(Temp); } return true; } Log(StringFromResource(IDS_SAVELOG_CANCELLED)); return false; }
void wxsProject::Configure() { if ( !m_GUI ) { m_GUI = wxsGUIFactory::SelectNew(_("wxSmith does not manage any GUI for this project.\nPlease select GUI you want to be managed in wxSmith."),this); if ( m_GUI ) { NotifyChange(); } } if ( m_GUI ) { if ( !m_GUI->CheckIfApplicationManaged() ) { // TODO: Prepare better communicate, consider chancing to cbAnnoyingDiaog if ( wxMessageBox(_("wxSmith does not manage this application's source.\n" "Should I create proper bindings?"),_("wxSmith"),wxYES_NO) == wxNO ) return; if ( !m_GUI->CreateApplicationBinding() ) return; } cbConfigurationDialog Dlg(0,-1,_("Configuring wxSmith")); Dlg.AttachConfigurationPanel(m_GUI->BuildConfigurationPanel(&Dlg)); Dlg.ShowModal(); } }
void CUnitTool::OnBnClickedSave() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. CFileDialog Dlg(FALSE, L"dat", L"*.dat", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, L"*.dat", this); // 1인자 : save 일 경우 false, load 일 경우 true // 2인자 : 파일의 확장자명 // 3인자 : 최초에 띄워줄 이름 // 4인자 : 중복된 파일이 있을 시 경고 창을 띄워주는 플래그 값 // 5인자 : 저장 시 밑에 띄워주는 파일 형식 // 6인자 : 현재의 다이얼로그에 생성(주소값) if(Dlg.DoModal() == IDCANCEL) return; Dlg.m_ofn.lpstrInitialDir = L"..\\Data"; HANDLE hFile = CreateFile(Dlg.GetPathName(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); DWORD dwByte; for(map<CString, UNITDATA*>::iterator iter = m_MapUnitData.begin(); iter != m_MapUnitData.end(); ++iter) { WriteFile(hFile, iter->second, sizeof(UNITDATA), &dwByte, NULL); } CloseHandle(hFile); }
void CAniClientConnection::OnAgreementReceived( LPCSTR lpszAgreement ) { CDlgAgreement Dlg( m_pDialog ); Dlg.m_sAgreement = lpszAgreement; if ( IDOK != Dlg.DoModal( ) ) m_pDialog->OnCancel( ); }
void CTagVwSplit::OnFilePrintMultiple() { CMultiPrintSelect Dlg(this); //POSITION Pos = ScdApp()->TrendTemplate().GetFirstDocPosition(); //while (Pos) // { // CTagVwDoc * pTrndDoc = (CTagVwDoc*)(ScdApp()->TrendTemplate().GetNextDoc(Pos)); // Dlg.AddDocument(pTrndDoc); // } ////Dlg.AddStartDocument(this->GetDocument()); //if (Dlg.DoModal()==IDOK) // { // //Dlg.m_Documents // now contain doc to print // POSITION Pos=Dlg.m_Documents.GetHeadPosition(); // while (Pos) // { // CDocument * pDoc=Dlg.m_Documents.GetNext(Pos); // POSITION VPos=pDoc->GetFirstViewPosition(); // CTagVwSplit * pSplt = dynamic_cast<CTagVwSplit*>(pDoc->GetNextView(VPos)); // if (pSplt) // pSplt->OnFilePrint(); // // Change to Print Direct to stop the PrintDlg box // // see http://www.codeguru.com/forum/archive/index.php/t-52473.html // MSG& msg = AfxGetThreadState()->m_lastSentMsg; // msg.wParam = ID_FILE_PRINT_DIRECT; // } // }; }
wxString PasswordBox(wxString const & aCaption, wxString const & APrompt) { wxPasswordEntryDialog Dlg(NULL, aCaption, APrompt); if (Dlg.ShowModal() != wxID_OK) return wxT(""); else return Dlg.GetValue(); }
int DialogBuilder::DoShowDialog() { Dialog Dlg(DialogItems, DialogItemsCount); Dlg.SetHelp(HelpTopic); Dlg.SetPosition(-1, -1, DialogItems [0].X2+4, DialogItems [0].Y2+2); Dlg.Process(); return Dlg.GetExitCode(); }
int MessageDlgPos(wxString const & aMsg, TMsgDlgType DlgType, TMsgDlgButtons Buttons, long HelpCtx, int X, int Y) { wxUnusedVar(HelpCtx); wxMessageDialog Dlg(NULL, aMsg, wxT(""), GetDlgType(DlgType) | GetMsgDlgButtonStyle(Buttons), wxPoint(X, Y)); return wxIDToModalResult(Dlg.ShowModal()); }
void DlgffDPjrProperties::SelectLocation() { QMenu *ContextMenu=new QMenu(this); bool AddSep=false; QAction *Add=CreateMenuAction(QIcon(":/img/gmap_add.png"), ffdProject->ProjectInfo->Location?QApplication::translate("MainWindow","Edit this location"):QApplication::translate("MainWindow","Define a location"), FAVACTIONTYPE_EDIT,false,false,this); ContextMenu->addAction(Add); QSqlQuery Query(ApplicationConfig->Database->db); QString QueryString("SELECT Key,Name,FAddress,Thumbnail FROM Location ORDER BY LOWER(Name)"); Query.prepare(QueryString); if (!Query.exec()) DisplayLastSQLError(&Query); else while (Query.next()) { bool Ret; qlonglong Key=Query.value(0).toLongLong(&Ret); if (Ret) { if (!AddSep) { ContextMenu->addSeparator(); AddSep=true; } QString Name =Query.value(1).toString(); QString Address=Query.value(2).toString(); QByteArray Data =Query.value(3).toByteArray(); QImage Thumb; Thumb.loadFromData(Data); bool IsCurrent=(Key==(ffdProject->ProjectInfo->Location?((cLocation *)ffdProject->ProjectInfo->Location)->FavKey:-1)); QAction *Act=CreateMenuAction(QIcon(QPixmap().fromImage(Thumb)),QString("%1 (%2)").arg(Name).arg(Address),FAVACTIONTYPE_SELECT+Key,true,IsCurrent,this); ContextMenu->addAction(Act); } } QAction *Action=ContextMenu->exec(QCursor::pos()); if (Action) { int ActionType=Action->data().toInt() & FAVACTIONTYPE_ACTIONTYPE; if (ActionType==FAVACTIONTYPE_EDIT) { cLocation *PrevLocation=(cLocation *)ffdProject->ProjectInfo->Location; if (!((cLocation *)ffdProject->ProjectInfo->Location)) ffdProject->ProjectInfo->Location=new cLocation(ApplicationConfig); DlgGMapsLocation Dlg((cLocation *)ffdProject->ProjectInfo->Location,ApplicationConfig,this); Dlg.InitDialog(); if ((Dlg.exec()!=0)&&(!PrevLocation)) { delete (cLocation *)ffdProject->ProjectInfo->Location; ffdProject->ProjectInfo->Location=NULL; } } else if (Action->text()!="") { qlonglong Key=Action->data().toInt() & ~FAVACTIONTYPE_ACTIONTYPE; if (!ffdProject->ProjectInfo->Location) ffdProject->ProjectInfo->Location=new cLocation(ApplicationConfig); ((cLocation *)ffdProject->ProjectInfo->Location)->LoadFromFavorite(Key); } } ui->LocationBT->setDown(false); if (ffdProject->ProjectInfo->Location) { ui->Location->setText(QString("%1 (%2)").arg(((cLocation *)ffdProject->ProjectInfo->Location)->Name).arg(((cLocation *)ffdProject->ProjectInfo->Location)->FriendlyAddress)); ui->LocationIcon->setPixmap(QPixmap().fromImage(((cLocation *)ffdProject->ProjectInfo->Location)->GetThumb(16))); } else { ui->Location->setText(""); ui->LocationIcon->setPixmap(QPixmap()); } IsLocationChanged=true; }
void MainFrame::OnFileExport(wxCommandEvent& event) { wxFileDialog Dlg(this, "Enter Filename:", "", "", "*.*",0); if(Dlg.ShowModal() != wxID_OK) { return; } m_pConfig->export_config(Dlg.GetFilename()); }
void CCKAHUMTESTUI2Dlg::OnCRExcludes() { // TODO: Add your control notification handler code here CRdrExcl Dlg(&m_CrExludeList); if ( Dlg.DoModal() == IDOK ) { } }
// tThumbsFontName, tTilesFontName, 0 void CSetPgFonts::CopyFontsTo(HWND hDlgTo, int nList1, ...) { DWORD bAlmostMonospace; int nIdx, nCount, i; wchar_t szFontName[128]; // FontFaceName is not expected to be longer than 32 chars HWND hMainPg = Dlg(); nCount = SendDlgItemMessage(hMainPg, tFontFace, CB_GETCOUNT, 0, 0); #ifdef _DEBUG GetDlgItemText(hDlgTo, nList1, szFontName, countof(szFontName)); #endif int nCtrls = 1; int nCtrlIds[10] = {nList1}; va_list argptr; va_start(argptr, nList1); int nNext = va_arg( argptr, int ); while (nNext) { nCtrlIds[nCtrls++] = nNext; nNext = va_arg( argptr, int ); } va_end(argptr); for (i = 0; i < nCount; i++) { // Взять список шрифтов с главной страницы if (SendDlgItemMessage(hMainPg, tFontFace, CB_GETLBTEXT, i, (LPARAM) szFontName) > 0) { // Показывать [Raster Fonts WxH] смысла нет if (szFontName[0] == L'[' && !wcsncmp(szFontName+1, CFontMgr::RASTER_FONTS_NAME, _tcslen(CFontMgr::RASTER_FONTS_NAME))) continue; // В Thumbs & Tiles [bdf] пока не поддерживается int iLen = lstrlen(szFontName); if ((iLen > CE_BDF_SUFFIX_LEN) && !wcscmp(szFontName+iLen-CE_BDF_SUFFIX_LEN, CE_BDF_SUFFIX)) continue; bAlmostMonospace = (DWORD)SendDlgItemMessage(hMainPg, tFontFace, CB_GETITEMDATA, i, 0); // Теперь создаем новые строки for (int j = 0; j < nCtrls; j++) { nIdx = SendDlgItemMessage(hDlgTo, nCtrlIds[j], CB_ADDSTRING, 0, (LPARAM) szFontName); SendDlgItemMessage(hDlgTo, nCtrlIds[j], CB_SETITEMDATA, nIdx, bAlmostMonospace); } } } for (int j = 0; j < nCtrls; j++) { GetDlgItemText(hDlgTo, nCtrlIds[j], szFontName, countof(szFontName)); CSetDlgLists::SelectString(hDlgTo, nCtrlIds[j], szFontName); } }
void PagesEdit(HWND parent,PropertyBase *prop,LPARAM) { if(prop) { CPagesEdit Dlg(prop); if(Dlg.DoModal(parent)==IDOK) { } } }
void wxsToolBarEditor::OnBitmap2Click(wxCommandEvent& event) { if ( !m_Selected ) return; ToolBarItem* Selected = m_Selected; SelectItem(Selected); wxsBitmapIconEditorDlg Dlg(this,Selected->m_Bitmap2,_T("wxART_TOOLBAR")); Dlg.ShowModal(); SelectItem(0); SelectItem(Selected); }
void MainFrame::OnFileImport(wxCommandEvent& event) { wxFileDialog Dlg(this, "Choose a file", "", "", "*.*", wxOPEN); if(Dlg.ShowModal() != wxID_OK) { return; } m_pConfig->import_config(Dlg.GetFilename()); SetNewConfig(m_pConfig); }