當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetMainFrame函數代碼示例

本文整理匯總了C++中GetMainFrame函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetMainFrame函數的具體用法?C++ GetMainFrame怎麽用?C++ GetMainFrame使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetMainFrame函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetMainFrame

int CEditorRoot::SelectRollUpBar( int rollupBarId )
{
	if (GetMainFrame())
		return GetMainFrame()->SelectRollUpBar( rollupBarId );
	else
		return 0;
}
開發者ID:galek,項目名稱:erbiqingnian,代碼行數:7,代碼來源:EditorRoot.cpp

示例2: GetMainFrame

void 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,代碼來源:dirstatdoc.cpp

示例3: GetMainFrame

void 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,代碼來源:typeview.cpp

示例4: GetMainFrame

void 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,代碼來源:dirstatview.cpp

示例5: GetMainFrame

void 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,代碼來源:PropDlg.cpp

示例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,代碼來源:OpenView.cpp

示例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,代碼來源:DirDoc.cpp

示例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,代碼來源:project_manager.cpp

示例9: GetMainFrame

CWnd* 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,代碼來源:errorbox.cpp

示例10: GetMainFrame

void 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,代碼來源:ScribbleWindow.cpp

示例11: GetMainFrame

void GJContext::ShowMainPanel()
{
	if(IsSignedIn()&&m_pMainFrame)
		GetMainFrame().Appear();
	else if(!IsSignedIn()&&m_pLoginFrame)
		SetForegroundWindow(*m_pLoginFrame); 
}
開發者ID:page31,項目名稱:GJTalk,代碼行數:7,代碼來源:GJContext.cpp

示例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,代碼來源:view.cpp

示例13: OnInitDialog

BOOL 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,代碼來源:THRESHDlg.cpp

示例14: WXUNUSED

// Overrides
bool 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,代碼來源:powertabview.cpp

示例15: zeroInitSTARTUPINFO

void 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,代碼來源:windirstat.cpp


注:本文中的GetMainFrame函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。