TombEngine/TR5Main/Specific/winmain.h

35 lines
1.1 KiB
C
Raw Normal View History

2018-08-19 09:46:58 +02:00
#pragma once
2019-05-09 13:50:55 +02:00
#pragma comment(linker,"/manifestdependency:\"" \
"type='win32' " \
"name='Microsoft.Windows.Common-Controls' " \
"version='6.0.0.0' " \
"processorArchitecture='*' " \
"publicKeyToken='6595b64144ccf1df' " \
"language='*'\"")
typedef struct WINAPP
{
HINSTANCE hInstance;
int nFillMode;
WNDCLASS WindowClass;
HWND WindowHandle;
bool bNoFocus;
bool isInScene;
};
extern WINAPP App;
extern unsigned int ThreadID;
extern uintptr_t ThreadHandle;
2018-08-19 09:46:58 +02:00
extern HACCEL hAccTable;
2020-04-23 19:22:01 +02:00
extern HWND WindowsHandle;
2018-08-19 09:46:58 +02:00
// return handle
#define BeginThread(function, threadid) _beginthreadex(0, 0, &function, 0, 0, &threadid)
#define EndThread() _endthreadex(1)
2020-06-18 15:54:08 +02:00
int lua_exception_handler(lua_State* L, sol::optional<const std::exception&> maybe_exception, sol::string_view description);
void WinProcMsg();
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
void WinClose();
LRESULT CALLBACK WinAppProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
void CALLBACK HandleWmCommand(unsigned short wParam);