GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: Schranz0r on 2021-Feb-14

Title: Include windows.h
Post by: Schranz0r on 2021-Feb-14
Small update on windows.h include:

Copy&Paste this into a new file:
(make sure you have the headerfiles installed!)
Code: (glbasic) [Select]
INLINE

}
#define HINSTANCE W32HINSTANCE
#define HINSTANCE__ W32HINSTANCE__
#define HMODULE W32HMODULE
#undef LPSTR
#undef DECLARE_HANDLE
#undef LPCTSTR
#undef DWORD
#undef LPWSTR
#undef LPCWSTR
#define HWND W32HWND
#define HWND__ W32HWND__
#define HANDLE W32HANDLE
#undef MAX_PATH
#undef TCHAR
#define WIN32_LEAN_AND_MEAN
#define WinMain WinMain2
#include <windows.h>
namespace __GLBASIC__ {

ENDINLINE

*fixed:
Code: (glbasic) [Select]
error: conflicting declaration 'typedef struct W32HINSTANCE__* HMODULE'
   typedef HINSTANCE HMODULE;
with:
Code: (glbasic) [Select]
#define HMODULE W32HMODULE