如何在c+&#x2B中删除_t()的硬编码值
CAToolbar* pToolBarCommunicate = (CAToolbar*)pCommandBars->Add(new CAToolbar, _T("Comman Toolbar"), xtpBarTop);
我有这个代码,其中“通用工具栏”是硬编码的,我需要将其更改为.rc文件中提到的某些ID,我应该直接删除文本并用该文本中提到的.rc文件中提到的ID替换。 - > add(new catoolbar,_t(ids_comman_toolbar),xtpbartop);
这是正确的方法吗?还是有更好的方法?
CAToolbar* pToolBarCommunicate = (CAToolbar*)pCommandBars->Add(new CAToolbar, _T("Comman Toolbar"), xtpBarTop);
I have this piece of code where the 'Common Toolbar' is hardcoded, I need to change it to some IDS mentioned in .rc file, shall I directly remove the text and replace with ID which is mentioned in .rc file with this text. something like ->Add(new CAToolbar, _T(IDS_COMMAN_TOOLBAR), xtpBarTop);
is it correct way of doing this ? or is there any better way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
makeIntresource
:您可以在此处查看更多信息:
makeIntresourcea
acro(hinuser.h)You can use
MAKEINTRESOURCE
:You can see more about it here:
MAKEINTRESOURCEA
macro (winuser.h)