From 3cbf206e7f84dad11b224b8e01e8f9f1a20f4989 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 16 Jan 2016 18:04:20 +0000 Subject: MirLua: winapi MessageBoxTimeout import git-svn-id: http://svn.miranda-ng.org/main/trunk@16101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/Modules/WinAPI/src/winapi.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'plugins/MirLua/Modules/WinAPI') diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index 991843de5a..6039e6a10d 100644 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -1,25 +1,6 @@ #include "stdafx.h" -typedef int(__stdcall *MSGBOXAAPI)(IN HWND hWnd, IN LPCSTR lpText, IN LPCSTR lpCaption, IN UINT uType, IN WORD wLanguageId, IN DWORD dwMilliseconds); - -int MessageBoxTimeoutA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD wLanguageId, DWORD dwMilliseconds) -{ - static MSGBOXAAPI MsgBoxTOA = NULL; - - if (!MsgBoxTOA) - { - if (HMODULE hUser32 = GetModuleHandle(_T("user32.dll"))) - { - MsgBoxTOA = (MSGBOXAAPI)GetProcAddress(hUser32, "MessageBoxTimeoutA"); - } - } - - if (MsgBoxTOA) - { - return MsgBoxTOA(hWnd, lpText, lpCaption, uType, wLanguageId, dwMilliseconds); - } - return MessageBoxA(hWnd, lpText, lpCaption, uType); -} +EXTERN_C WINUSERAPI int WINAPI MessageBoxTimeoutA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD wLanguageId, DWORD dwMilliseconds); #define MB_TIMEDOUT 32000 -- cgit v1.2.3