31 lines
557 B
C++
31 lines
557 B
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include <atomic>
|
|
#include <thread>
|
|
|
|
namespace pp::platform::windows {
|
|
|
|
class SplashScreen final
|
|
{
|
|
public:
|
|
explicit SplashScreen(HINSTANCE hInst);
|
|
~SplashScreen();
|
|
|
|
SplashScreen(const SplashScreen&) = delete;
|
|
SplashScreen& operator=(const SplashScreen&) = delete;
|
|
SplashScreen(SplashScreen&&) = delete;
|
|
SplashScreen& operator=(SplashScreen&&) = delete;
|
|
|
|
void dismiss();
|
|
|
|
private:
|
|
void thread_main();
|
|
|
|
HINSTANCE hInst_{};
|
|
std::atomic<HWND> dialog_{};
|
|
std::jthread thread_;
|
|
};
|
|
|
|
}
|