From: Jochen Tucht Date: Tue, 16 Oct 2007 16:48:12 +0000 (+0000) Subject: Patch #1804762 continued X-Git-Tag: 2.16.5~3969 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=66d4c7d156fe78aaefc5ff7bc5652d322020439d;p=winmerge-jp%2Fwinmerge-jp.git Patch #1804762 continued --- diff --git a/Src/StdAfx.cpp b/Src/StdAfx.cpp index 67660ff97..42417320b 100644 --- a/Src/StdAfx.cpp +++ b/Src/StdAfx.cpp @@ -114,6 +114,17 @@ void NTAPI LangFormatString2(CString &rString, UINT id, LPCTSTR lpsz1, LPCTSTR l } /** + * @brief Lang aware version of AfxMessageBox() + */ +int NTAPI LangMessageBox(UINT nIDPrompt, UINT nType, UINT nIDHelp) +{ + String string = theApp.LoadString(nIDPrompt); + if (nIDHelp == (UINT)-1) + nIDHelp = nIDPrompt; + return AfxMessageBox(string.c_str(), nType, nIDHelp); +} + +/** * @brief Show messagebox with resource string having parameter. * @param [in] msgid Resource string ID. * @param [in] arg Argument string. diff --git a/Src/StdAfx.h b/Src/StdAfx.h index 995248135..b49136fa4 100644 --- a/Src/StdAfx.h +++ b/Src/StdAfx.h @@ -104,6 +104,9 @@ void NTAPI LangFormatString1(CString &, UINT, LPCTSTR); /** @brief Lang aware version of AfxFormatString2() */ void NTAPI LangFormatString2(CString &, UINT, LPCTSTR, LPCTSTR); + /** @brief Lang aware version of AfxMessageBox() */ +int NTAPI LangMessageBox(UINT, UINT nType = MB_OK, UINT nIDHelp = (UINT)-1); + /** @brief Format single-argument resource string and display via AfxMessageBox */ int ResMsgBox1(UINT msgid, LPCTSTR arg, UINT nType = MB_OK, UINT nIDHelp = 0);