本文整理汇总了C++中GetMainFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMainFrame函数的具体用法?C++ GetMainFrame怎么用?C++ GetMainFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetMainFrame函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: GetMainFrame
void CChildFrame::OnClose()
{
// clean up pointers.
CMDIChildWnd::OnClose();
GetMainFrame()->ClearStatusbarItemCount();
}
开发者ID:YueLinHo,项目名称:WinMerge,代码行数:7,代码来源:ChildFrm.cpp
示例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,代码来源:NetworkUI.cpp
示例18: ZeroMemory
void 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,代码来源:windirstat.cpp
示例19: WXUNUSED
// Overrides
bool 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,代码来源:powertabtuningview.cpp
示例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,代码来源:dirstatdoc.cpp
注:本文中的GetMainFrame函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论