Im still learning classes, so could someone please tell me why i get this error...
Heres the files...Code:Error E2235 wndmain.cpp 14: Member function must be called or its address taken in function wndmain::wndmain()
wndmain.cppwndmain.hCode:#define WIN32_LEAN_AND_MEAN #include <windows.h> #include "wndmain.h" wndmain::wndmain() { WNDCLASSEX WndClassEx; hIconMain = LoadIcon(NULL, IDI_APPLICATION); hCursorArrow = LoadCursor(NULL, IDC_ARROW); WndClassEx.cbSize = sizeof(WNDCLASSEX); WndClassEx.lpfnWndProc = WndProc; WndClassEx.style = CS_HREDRAW | CS_VREDRAW; return; } wndmain::~wndmain() { DestroyIcon(hIconMain); DestroyCursor(hCursorArrow); return; } LRESULT CALLBACK wndmain::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { return(0); }The error is with this line in wndmain.cpp...Code:class wndmain { public: wndmain(); ~wndmain(); protected: LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static HICON hIconMain; static HCURSOR hCursorArrow; };Anything would be helpful.Code:WndClassEx.lpfnWndProc = WndProc;




Reply With Quote