Last active
August 29, 2015 14:14
-
-
Save yorung/4c036b2e65265dfdfde3 to your computer and use it in GitHub Desktop.
Bind MessageBox to Lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int MesBox(lua_State *L) | |
{ | |
const char* str = lua_tostring(L, 1); | |
MessageBoxA(nullptr, str, "LuaTest", MB_OK); | |
return 0; | |
} | |
void Bind() | |
{ | |
lua_register(L, "MesBox", MesBox); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MesBox("A message from Lua") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment