The program gives the following error:
Error LNK2019 unresolved external symbol long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) referenced in function _wWinMain@16 Win32_1 ...
#include <Windows.h> #include <tchar.h> LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); TCHAR WinName[] = _T("MainFrame"); int APIENTRY _tWinMain(HINSTANCE This, HINSTANCE Prev, LPTSTR cmd, int mode) { HWND hWnd; MSG msg; WNDCLASS wc; wc.hInstance = This; wc.lpszClassName = WinName; wc.lpfnWndProc = WndProc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.lpszMenuName = NULL; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); if (!RegisterClass(&wc)) return 0; hWnd = CreateWindowW(WinName, _T("Windowsddd"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, nullptr, nullptr, This, nullptr); ShowWindow(hWnd, mode); while (GetMessage(&msg, NULL, 0, 0)) { //TranslateMessge(&msg); //DispatchMessge(&msg); } return 0; }