Valhalla Legends Forums Archive | Visual Basic Programming | Plugin Problem

AuthorMessageTime
KkBlazekK
Okay, I am making plugins for my bot, and they create menus on the main form of my bot. I need to make that menu's onclick goto code in the plugin, how would I go about doing this?
April 17, 2005, 7:08 PM
UserLoser.
Just have the plugin hook the main window and the plugin create the menu.  In your message hook, watch for WM_COMMAND message and look for when your menu is commanded (clicked, pressed) then do the appropriate actions in your plugin
April 17, 2005, 9:20 PM
Networks
Out of curiosity how exactly does your plugin create a menu? What did you do to do this?
April 17, 2005, 9:38 PM
UserLoser.
The plugins I write are BinaryChat Plugins, which I use on SphtBot.  All I simply do is: API.GetMenu(PluginAPI::MainWindowMenu), and from I use the PluginMenu package inside the plugin to do whatever you wish.

Otherwise, pass the window handle over to your plugin, then use GetMenu, AppendMenu, CreateMenu, InsertMenuItem, etc.  Also, use SetWindowsHookEx and UnhookWindowsHookEx to hook and unhook the window.
April 17, 2005, 9:42 PM

Search