c++winapiundeclared-identifier

Undeclared identifier compiling diablo 2 program "muleview"


I get 4 undeclared identifier errors when compiling (Visual Studio 2013) and cannot figure out where and how to declare them.

error C2065: 'IDR_MAINWND' : undeclared identifier 
error C2065: 'ID_FILE_EXIT' : undeclared identifier 
error C2065: 'ID_TOOLS_OPTIONS' : undeclared identifier 
error C2065: 'ID_HELP_ABOUT' : undeclared identifier

source files: https://code.google.com/archive/p/mule-view/source/default/source

source github: https://github.com/kamikazzi1/mule-view/tree/master/

Mainwnd.cpp snippets:

wcx->lpszMenuName = MAKEINTRESOURCE(IDR_MAINWND);


case WM_COMMAND:
    {
      int id = LOWORD(wParam);
      int code = HIWORD(wParam);
      switch (id)
      {
      case IDC_ITEMFILTER:
        if (code == EN_CHANGE)
          itemList->updateSelected();
        break;
      case ID_FILE_EXIT:
        PostMessage(hWnd, WM_CLOSE, 0, 0);
        break;
      case ID_TOOLS_OPTIONS:
        {
          SettingsWnd settings(this);
          settings.doModal();
        }
        break;
      case ID_HELP_ABOUT:
        {
          AboutDlg about(this);
          about.doModal();
        }
        break;
      }
    }
    break;

Solution

  • I found there is another resource.h in res folder, so please modify mainwnd.cpp: #include "resource.h" -> #include "../res/resource.h"