[USER32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 19 Nov 2015 00:30:27 +0000 (00:30 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 19 Nov 2015 00:30:27 +0000 (00:30 +0000)
Implement now-documented MB_GetString. See: https://msdn.microsoft.com/en-us/library/windows/desktop/dn910915(v=vs.85).aspx and: http://undoc.airesoft.co.uk/user32.dll/MB_GetString.php for more information.

svn path=/trunk/; revision=69936

reactos/win32ss/user/user32/windows/messagebox.c

index f08f2ca..729cb36 100644 (file)
@@ -1046,11 +1046,21 @@ MessageBeep(UINT uType)
 
 /*
  * @implemented
+ *
+ * See: https://msdn.microsoft.com/en-us/library/windows/desktop/dn910915(v=vs.85).aspx
+ * and: http://undoc.airesoft.co.uk/user32.dll/MB_GetString.php
+ * for more information.
  */
-LPWSTR WINAPI MB_GetString(DWORD string)
+LPCWSTR WINAPI MB_GetString(UINT wBtn)
 {
-    UNIMPLEMENTED;
-    return NULL;
+    LPCWSTR btnStr = NULL;
+
+    /* The allowable IDs are between IDOK (0) and IDCONTINUE (11) inclusive */
+    if (wBtn >= IDCONTINUE)
+        return NULL;
+
+    LoadStringW(User32Instance, wBtn, (LPWSTR)&btnStr, 0);
+    return btnStr;
 }
 
 /* EOF */