本文整理汇总了C++中MainFrame::Close方法的典型用法代码示例。如果您正苦于以下问题:C++ MainFrame::Close方法的具体用法?C++ MainFrame::Close怎么用?C++ MainFrame::Close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainFrame
的用法示例。
在下文中一共展示了MainFrame::Close方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInit
bool CodeBlocksApp::OnInit()
{
#ifdef __WXMSW__
InitCommonControls();
#endif
wxLog::EnableLogging(true);
SetAppName(_T("codeblocks"));
s_Loading = true;
m_pBatchBuildDialog = nullptr;
m_BatchExitCode = 0;
m_Batch = false;
m_BatchNotify = false;
m_Build = false;
m_ReBuild = false;
m_Clean = false;
m_HasProject = false;
m_HasWorkSpace = false;
m_SafeMode = false;
m_BatchWindowAutoClose = true;
wxTheClipboard->Flush();
wxCmdLineParser& parser = *Manager::GetCmdLineParser();
parser.SetDesc(cmdLineDesc);
// NOTE: crash handler explicitly disabled because it causes problems
// with plugins loading/unloading...
//
// static CrashHandler crash_handler(!m_CrashHandler);
// we'll do this once and for all at startup
wxFileSystem::AddHandler(new wxZipFSHandler);
wxFileSystem::AddHandler(new wxMemoryFSHandler);
wxXmlResource::Get()->InsertHandler(new wxToolBarAddOnXmlHandler);
wxXmlResource::Get()->InsertHandler(new wxScrollingDialogXmlHandler);
wxInitAllImageHandlers();
wxXmlResource::Get()->InitAllHandlers();
Manager::Get()->GetLogManager()->Log(F(wxT("Starting ") + appglobals::AppName + wxT(" ") +
appglobals::AppActualVersionVerb + wxT(" ") +
appglobals::AppBuildTimestamp));
try
{
#if (wxUSE_ON_FATAL_EXCEPTION == 1)
wxHandleFatalExceptions(true);
#endif
InitExceptionHandler();
delete wxMessageOutput::Set(new cbMessageOutputNull); // No output. (suppress warnings about unknown options from plugins)
if (ParseCmdLine(nullptr) == -1) // only abort if '--help' was passed in the command line
{
delete wxMessageOutput::Set(new wxMessageOutputMessageBox);
parser.Usage();
return false;
}
if ( !LoadConfig() )
return false;
// set safe-mode appropriately
PluginManager::SetSafeMode(m_SafeMode);
// If not in batch mode, and no startup-script defined, initialise XRC
if(!m_Batch && m_Script.IsEmpty() && !InitXRCStuff())
return false;
InitLocale();
if (m_DDE && !m_Batch && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/use_ipc"), true))
{
// Create a new client
DDEClient *client = new DDEClient;
DDEConnection* connection = nullptr;
wxLogNull ln; // own error checking implemented -> avoid debug warnings
connection = (DDEConnection *)client->MakeConnection(_T("localhost"), F(DDE_SERVICE, wxGetUserId().wx_str()), DDE_TOPIC);
if (connection)
{
// don't eval here just forward the whole command line to the other instance
wxString cmdLine;
for (int i = 1 ; i < argc; ++i)
cmdLine += wxString(argv[i]) + _T(' ');
if ( !cmdLine.IsEmpty() )
{
// escape openings and closings so it is easily possible to find the end on the rx side
cmdLine.Replace(_T("("), _T("\\("));
cmdLine.Replace(_T(")"), _T("\\)"));
connection->Execute(_T("[CmdLine({") + cmdLine + _T("})]"));
}
// On Linux, C::B has to be raised explicitly if it's wanted
if (Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/raise_via_ipc"), true))
connection->Execute(_T("[Raise]"));
connection->Disconnect();
//.........这里部分代码省略.........