I'm following handmade hero series and I run into some bugs when I tried compiling, I'm running Visual Studio 2017 here's a screenshot of bugs:
Here's the code were the problem occurs:
int CALLBACK
WinMain(HINSTANCE Instance,
HINSTANCE PrevInstance,
LPSTR CommandLine,
int ShowCode)
{
WNDCLASS WindowClass = {};
// TODO(casey): Check if HREDRAW/VREDRAW/OWNDC still matter
WindowClass.lpfnWndProc = Win32MainWindowCallback;
WindowClass.hInstance = Instance;
// WindowClass.hIcon;
WindowClass.lpszClassName = "HandmadeHeroWindowClass";
if (RegisterClassA(&WindowClass))
{
HWND WindowHandle =
CreateWindowExA(
0,
WindowClass.lpszClassName,
"Handmade Hero",
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
0,
0,
Instance,
0);
Compile errors:
- "const char *" cannot be assigned to an entity of type "LPCWSTR"
- "WNDCLASS *" is incompatible with parameter of type "const WNDCLASSA *"
- "LPCWSTR" is incompatible with parameter of type "LPCSTR"