mirror of
https://github.com/fadden/ciderpress.git
synced 2024-12-22 05:29:43 +00:00
b2cd857031
This adds a replacement for the SelectFilesDialog class. It has been updated to use Explorer-style dialogs, which are a bit nicer than the old-style dialogs. Hopefully this will eliminate some of the brain damage, like the disappearing Accept button. This change only updates MDC. A second change will update the main app and remove the old code. Also, updated the MDC version to 3.0.0, and changed the web site linked in the Help menu from faddensoft.com to a2ciderpress.com.
65 lines
1.4 KiB
C++
65 lines
1.4 KiB
C++
/*
|
|
* CiderPress
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
* See the file LICENSE for distribution terms.
|
|
*/
|
|
/*
|
|
* The application object.
|
|
*/
|
|
#include "stdafx.h"
|
|
#include "mdc.h"
|
|
#include "Main.h"
|
|
#include <process.h>
|
|
|
|
/* magic global that MFC finds (or that finds MFC) */
|
|
MyApp gMyApp;
|
|
|
|
DebugLog* gDebugLog;
|
|
|
|
/*
|
|
* Constructor. This is the closest thing to "main" that we have, but we
|
|
* should wait for InitInstance for most things.
|
|
*/
|
|
MyApp::MyApp(LPCTSTR lpszAppName) : CWinApp(lpszAppName)
|
|
{
|
|
// TODO: make the log file configurable
|
|
gDebugLog = new DebugLog(L"C:\\src\\mdclog.txt");
|
|
|
|
time_t now = time(NULL);
|
|
LOGI("MDC v%d.%d.%d started at %.24hs",
|
|
kAppMajorVersion, kAppMinorVersion, kAppBugVersion,
|
|
ctime(&now));
|
|
|
|
int tmpDbgFlag;
|
|
// enable memory leak detection
|
|
tmpDbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
|
tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;
|
|
_CrtSetDbgFlag(tmpDbgFlag);
|
|
LOGI("Leak detection enabled");
|
|
}
|
|
|
|
/*
|
|
* This is the last point of control we have.
|
|
*/
|
|
MyApp::~MyApp(void)
|
|
{
|
|
LOGI("MDC shutting down");
|
|
delete gDebugLog;
|
|
}
|
|
|
|
|
|
/*
|
|
* It all begins here.
|
|
*
|
|
* Create a main window.
|
|
*/
|
|
BOOL
|
|
MyApp::InitInstance(void)
|
|
{
|
|
m_pMainWnd = new MainWindow;
|
|
m_pMainWnd->ShowWindow(m_nCmdShow);
|
|
m_pMainWnd->UpdateWindow();
|
|
|
|
return TRUE;
|
|
}
|