//////////////////////////////////////////
// FileNameCleaner.cpp
//Copyright (c) 05/06/2020 by BCCSkelton
//////////////////////////////////////////
#include	<stdio.h>
#include	"FileNameCleaner.h"
#include	"FileNameCleanerProc.h"

////////////////
// WinMain関数
////////////////
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
					LPSTR lpCmdLine, int nCmdShow) {

	//２重起動防止
	if(!FileNameCleaner.IsOnlyOne()) {
		//ここに２重起動時の処理を書く（下記は１例）
		HWND hWnd = FindWindow("MainWnd", "FileNameCleaner");
		if(IsIconic(hWnd))
			ShowWindow(hWnd, SW_RESTORE);
		SetForegroundWindow(hWnd);
		return 0L;
	}

	//モードレスダイアログを作成Create(hParent, DlgName, DlgProc);
	if(!FileNameCleaner.Create(NULL, hInstance, "IDD_MAIN", ModelessProc))
		return 0L;

	//メッセージループに入る
	return FileNameCleaner.Loop();
}
