HWND hWndFrom = nCmdId == GO_PAGE_1 ? hMainPage : nCmdId == GO_PAGE_2 ? hPage_1 : hPage_2;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR args, int nCmdShow)
-------------- Build: Release in code_project_example (compiler: GNU GCC Compiler)--------------- gcc.exe -Wall -O2 -c "D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c" -o obj\Release\main.o gcc.exe -o bin\Release\code_project_example.exe obj\Release\main.o -s D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c: In function 'CreatePage': D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:32:3: error: 'reinterpret_cast' undeclared (first use in this function) reinterpret_cast<hmenu>(uWindowId), // menu handle or child identifier ^~~~~~~~~~~~~~~~ D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:32:3: note: each undeclared identifier is reported only once for each function it appears in D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:32:20: error: expected expression before 'HMENU' reinterpret_cast<hmenu>(uWindowId), // menu handle or child identifier ^~~~~ In file included from D:/Program_Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/winnt.h:9, from D:/Program_Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/minwindef.h:163, from D:/Program_Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/windef.h:8, from D:/Program_Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/windows.h:69, from D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:1: D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:25:9: error: too few arguments to function 'CreateWindowExA' hWnd = CreateWindowEx( ^~~~~~~~~~~~~~ In file included from D:/Program_Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/windows.h:72, from D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:1: D:/Program_Files/CodeBlocks/MinGW/x86_64-w64-mingw32/include/winuser.h:2137:26: note: declared here WINUSERAPI HWND WINAPI CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam); ^~~~~~~~~~~~~~~ D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c: In function 'OnCreate': D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:50:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token WNDCLASSEX wndClassEx{}; // class structure ^ D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:51:2: error: 'wndClassEx' undeclared (first use in this function); did you mean 'ReadClassStm'? wndClassEx.cbSize = sizeof wndClassEx; ^~~~~~~~~~ ReadClassStm D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:53:27: error: 'reinterpret_cast' undeclared (first use in this function) wndClassEx.lpfnWndProc = reinterpret_cast<wndproc>(GetWindowLongPtr(hWnd, GWLP_WNDPROC)); ^~~~~~~~~~~~~~~~ D:\Programming\desktop_programming\C\windows api programming\code_project_example\code_project_example\main.c:53:44: error: expected expression before 'WNDPROC' wndClassEx.lpfnWndProc = reinterpret_cast<wndproc>(GetWindowLongPtr(hWnd, GWLP_WNDPROC)); ^~~~~~~ ...