2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
#include "blitzide.h"
|
|
|
|
|
#include "about.h"
|
|
|
|
|
#include "libs.h"
|
2019-01-19 18:31:46 +01:00
|
|
|
#include "mainframe.h"
|
|
|
|
|
#include "prefs.h"
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
#include "stdafx.h"
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
BlitzIDE blitzIDE;
|
|
|
|
|
|
2019-01-19 18:31:46 +01:00
|
|
|
BOOL BlitzIDE::InitInstance()
|
|
|
|
|
{
|
2014-01-31 08:23:00 +13:00
|
|
|
#ifdef _DEBUG
|
2019-01-19 18:31:46 +01:00
|
|
|
AfxEnableMemoryTracking(true);
|
2014-01-31 08:23:00 +13:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
AfxInitRichEdit();
|
|
|
|
|
|
|
|
|
|
prefs.open();
|
|
|
|
|
|
|
|
|
|
initLibs();
|
|
|
|
|
|
2019-01-19 18:31:46 +01:00
|
|
|
mainFrame = new MainFrame();
|
2014-01-31 08:23:00 +13:00
|
|
|
m_pMainWnd = mainFrame;
|
|
|
|
|
|
|
|
|
|
#ifdef DEMO
|
2019-01-19 18:31:46 +01:00
|
|
|
aboutBlitz(true);
|
2014-01-31 08:23:00 +13:00
|
|
|
#endif
|
|
|
|
|
|
2019-01-19 18:31:46 +01:00
|
|
|
mainFrame->LoadFrame(IDR_MAINFRAME);
|
|
|
|
|
mainFrame->MoveWindow(CRect(prefs.win_rect));
|
|
|
|
|
mainFrame->ShowWindow(m_nCmdShow);
|
2014-01-31 08:23:00 +13:00
|
|
|
mainFrame->UpdateWindow();
|
|
|
|
|
|
2019-01-19 18:31:46 +01:00
|
|
|
if (prefs.win_maximized)
|
|
|
|
|
mainFrame->ShowWindow(SW_SHOWMAXIMIZED);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-19 18:31:46 +01:00
|
|
|
int BlitzIDE::ExitInstance()
|
|
|
|
|
{
|
2014-01-31 08:23:00 +13:00
|
|
|
prefs.close();
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|