/////////////////////////////////////////////////
//
//  filename: Main.cpp
//  author:’ƒ•¶“’Ž¡ 
//  date: 2018/04/03 ver1.00
//		  2020/02/06 ver1.01
//
/////////////////////////////////////////////////

#include "StdAfx.h"
#include "MainWindow.h"
#include "Main.h"

class CMain *theApp;
class CMainWindow;

GdiplusStartupInput gdiSI;
ULONG_PTR gdiToken;

HMODULE hRichLib;

CMain::CMain(){
}

CMain::~CMain(){
}

int APIENTRY _tWinMain(HINSTANCE hInst, HINSTANCE PrevInst, LPTSTR lpCmdLine, int nCmdShow){

	CoInitialize(NULL);
	GdiplusStartup(&gdiToken, &gdiSI, NULL);

	setlocale(LC_ALL, "Japanese");
	hRichLib = LoadLibrary(L"Msftedit.dll");

	theApp = new CMain();
	theApp->MainWindow = new CMainWindow();
	theApp->MainWindow->CreateWnd();

	MSG msg;
	while (GetMessage(&msg, NULL, 0, 0) > 0){
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}

	FreeLibrary(hRichLib);
	GdiplusShutdown(gdiToken);
	CoUninitialize();

	return true;
}
