-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cpp
43 lines (38 loc) · 1.13 KB
/
App.xaml.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "App.xaml.h"
#include "MainWindow.xaml.h"
namespace winrt::DemoApp::implementation {
App::App() {
InitializeComponent();
#ifdef DEBUG
UnhandledException(
[this](IInspectable const&, UnhandledExceptionEventArgs const& e) {
if (IsDebuggerPresent()) {
auto errorMessage = e.Message();
__debugbreak();
}
throw;
});
#endif
}
void App::OnLaunched(
Microsoft::UI::Xaml::LaunchActivatedEventArgs const&
) noexcept {
window = make<MainWindow>();
window.Activate();
}
}
int CALLBACK
WinMain([[maybe_unused]] HINSTANCE pInstance, [[maybe_unused]] HINSTANCE pPrevInstance, [[maybe_unused]] LPSTR pCmdLine, [[maybe_unused]] int pShowCmd) {
return 0;
}
//int CALLBACK
//WinMain([[maybe_unused]] HINSTANCE pInstance, [[maybe_unused]] HINSTANCE pPrevInstance, [[maybe_unused]] LPSTR pCmdLine, [[maybe_unused]] int pShowCmd) {
//
// winrt::init_apartment(winrt::apartment_type::single_threaded);
//
// Application::Start([](auto&&) {
// make<App>();
// }
// );
//
//}