summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_windows.cpp')
-rw-r--r--plugins/MirLua/src/m_windows.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/MirLua/src/m_windows.cpp b/plugins/MirLua/src/m_windows.cpp
index 6277d5a82b..e42c9ece7b 100644
--- a/plugins/MirLua/src/m_windows.cpp
+++ b/plugins/MirLua/src/m_windows.cpp
@@ -2,11 +2,12 @@
static int lua_MessageBox(lua_State *L)
{
- ptrT text(mir_utf8decodeT(lua_tostring(L, 1)));
- ptrT caption(mir_utf8decodeT(lua_tostring(L, 2)));
- UINT flags = lua_tointeger(L, 3);
+ HWND hwnd = (HWND)lua_touserdata(L, 1);
+ ptrT text(mir_utf8decodeT(lua_tostring(L, 2)));
+ ptrT caption(mir_utf8decodeT(lua_tostring(L, 3)));
+ UINT flags = lua_tointeger(L, 4);
- int res = ::MessageBox(NULL, text, caption, flags);
+ int res = ::MessageBox(hwnd, text, caption, flags);
lua_pushinteger(L, res);
return 1;