20 个解决方案
#1
在资源视图里面点击该按钮,直接输入中文即可。
#2
直接写成中文就行了!!???
MessageBox(“世界”,....);
MessageBox(“世界”,....);
#3
int MessageBoxEx( HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType,
WORD wLanguageId);
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType,
WORD wLanguageId);
#4
研究的真是透彻啊,UP
#5
问错了,是确定按钮改成英文,我的操作系统是中文操作系统
#6
这种方法试过了,无效
#7
不行就用自定义对话框,哈哈
#8
好象不能改变.自己做一个MESSAGEBOX吧.
#9
先得到这个messagebox的窗口句柄,再得到messageBox对话框上的按钮的句柄,直接调用的SetWindowText修改按钮的句柄,就行了。
怎么找这个窗口的方法千千万万,我只举一个:
1.先用findwindow方法根据messagebox的标题找到messagebox,然后用enumWindow找到button.
怎么找这个窗口的方法千千万万,我只举一个:
1.先用findwindow方法根据messagebox的标题找到messagebox,然后用enumWindow找到button.
#10
MessageBoxEx,原来可以这样用。学习了。
#11
#12
原来还用MessageBoxEx这东西,没用过
#13
部长深不可测。。
#14
wLanguageId
Specifies the language in which to display the text contained in the predefined push buttons. This value must be in the form returned by theMAKELANGID macro.
For a list of the language identifiers supported by Win32, seeLanguage Identifiers. Note that each localized release of Windows and Windows NT typically contains resources only for a limited set of languages. Thus, for example, the U.S. version offers LANG_ENGLISH, the French version offers LANG_FRENCH, the German version offers LANG_GERMAN, and the Japanese version offers LANG_JAPANESE. Each version offers LANG_NEUTRAL. This limits the set of values that can be used with the wLanguageId parameter. Before specifying a language identifier, you should enumerate the locales that are installed on a system.
Specifies the language in which to display the text contained in the predefined push buttons. This value must be in the form returned by theMAKELANGID macro.
For a list of the language identifiers supported by Win32, seeLanguage Identifiers. Note that each localized release of Windows and Windows NT typically contains resources only for a limited set of languages. Thus, for example, the U.S. version offers LANG_ENGLISH, the French version offers LANG_FRENCH, the German version offers LANG_GERMAN, and the Japanese version offers LANG_JAPANESE. Each version offers LANG_NEUTRAL. This limits the set of values that can be used with the wLanguageId parameter. Before specifying a language identifier, you should enumerate the locales that are installed on a system.
#15
哎,哪里去弄这个语言
#17
学习了
#18
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
MessageBoxEx(NULL,L"TEXT",L"cg",MB_YESNOCANCEL | MB_DEFBUTTON2,MAKELANGID(0x09,0x01));//英文 美国
return 0;
}
效果如下 WIN7 测试 (WIN7 默认装了英文包)
{
MessageBoxEx(NULL,L"TEXT",L"cg",MB_YESNOCANCEL | MB_DEFBUTTON2,MAKELANGID(0x09,0x01));//英文 美国
return 0;
}
效果如下 WIN7 测试 (WIN7 默认装了英文包)
#19
//WIN7+VS2010
MessageBoxEx(AfxGetMainWnd()-> m_hWnd,L"Hello Word",L"Info", MB_RETRYCANCEL, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
#20
谢谢各位,上面的方法必须有语言包才行,最后还是在codeproject上找了个类来实现,我用的是vs2008
#21
#1
在资源视图里面点击该按钮,直接输入中文即可。
#2
直接写成中文就行了!!???
MessageBox(“世界”,....);
MessageBox(“世界”,....);
#3
int MessageBoxEx( HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType,
WORD wLanguageId);
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType,
WORD wLanguageId);
#4
研究的真是透彻啊,UP
#5
问错了,是确定按钮改成英文,我的操作系统是中文操作系统
#6
这种方法试过了,无效
#7
不行就用自定义对话框,哈哈
#8
好象不能改变.自己做一个MESSAGEBOX吧.
#9
先得到这个messagebox的窗口句柄,再得到messageBox对话框上的按钮的句柄,直接调用的SetWindowText修改按钮的句柄,就行了。
怎么找这个窗口的方法千千万万,我只举一个:
1.先用findwindow方法根据messagebox的标题找到messagebox,然后用enumWindow找到button.
怎么找这个窗口的方法千千万万,我只举一个:
1.先用findwindow方法根据messagebox的标题找到messagebox,然后用enumWindow找到button.
#10
MessageBoxEx,原来可以这样用。学习了。
#11
#12
原来还用MessageBoxEx这东西,没用过
#13
部长深不可测。。
#14
wLanguageId
Specifies the language in which to display the text contained in the predefined push buttons. This value must be in the form returned by theMAKELANGID macro.
For a list of the language identifiers supported by Win32, seeLanguage Identifiers. Note that each localized release of Windows and Windows NT typically contains resources only for a limited set of languages. Thus, for example, the U.S. version offers LANG_ENGLISH, the French version offers LANG_FRENCH, the German version offers LANG_GERMAN, and the Japanese version offers LANG_JAPANESE. Each version offers LANG_NEUTRAL. This limits the set of values that can be used with the wLanguageId parameter. Before specifying a language identifier, you should enumerate the locales that are installed on a system.
Specifies the language in which to display the text contained in the predefined push buttons. This value must be in the form returned by theMAKELANGID macro.
For a list of the language identifiers supported by Win32, seeLanguage Identifiers. Note that each localized release of Windows and Windows NT typically contains resources only for a limited set of languages. Thus, for example, the U.S. version offers LANG_ENGLISH, the French version offers LANG_FRENCH, the German version offers LANG_GERMAN, and the Japanese version offers LANG_JAPANESE. Each version offers LANG_NEUTRAL. This limits the set of values that can be used with the wLanguageId parameter. Before specifying a language identifier, you should enumerate the locales that are installed on a system.
#15
哎,哪里去弄这个语言
#16
#17
学习了
#18
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
MessageBoxEx(NULL,L"TEXT",L"cg",MB_YESNOCANCEL | MB_DEFBUTTON2,MAKELANGID(0x09,0x01));//英文 美国
return 0;
}
效果如下 WIN7 测试 (WIN7 默认装了英文包)
{
MessageBoxEx(NULL,L"TEXT",L"cg",MB_YESNOCANCEL | MB_DEFBUTTON2,MAKELANGID(0x09,0x01));//英文 美国
return 0;
}
效果如下 WIN7 测试 (WIN7 默认装了英文包)
#19
//WIN7+VS2010
MessageBoxEx(AfxGetMainWnd()-> m_hWnd,L"Hello Word",L"Info", MB_RETRYCANCEL, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
#20
谢谢各位,上面的方法必须有语言包才行,最后还是在codeproject上找了个类来实现,我用的是vs2008