1
Mach SDK plugin questions and answers. / My First Plugin - Function, Forms And General Troubbles
« on: January 02, 2010, 03:59:39 AM »
Im trying to integrate my keyboard hook program into a form in my mach 3 plugin.
I have included my project (created as 'CustomPlugin' and compiles and works great) as well as my stand alone KeyboardHook project that also works by itself
Here are my questions:
1) To use my keyboard hook it should be as simple as adding the Kennedy.ManagedHooks.dll to the references and then initilize the component as:
then call install in a button:
But I have no idea where to initialize my object! I have tried it in my CustomPluginInit.cpp's header, in myPostInitControl() and all no luck compiler throws errors. Where should I initialize this object?
2) General issue I don't understand. If I use project wizard and make a blank document then add a forum I can add things like textboxes. In my plugin project I cannot add test boxes.
3) General issue is that for some reason in all my other project having variable = null; is correct, 'null' is blued as normal but in my plugin project compuler says 'null' is not defined but I can use 'NULL' and the error clears but NULL does not blue.
Anyone know if I have some random setting messed up that is causing my issues?
Thanks!
I have included my project (created as 'CustomPlugin' and compiles and works great) as well as my stand alone KeyboardHook project that also works by itself
Here are my questions:
1) To use my keyboard hook it should be as simple as adding the Kennedy.ManagedHooks.dll to the references and then initilize the component as:
Code: [Select]
private Kennedy.ManagedHooks.KeyboardHook keyboardHook = null;
keyboardHook = new Kennedy.ManagedHooks.KeyboardHook();
keyboardHook.KeyboardEvent += new Kennedy.ManagedHooks.KeyboardHook.KeyboardEventHandler(Hook_KeyboardEvent);
then call install in a button:
Code: [Select]
void CPluginTestDlg::OnBnClickedHookInstall()
{
// Install Keyboard Hook
DbgMsg(("keyboardHook Installed"));
//keyboardHook.InstallHook();
}
void CPluginTestDlg::OnBnClickedHookRemove()
{
// Remove Keyboard Hook
DbgMsg(("keyboardHook Removed"));
//keyboardHook.UninstallHook();
//keyboardHook = NULL;
}
But I have no idea where to initialize my object! I have tried it in my CustomPluginInit.cpp's header, in myPostInitControl() and all no luck compiler throws errors. Where should I initialize this object?
2) General issue I don't understand. If I use project wizard and make a blank document then add a forum I can add things like textboxes. In my plugin project I cannot add test boxes.
3) General issue is that for some reason in all my other project having variable = null; is correct, 'null' is blued as normal but in my plugin project compuler says 'null' is not defined but I can use 'NULL' and the error clears but NULL does not blue.
Anyone know if I have some random setting messed up that is causing my issues?
Thanks!