简体   繁体   English

如何在Visual Studio中重命名资源?

[英]How to rename a resource in Visual Studio?

Okay, I've never done win32 programming before, and I have a question that seems fairly stupid.. 好吧,我之前从未做过win32编程,而且我有一个看似相当愚蠢的问题。

在此输入图像描述

How do I rename IDR_MENU1 to, for example, IDR_MAIN_MENU ? 如何将IDR_MENU1重命名为例如IDR_MAIN_MENU I tried everything couldn't find a way. 我试过一切都找不到办法。

You can modify the resource if you select your resource, example IDR_MENU1 in resource view. 如果选择资源,则可以修改资源,例如资源视图中的IDR_MENU1。 Activate the property palette (Ctrl +W, P) and you can then edit the IDR_MENU1 value. 激活属性选项板(Ctrl + W,P),然后可以编辑IDR_MENU1值。

This is from 2011, but I didn't see a good answer. 这是从2011年开始,但我没有看到一个好的答案。

Here is one easy way to rename IDR_MENU1 to another name. 这是将IDR_MENU1重命名为其他名称的一种简单方法。 Select IDR_MENU1, then hit ALT + ENTER. 选择IDR_MENU1,然后按ALT + ENTER。 This will show the 'Properties' window. 这将显示“属性”窗口。 Here you can rename IDR_MENU1 under 'Id'. 在这里,您可以在“Id”下重命名IDR_MENU1。

Exit Visual Studio and then edit the DbcEditor.RC file. 退出Visual Studio,然后编辑DbcEditor.RC文件。 And replace all occurrences of IDR_MENU1 with whatever you want. 并将所有出现的IDR_MENU1替换为您想要的任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM