这篇教程C++ GetMainFrame函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetMainFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMainFrame函数的具体用法?C++ GetMainFrame怎么用?C++ GetMainFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetMainFrame函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetMainFrameint CEditorRoot::SelectRollUpBar( int rollupBarId ){ if (GetMainFrame()) return GetMainFrame()->SelectRollUpBar( rollupBarId ); else return 0;}
开发者ID:galek,项目名称:erbiqingnian,代码行数:7,
示例2: GetMainFramevoid CDirstatDoc::SetWorkingItem(CItem *item){ if (GetMainFrame() != NULL) { if (item != NULL) GetMainFrame()->ShowProgress(item->GetProgressRange()); else GetMainFrame()->HideProgress(); } m_workingItem= item;}
开发者ID:coapp-packages,项目名称:windirstat,代码行数:11,
示例3: GetMainFramevoid CExtensionListControl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags){ if(nChar == VK_TAB) { GetMainFrame()->MoveFocus(LF_DIRECTORYLIST); } else if(nChar == VK_ESCAPE) { GetMainFrame()->MoveFocus(LF_NONE); } COwnerDrawnListControl::OnKeyDown(nChar, nRepCnt, nFlags);}
开发者ID:JDuverge,项目名称:windirstat,代码行数:12,
示例4: GetMainFramevoid CMyTreeListControl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags){ if (nChar == VK_TAB) { GetMainFrame()->MoveFocus(LF_EXTENSIONLIST); } else if (nChar == VK_ESCAPE) { GetMainFrame()->MoveFocus(LF_NONE); } CTreeListControl::OnKeyDown(nChar, nRepCnt, nFlags);}
开发者ID:Meitinger,项目名称:windirstat,代码行数:12,
示例5: GetMainFramevoid PropPanel::OnAddTag( wxCommandEvent &event ){ GetMainFrame()->RenderingPause(); TagDlg dlg(GetMainFrame(), -1, _T("Add New Tag")); if (dlg.ShowModal() == wxID_OK) { vtTag tag; tag.name = dlg.m_strName.mb_str(); tag.value = dlg.m_strValue.mb_str(); m_pCurrentItem->AddTag(tag); UpdateTagList(); } GetMainFrame()->RenderingResume();}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:14,
示例6: _/** * @brief Called when "Select..." button for filters is selected. */void COpenView::OnSelectFilter(){ String filterPrefix = _("[F] "); String curFilter; const BOOL bUseMask = theApp.m_pGlobalFileFilter->IsUsingMask(); GetDlgItemText(IDC_EXT_COMBO, curFilter); curFilter = string_trim_ws(curFilter); GetMainFrame()->SelectFilter(); String filterNameOrMask = theApp.m_pGlobalFileFilter->GetFilterNameOrMask(); if (theApp.m_pGlobalFileFilter->IsUsingMask()) { // If we had filter chosen and now has mask we can overwrite filter if (!bUseMask || curFilter[0] != '*') { SetDlgItemText(IDC_EXT_COMBO, filterNameOrMask); } } else { filterNameOrMask = filterPrefix + filterNameOrMask; SetDlgItemText(IDC_EXT_COMBO, filterNameOrMask); }}
开发者ID:TimofonicJunkRoom,项目名称:winmerge-v2,代码行数:29,
示例7: ASSERT/** * @brief Load line filters to the compare context. * Loads linefilters, converts them to UTF-8 and sets them for compare context. */void CDirDoc::LoadLineFilterList(){ ASSERT(m_pCtxt); BOOL bFilters = GetOptionsMgr()->GetBool(OPT_LINEFILTER_ENABLED); String filters = GetMainFrame()->m_pLineFilters->GetAsString(); if (!bFilters || filters.empty()) { delete m_pCtxt->m_pFilterList; m_pCtxt->m_pFilterList = NULL; return; } if (m_pCtxt->m_pFilterList) m_pCtxt->m_pFilterList->RemoveAllFilters(); else m_pCtxt->m_pFilterList = new FilterList(); char * regexp_str; FilterList::EncodingType type; regexp_str = UCS2UTF8_ConvertToUtf8(filters.c_str()); type = FilterList::ENC_UTF8; m_pCtxt->m_pFilterList->AddRegExp(regexp_str, type); UCS2UTF8_Dealloc(regexp_str);}
开发者ID:YueLinHo,项目名称:WinMerge,代码行数:32,
示例8: GetMainFrame//-----------------------------------------------------------------------------void EdProjectManager::MaybeSaveCurrentProject(){#if 0 if( m_currentProject != nil ) { //if( m_currentProject->isDirty ) { QMessageBox::StandardButton ret = QMessageBox::warning( GetMainFrame(), TR("Application"), //tr("The document has been modified./n" //"Do you want to save your changes?"), TR("Do you want to save the project?"), QMessageBox::Save | QMessageBox::Discard //| QMessageBox::Cancel ); if( QMessageBox::Save == ret ) { SaveCurrentProject(); } //else if( QMessageBox::Cancel == ret ) //{ // return false; //} //m_currentProject->isDirty = false; } }#endif}
开发者ID:S-V,项目名称:Lollipop,代码行数:34,
示例9: GetMainFrameCWnd* CInformErrorDialog::GetSafeParent(){ CWnd *Parent = NULL;#if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX) // if the splash box is up, use that as the parent Parent = CSplashDialog::GetpWnd(); if (Parent) return Parent;#endif// WEBSTER-ranbirr-12/11/96#ifndef WEBSTER#ifndef STANDALONE // If there is a print-related dlg up, use it as the parent Parent = CCPrintDialog::GetPrintCWnd(); if (Parent) return Parent;#endif#endif //webster // see if mainframe is up - use it if visible Parent = GetMainFrame(); if (Parent && Parent->IsWindowVisible()) return Parent; return NULL;}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:28,
示例10: GetMainFramevoid ScribbleWindow::disp(int i){ CPMainFrame *mf = GetMainFrame(); ScribbleDocument * sdoc = (ScribbleDocument *) GetDocument(); PegRect ChildRect = mf->BottomAppRectangle(); int num; if (!trai && i<180) num=page0[i]; else if (trai==1) num=page1[i]; else if (trai==2) num=page2[i]; else if (trai==3) num=page3[i]; else if (trai==4) num=page4[i]; if ((num==57 | num==89) && trai==1) { trai=4; Draw(); Redraw(); } else if (num) { CounterWindow* cwin = new CounterWindow(ChildRect,this,sdoc,mf); OnCount(); cwin->disp(num); sdoc->OnChangedData(this); } }
开发者ID:Cartix,项目名称:Physium,代码行数:25,
示例11: GetMainFramevoid GJContext::ShowMainPanel(){ if(IsSignedIn()&&m_pMainFrame) GetMainFrame().Appear(); else if(!IsSignedIn()&&m_pLoginFrame) SetForegroundWindow(*m_pLoginFrame); }
开发者ID:page31,项目名称:GJTalk,代码行数:7,
示例12: WXUNUSED// What to do when a view is created. Creates actual// windows for displaying the view.bool wxStfView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ){ childFrame = wxGetApp().CreateChildFrame(doc, this); if (childFrame==NULL) { return false; } // extract file name: wxFileName fn(doc->GetFilename()); childFrame->SetTitle(fn.GetName()); graph = GetMainFrame()->CreateGraph(this, childFrame); if (graph==NULL) { return false; } childFrame->GetMgr()->AddPane( graph, wxAuiPaneInfo().Caption(wxT("Traces")).Name(wxT("Traces")).CaptionVisible(true). CloseButton(false).Centre().PaneBorder(true) ); childFrame->GetMgr()->Update(); // childFrame->ActivateGraph();#if defined(__X__) || defined(__WXMAC__) // X seems to require a forced resize // childFrame->SetClientSize(800,600);#endif childFrame->Show(true); Activate(true); return true;}
开发者ID:410pfeliciano,项目名称:stimfit,代码行数:28,
示例13: OnInitDialogBOOL CTHRESHDlg::OnInitDialog() { CDialog::OnInitDialog(); pCount=(CStatic*)GetDlgItem(IDC_STATIC_COUNT); pThresh=(CStatic*)GetDlgItem(IDC_STATIC_THRESH); pMax=(CStatic*)GetDlgItem(IDC_STATIC_MAX); pMin=(CStatic*)GetDlgItem(IDC_STATIC_MIN); p_Slider=(CSliderCtrl*)GetDlgItem(IDC_SLIDER); pCount->SetWindowText("Count"); pThresh->SetWindowText("Threshold"); pMax->SetWindowText("255"); pMin->SetWindowText("0"); pView = (CImageView*)GetMainFrame()->GetActiveFrame()->GetActiveView(); // TODO: Add extra initialization here p_Slider->SetRange(0, 255, TRUE ); p_Slider->SetTic( 50 ); p_Slider->SetTicFreq( 8 );//origin 1,1,1,now 8,4,4 p_Slider->SetLineSize( 1 );//for increment by arrow move p_Slider->SetPageSize( 4 );//for increment by dragging by mouse or by pageup ordown p_Slider->SetPos( m_nCur ); curMin=m_RMin; CString msg; msg.Format("%.4f",m_RMin); pMin->SetWindowText(msg); msg.Format("%.4f",m_RMax); pMax->SetWindowText(msg); msg.Format("%.4f",curMin); pThresh->SetWindowText(msg); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}
开发者ID:caomw,项目名称:ImageSegmentor,代码行数:35,
示例14: WXUNUSED// Overridesbool PowerTabView::OnCreate(wxDocument *doc, long flags){ //------Last Checked------// // - Jan 27, 2005 WXUNUSED(flags); MainFrame* mainFrame = GetMainFrame(); wxCHECK(mainFrame != NULL, false); m_frame = mainFrame->CreateChildFrame(doc, this); wxCHECK(m_frame != NULL, false); m_frame->SetTitle(wxT("PowerTabView")); m_canvas = CreateCanvas(this, m_frame); wxCHECK(m_canvas != NULL, false); #ifdef __X__ // X seems to require a forced resize int x, y; m_frame->GetSize(&x, &y); m_frame->SetSize(-1, -1, x, y);#endif m_frame->Show(true); Activate(true); return (true);}
开发者ID:BackupTheBerlios,项目名称:ptparser-svn,代码行数:30,
示例15: zeroInitSTARTUPINFOvoid CDirstatApp::RestartApplication( ) { // First, try to create the suspended process auto si = zeroInitSTARTUPINFO( ); si.cb = sizeof( si ); auto pi = zeroInitPROCESS_INFORMATION( ); auto appFileName = GetAppFileName( ); BOOL success = CreateProcess( appFileName, NULL, NULL, NULL, false, CREATE_SUSPENDED, NULL, NULL, &si, &pi ); if (!success) { CString c = _T( "CreateProcess( " ); c += appFileName; c += _T( ") failed: " ); c += GetLastErrorAsFormattedMessage( ); AfxMessageBox( c ); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); return; } // We _send_ the WM_CLOSE here to ensure that all CPersistence-Settings like column widths an so on are saved before the new instance is resumed. // This will post a WM_QUIT message. GetMainFrame( )->SendMessage( WM_CLOSE ); DWORD dw = ::ResumeThread( pi.hThread ); if ( dw != 1 ) { TRACE( _T( "ResumeThread() didn't return 1/r/n" ) ); } CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); }
开发者ID:AKKF,项目名称:altWinDirStat,代码行数:33,
示例16: GetMainFramevoid CChildFrame::OnClose() { // clean up pointers. CMDIChildWnd::OnClose(); GetMainFrame()->ClearStatusbarItemCount();}
开发者ID:YueLinHo,项目名称:WinMerge,代码行数:7,
示例17: CreateUI virtual void CreateUI(const GamePtr& game, wxAuiManager& manager) { // Create all of the UI needed for network games. wxWindow* frame = GetMainFrame(); wxSize minSize = wxSize(165, 150); // Create the notebook off screen to avoid flicker. wxSize size = frame->GetClientSize(); wxAuiNotebook* notebook = new wxAuiNotebook(frame, wxID_ANY, wxPoint(size.x, size.y), minSize, wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT |wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER); // Chat window. wxChatUI* chat = new wxChatUI(notebook); notebook->AddPage(chat, stChat); // Event window. wxEventUI* event = new wxEventUI(notebook); notebook->AddPage(event, stEvents); // Spectator window. wxSpectatorUI* spectators = new wxSpectatorUI(notebook); notebook->AddPage(spectators, stSpectators); manager.AddPane(notebook, wxAuiPaneInfo().MinSize(minSize) .Caption(stNetwork).CloseButton(false) .MaximizeButton(false).Dockable(true).Right() .Name(swNetwork)); }
开发者ID:Dangr8,项目名称:Cities3D,代码行数:32,
示例18: ZeroMemoryvoid CDirstatApp::RestartApplication(){ // First, try to create the suspended process STARTUPINFO si; ZeroMemory(&si, sizeof(si)); si.cb= sizeof(si); PROCESS_INFORMATION pi; ZeroMemory(&pi, sizeof(pi)); BOOL success = CreateProcess(GetAppFileName(), NULL, NULL, NULL, false, CREATE_SUSPENDED, NULL, NULL, &si, &pi); if (!success) { CString s; s.FormatMessage(IDS_CREATEPROCESSsFAILEDs, GetAppFileName(), MdGetWinerrorText(GetLastError())); AfxMessageBox(s); return; } // We _send_ the WM_CLOSE here to ensure that all CPersistence-Settings // like column widths an so on are saved before the new instance is resumed. // This will post a WM_QUIT message. GetMainFrame()->SendMessage(WM_CLOSE); DWORD dw= ::ResumeThread(pi.hThread); if (dw != 1) TRACE(_T("ResumeThread() didn't return 1/r/n")); CloseHandle(pi.hProcess); CloseHandle(pi.hThread);}
开发者ID:coapp-packages,项目名称:windirstat,代码行数:31,
示例19: WXUNUSED// Overridesbool PowerTabTuningView::OnCreate(wxDocument* doc, long flags){ //------Last Checked------// // - Dec 30, 2004 WXUNUSED(flags); MainFrame* mainFrame = GetMainFrame(); wxCHECK(mainFrame != NULL, false); m_frame = mainFrame->CreateChildFrame(doc, this); wxCHECK(m_frame != NULL, false); m_window = CreateViewWindow(); wxCHECK(m_window != NULL, false); #ifdef __X__ // X seems to require a forced resize int x, y; m_frame->GetSize(&x, &y); m_frame->SetSize(-1, -1, x, y);#endif m_frame->Show(true); Activate(true); return (true);}
开发者ID:BackupTheBerlios,项目名称:ptparser-svn,代码行数:28,
示例20: GetMainFrame// This method does some work for ticks ms.// return: true if done or suspended.//bool CDirstatDoc::Work(DWORD ticks){ if(NULL == m_rootItem) { return true; } if(GetMainFrame()->IsProgressSuspended()) { return true; } if(!m_rootItem->IsDone()) { m_rootItem->DoSomeWork(ticks); if(m_rootItem->IsDone()) { m_extensionDataValid = false; GetMainFrame()->SetProgressPos100(); GetMainFrame()->RestoreTypeView(); GetMainFrame()->RestoreGraphView(); UpdateAllViews(NULL); } else { ASSERT(m_workingItem != NULL); if(m_workingItem != NULL) // to be honest, "defensive programming" is stupid, but c'est la vie: it's safer. { GetMainFrame()->SetProgressPos(m_workingItem->GetProgressPos()); } UpdateAllViews(NULL, HINT_SOMEWORKDONE); } } if(m_rootItem->IsDone()) { SetWorkingItem(NULL); return true; } else { return false; }}
开发者ID:JDuverge,项目名称:windirstat,代码行数:50,
示例21: GetSelectionvoid CDirstatDoc::OnEditCopy(){ const CItem *item= GetSelection(); ASSERT(item != NULL); ASSERT(item->GetType() == IT_DRIVE || item->GetType() == IT_DIRECTORY || item->GetType() == IT_FILE); GetMainFrame()->CopyToClipboard(item->GetPath());}
开发者ID:coapp-packages,项目名称:windirstat,代码行数:8,
示例22: UpdateSearchHistoryvoid CFindDlg::OnOK(){ if (!UpdateData()) return; UpdateSearchHistory(); GetMainFrame()->SendMessage(WM_COMMAND, ID_FIND_STRING);}
开发者ID:mavrus95,项目名称:windjview-subpix,代码行数:9,
示例23: whilevoid CItem::DriveVisualUpdateDuringWork(){ MSG msg; while (PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE)) DispatchMessage(&msg); GetMainFrame()->DrivePacman(); UpwardDrivePacman();}
开发者ID:coapp-packages,项目名称:windirstat,代码行数:9,
示例24: wxDocChildFramewxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas){ //// Make a child frame wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), wxID_ANY, _T("Child Frame"), wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE); #ifdef __WXMSW__ subframe->SetIcon(wxString(isCanvas ? _T("chrt_icn") : _T("notepad_icn")));#endif //// Make a menubar wxMenu *file_menu = new wxMenu; file_menu->Append(wxID_NEW, _T("&New...")); file_menu->Append(wxID_OPEN, _T("&Open...")); file_menu->Append(wxID_CLOSE, _T("&Close")); file_menu->Append(wxID_SAVE, _T("&Save")); file_menu->Append(wxID_SAVEAS, _T("Save &As...")); if (isCanvas) { file_menu->AppendSeparator(); file_menu->Append(wxID_PRINT, _T("&Print...")); file_menu->Append(wxID_PRINT_SETUP, _T("Print &Setup...")); file_menu->Append(wxID_PREVIEW, _T("Print Pre&view")); } wxMenu *edit_menu = (wxMenu *) NULL; if (isCanvas) { edit_menu = new wxMenu; edit_menu->Append(wxID_UNDO, _T("&Undo")); edit_menu->Append(wxID_REDO, _T("&Redo")); edit_menu->AppendSeparator(); edit_menu->Append(DOCVIEW_CUT, _T("&Cut last segment")); doc->GetCommandProcessor()->SetEditMenu(edit_menu); } wxMenu *help_menu = new wxMenu; help_menu->Append(DOCVIEW_ABOUT, _T("&About")); wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, _T("&File")); if (isCanvas) menu_bar->Append(edit_menu, _T("&Edit")); menu_bar->Append(help_menu, _T("&Help")); //// Associate the menu bar with the frame subframe->SetMenuBar(menu_bar); subframe->Centre(wxBOTH); return subframe;}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:57,
示例25: HandleMainMenuClick virtual void HandleMainMenuClick(const wxString& key) { wxASSERT(swSettings == key); wxSettingsPane* pane = new wxSettingsPane(GetMainFrame()); Controller::get().Transmit(shEventChangeMainPane, DataObject(static_cast<PaneMixin*>(pane), stSettings)); }
开发者ID:saladyears,项目名称:Cities3D,代码行数:9,
示例26: RunOilHelpstatic BOOL RunOilHelp(LPCTSTR lpcszHelpPath, UINT32 nCommand, DWORD dwData){#if !defined(EXCLUDE_FROM_XARALX) // Firing up the help engine can take a while, so show an hour-glass cursor. HCURSOR hOldCursor; HCURSOR hBusyCursor = ::LoadCursor(NULL, _R(IDC_WAIT)); if (hBusyCursor != NULL) hOldCursor = ::SetCursor(hBusyCursor); // We always pass the handle of the main-frame window as the "owning" window. HWND hwndInvoker = GetMainFrame()->GetSafeHwnd();#endif // If we are running on a pure 32-bit platform such as Windows NT then we must fake // the WinHelp() function, as we want the 16-bit engine to be run, not WINHLP32.EXE. // The current help-file build includes references to 16-bit DLLs that seem to be // almost too much for the 32-bit engine. We don't have to do this if we aren't // running the engine to browse a file, but simply issuing a command, such as // HELP_HELPONHELP. BOOL fOk; // Running under Chicago or Win32s, or the helpfile parameter is NULL, so run the // "normal" engine. Here we should really "thunk" (translate) the 32-bit HWND // to a 16-bit HWND, I think?// TRACEUSER( "JustinF", _T("Help being invoked normally/n")); fOk = TRUE; if(nCommand != HELP_QUIT) { wxString strHelpFileName(lpcszHelpPath); wxString Context = _T(""); if (dwData) { Context = PCTSTR(String_256( dwData )); if (_T("") != Context) // so that the string table contains a bit less, the ::/xarax/ and .htm // are here, because they are common to every HTML help path. strHelpFileName += _T("xarax/") + Context + _T(".htm"); } CCamApp::LaunchWebBrowser( strHelpFileName ); }#if !defined(EXCLUDE_FROM_XARALX) // Get some slightly useful information if it all goes horribly wrong.#ifdef _DEBUG if (!fOk) TRACEUSER( "Ollie", _T("RunOilHelp failed - last error: %lu/n"), (UINT32) ::GetLastError());#endif // Undo the hour-glass cursor and return a success code. if (hBusyCursor != NULL) ::SetCursor(hOldCursor);#endif return fOk;}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:56,
注:本文中的GetMainFrame函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetMainPartOfName函数代码示例 C++ GetMailTemplateId函数代码示例 |