admin管理员组

文章数量:1435859

I have a Visual-C++ Win32 Project, which I developed with Visual Studio 2015. Now I made an upgrade to Visual Studio 2022.

All works fine, except every time I make a small change, like just move a button or anything else and save, the <project>.rc file is completely changed - this is ok because it is rebuilt by the wizard, but the IDs are partially changed.

For example:

CONTROL         Zahnreader2,-1,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN | WS_BORDER,7,7,97,130

is changed to:

CONTROL         VK_NONAME,-1,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN | WS_BORDER,7,7,97,130

After this, I can't build because some keywords can not be found (WS_EX_COMPOSITED, VK_GAMEPAD_B).

When upgrading from 2015 to 2022, I also the following steps:

  • Additionaly installed Visual Studio 2015 because of 4.5 for c#
  • Installed MFC.
  • Set struct alignment to standard.
  • Retarged Solution to latest installed versions.

At the moment, I can edit the <project>.rc with a text-editor, which works. But how can I get back to edit resources inside Visual Studio?

本文标签: cUpgrade Visual Studio 2015 to 2022 Resource File is corrupt after edit in VS 2022Stack Overflow