为什么Visual Studio资源编辑器用保存上的值代替我的一些常数
我正在开发一个项目,多年来该项目出现了许多不同的 Visual Studio 版本。
对于某些安装,当前使用 VS2022、V 17.1.3(但之前使用 VS2019),每当我编辑资源并保存它们时,对话框资源的一些常量都会被替换为 .rc 文件中的数字
:
Fe ES_AUTOHSCROLL
替换为 0x80
CONTROL "",IDC_TXT,"RichEdit20W",ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP,96,115,38,12
CONTROL "",IDC_TXT,"RichEdit20W",WS_BORDER | WS_TABSTOP | 0x80,96,115,38,12
和 ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_AUTOHSCROLL ES_WANTRETURN
被 0x10c4
替换
CONTROL "",IDC_COMMENT,"RichEdit20W",ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_TABSTOP,95,204,219,30
CONTROL "",IDC_COMMENT,"RichEdit20W",WS_BORDER | WS_TABSTOP | 0x10c4,95,204,219,30
Resource.h
中看似任意的定义在 DLGINIT
中被替换为
IDC_SOME, 0x403, 9, 0
to
1838, 0x403, 9, 0
,即使它是在Resource.h
as
#define IDC_SOME 1838
且没有其他内容被替换。
还在所有位图和光标资源之间插入一条线,以便
IDR_MAINFRAME BITMAP "res\\Toolbar.bmp"
IDB_TREEITEM BITMAP "res\\treeitem.bmp"
和
IDC_TRACKBALL CURSOR "res\\track.cur"
IDC_ZOOMWINDOW CURSOR "res\\zoom1.cur"
成为
IDR_MAINFRAME BITMAP "res\\Toolbar.bmp"
IDB_TREEITEM BITMAP "res\\treeitem.bmp"
,
IDC_TRACKBALL CURSOR "res\\track.cur"
IDC_ZOOMWINDOW CURSOR "res\\zoom1.cur"
这是一个错误还是有一个设置或属性可以用来阻止这个?
I'm working on a project which has seen a lot of different Visual Studio versions over the years.
For some installations, currently with VS2022, V 17.1.3 (but also before with VS2019) whenever i edit resources and save them, some of the constants of dialog resources are replaced with numbers in the .rc file
:
F.e. ES_AUTOHSCROLL
is replaced by 0x80
CONTROL "",IDC_TXT,"RichEdit20W",ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP,96,115,38,12
CONTROL "",IDC_TXT,"RichEdit20W",WS_BORDER | WS_TABSTOP | 0x80,96,115,38,12
and ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
is replaced by 0x10c4
CONTROL "",IDC_COMMENT,"RichEdit20W",ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_TABSTOP,95,204,219,30
CONTROL "",IDC_COMMENT,"RichEdit20W",WS_BORDER | WS_TABSTOP | 0x10c4,95,204,219,30
A seemingly arbitrary define from Resource.h
is replaced in DLGINIT
from
IDC_SOME, 0x403, 9, 0
to
1838, 0x403, 9, 0
even though it is defined in Resource.h
as
#define IDC_SOME 1838
and no others are replaced.
Also a line is inserted between all bitmap and cursor resources so that
IDR_MAINFRAME BITMAP "res\\Toolbar.bmp"
IDB_TREEITEM BITMAP "res\\treeitem.bmp"
and
IDC_TRACKBALL CURSOR "res\\track.cur"
IDC_ZOOMWINDOW CURSOR "res\\zoom1.cur"
become
IDR_MAINFRAME BITMAP "res\\Toolbar.bmp"
IDB_TREEITEM BITMAP "res\\treeitem.bmp"
and
IDC_TRACKBALL CURSOR "res\\track.cur"
IDC_ZOOMWINDOW CURSOR "res\\zoom1.cur"
Is this a bug or is there a setting or property which can be used to stop this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论