本文整理匯總了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;
}
示例2: GetMainFrame
void CDirstatDoc::SetWorkingItem(CItem *item)
{
if (GetMainFrame() != NULL)
{
if (item != NULL)
GetMainFrame()->ShowProgress(item->GetProgressRange());
else
GetMainFrame()->HideProgress();
}
m_workingItem= item;
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
}
示例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);
}
示例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
}
示例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;
}
示例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);
}
}
示例11: GetMainFrame
void GJContext::ShowMainPanel()
{
if(IsSignedIn()&&m_pMainFrame)
GetMainFrame().Appear();
else if(!IsSignedIn()&&m_pLoginFrame)
SetForegroundWindow(*m_pLoginFrame);
}
示例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;
}
示例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
}
示例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);
}
示例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 );
}