1
0
mirror of https://github.com/DxWnd/DxWnd.reloaded synced 2024-12-30 09:25:35 +01:00
gho tik 94efbbf690 v2_02_82_src
Former-commit-id: c433f1988a2d77b6e1a0a24019a714f1d24fcc81
2017-03-06 11:39:27 -05:00

32 lines
856 B
C++

#include "stdafx.h"
#include <stdio.h>
#include <stdarg.h>
int MessageBoxLang(UINT iText, UINT iCaption, UINT uType)
{
WCHAR sBuffer[1024+1];
WCHAR sCaption[48+1];
LoadStringW(AfxGetResourceHandle(), iText, (LPWSTR)&sBuffer, sizeof(sBuffer));
LoadStringW(AfxGetResourceHandle(), iCaption, (LPWSTR)&sCaption, sizeof(sCaption));
return MessageBoxExW(NULL, sBuffer, sCaption, uType, NULL);
}
int MessageBoxLangArg(UINT iText, UINT iCaption, UINT uType, ...)
{
va_list al;
WCHAR sBuffer[1024+1];
WCHAR sFormat[1024+1];
WCHAR sCaption[48+1];
LoadStringW(AfxGetResourceHandle(), iText, (LPWSTR)&sFormat, sizeof(sFormat));
LoadStringW(AfxGetResourceHandle(), iCaption, (LPWSTR)&sCaption, sizeof(sCaption));
va_start(al, uType);
vswprintf(sBuffer, 1024, sFormat, al);
va_end(al);
return MessageBoxExW(NULL, sBuffer, sCaption, uType, NULL);
}