Table of Content
Plug-in sample

#include "plugin.h"

ED_DATA *ed_data;

const char sTitle[] = "Simple plugin";

/* -------- ON INSTALL function ---------------- */
int WINAPI OnInstall(PL_DATA *data, ED_DATA *data2)
{
ed_data = data2;
data->type = PT_MENU; // plugin type
lstrcpy(data->MenuItem,"Test plugin");

MessageBox(0,"Install",sTitle,MB_OK|MB_ICONINFORMATION);
return 0;
}

/* -------- ON CALL function ------------------ */
void WINAPI OnCall()
{
char strBuf[1024];

sprintf(strBuf,"DTM SQL editor: %d.%02d.%02d\n"
"Interface=%s, DSN=%s, User=%s, Password =%s, Owner=%s,Database=%s\n"
"Editor pages=%d, Result pages=%d",

ed_data->Version[0],
ed_data->Version[1],
ed_data->Version[2],
ed_data->interface,
ed_data->DSN,
ed_data->user,
ed_data->password,
ed_data->owner,
ed_data->database,
ed_data->txtp(),
ed_data->resp()
);
MessageBox(0,strBuf,sTitle,MB_OK|MB_ICONINFORMATION);
}

/* -------- ON TERMINATE function (optional) --- */

void WINAPI OnExit()
{
MessageBox(0,"Exit",sTitle,MB_OK|MB_ICONSTOP);
}

/* -------- ON SETTINGS function (optional) --- */

void WINAPI OnSettings()
{
MessageBox(0,"plug-in settings",sTitle,MB_OK|MB_ICONSTOP);
}