Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qm and bblean (blackbox shell)
#1
i asked the programmer of bblean on how to send messages from an external application to bblean.

in bblean commands are called [email protected],
example to call the main menu -> @BBCore.showmainmenu

he send me an example how plugins call commands :

Code:
#define BB_BROADCAST  10901

char broam_string[] = "@BBYourBroam";
SendBB(BB_BROADCAST, 0, broam_string, sizeof(broam_string));

void SendBB(UINT msg, WPARAM wParam, LPARAM lParam, UINT datasize)
{

HWND BBhwnd = FindWindow("BlackBoxClass", "BlackBox");
if (NULL == BBhwnd)
    return;

WPARAM buf[256];
WPARAM *wp = buf;

int s = datasize + sizeof(WPARAM);

if (s > sizeof buf)
  wp = (WPARAM*)m_alloc(s);

*wp = wParam;
memcpy(wp + 1, (void*)lParam, datasize);

COPYDATASTRUCT cds;
cds.dwData = msg;
cds.cbData = s;
cds.lpData = (void*)wp;
SendMessage (BBhwnd, WM_COPYDATA, (WPARAM)cwnd, (LPARAM)&cds);

if (buf != wp)
  m_free(wp);
}

can we use that in qm ?
like ->
bblean @BBCore.showmainmenu

thanks
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)