|
Post by Centanoul on Nov 10, 2006 12:47:52 GMT -5
You'll notice the main DLL supports the normal alert command most of us are familiar with:
'B4GL Messagebox("String") -------------------------------- // C++ void DLLFUNC Func_MessageBox(IDLL_Basic4GL_Runtime &basic4gl) {
// Extract string parameter const char *msg = basic4gl.GetStringParam(1);
// Display the message box MessageBox(NULL, msg, "Plugin DLL", MB_OK); }
// Message box function registry.RegisterVoidFunction("MessageBox", Func_MessageBox); registry.ModTimeshare(); registry.AddParam(DLL_BASIC4GL_STRING);
and if you also load Madcow's plugin, which roughly equals this code: (I can't say for sure, since I can't see the source of a DLL without the project files)
'B4GL Messagebox("String1", "String2") -------------------------------- // C++ void DLLFUNC Func_MessageBox2(IDLL_Basic4GL_Runtime &basic4gl) {
// Extract string parameter const char *msg2 = basic4gl.GetStringParam(2); const char *msg1 = basic4gl.GetStringParam(1);
// Display the message box MessageBox(NULL, msg1, msg2, MB_OK); }
// Message box function registry.RegisterVoidFunction("MessageBox", Func_MessageBox2); registry.ModTimeshare(); registry.AddParam(DLL_BASIC4GL_STRING); registry.AddParam(DLL_BASIC4GL_STRING);
You can use the function in B4GL: Messagebox(string [, string; default: "Plugin DLL"]) ...just an interesting effect I thought I would point out. It may become useful to use.
|
|
|
Post by James :) (aka Madcow) on Oct 13, 2007 16:50:49 GMT -5
what dose the code at the end mean?
|
|