Files
zodiacon-WFPExplorer/WFPExplorer/WFPExplorer.cpp
T
Pavel Yosifovich 0886fed2d5 basic sessions view
2022-10-31 10:20:39 -04:00

52 lines
1.0 KiB
C++

// WFPExplorer.cpp : main source file for WFPExplorer.exe
//
#include "pch.h"
#include "resource.h"
#include "MainFrm.h"
#include <ThemeHelper.h>
#pragma comment(lib, "Fwpuclnt.lib")
#pragma comment(lib, "Shlwapi.lib")
CAppModule _Module;
int Run(LPTSTR /*lpstrCmdLine*/ = nullptr, int nCmdShow = SW_SHOWDEFAULT) {
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
CMainFrame wndMain;
if (wndMain.CreateEx() == nullptr) {
ATLTRACE(_T("Main window creation failed!\n"));
return 0;
}
wndMain.ShowWindow(nCmdShow);
int nRet = theLoop.Run();
_Module.RemoveMessageLoop();
return nRet;
}
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow) {
HRESULT hRes = ::CoInitialize(nullptr);
ATLASSERT(SUCCEEDED(hRes));
AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls
hRes = _Module.Init(nullptr, hInstance);
ATLASSERT(SUCCEEDED(hRes));
ThemeHelper::Init();
int nRet = Run(lpstrCmdLine, nCmdShow);
_Module.Term();
::CoUninitialize();
return nRet;
}