OSDN Git Service

Patch #1804762 continued
authorJochen Tucht <jtuc@users.sourceforge.net>
Tue, 16 Oct 2007 16:48:12 +0000 (16:48 +0000)
committerJochen Tucht <jtuc@users.sourceforge.net>
Tue, 16 Oct 2007 16:48:12 +0000 (16:48 +0000)
Src/StdAfx.cpp
Src/StdAfx.h

index 67660ff..4241732 100644 (file)
@@ -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.
index 9952481..b49136f 100644 (file)
@@ -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);