gpt4 book ai didi

c++ - 我可以本地化 AFX_IDP_ASK_TO_SAVE 吗?

转载 作者:行者123 更新时间:2023-11-30 04:24:30 25 4
gpt4 key购买 nike

在我的应用程序中,我有一个“你想保存你的更改吗?”消息框。我正在从 MFC 获取要显示的文本:

CString prompt;
AfxFormatString1(prompt, AFX_IDP_ASK_TO_SAVE, strFileName);
UINT nResult = AfxMessageBox(prompt, MB_YESNOCANCEL, AFX_IDP_ASK_TO_SAVE)

现在我正在将应用程序本地化为日语。我猜像这样的标准文本已经被翻译成大多数主要语言。但我不知道如何设置 MFC 以使用日文版的这些标准文本的资源标识符。可以这样做吗?

最佳答案

原来我需要更改我的 .rc 文件中的一些包含文件:

#include "afxres.rc"         // Standard components
#include "afxprint.rc" // printing/print preview resources
#include "afxribbon.rc" // MFC ribbon and control bar resources

需要成为:

#include "l.jpn/afxres.rc"         // Standard components
#include "l.jpn/afxprint.rc" // printing/print preview resources
#include "l.jpn/afxribbon.rc" // MFC ribbon and control bar resources

关于c++ - 我可以本地化 AFX_IDP_ASK_TO_SAVE 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12726858/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com