Well Spoke with Brian today.
Here is the deal: I had asked if he knew of a "Message" or "ID" that we could get that if a user changed the Green Check to a Red X under the plugin config that we could grab that message notification and use it to shut down our Modless window dialogs.
He said at this time there is no message in Mach3 for us to use.
BUT!!! He said in version 4.0 he will add a Message for that so we can close our modless dialogs under the above user choices.!!!!
scott
Hello Scott,
Personally, I would rather see myCleanUp() called whenever Mach3 shuts down. As I understand it, that is the purpose of myCleanUp().
In the meantime, there may not be a reliable way to do this since James gets 0x12000e and I get 0xe when Mach3 shuts down. Here is my latest version of myNotify that shows the sizeof(msg) to be 4 bytes, as James suggested, and the value I receive as 0x0e or decimal 14.
I wonder what these values are supposed to mean? I wonder if there is a different bit for each plugin?
void myNotify ( int msg )
{
DbgMsg(("CustomPluginImpl myNotify entry"));
char tmp[81] ;
sprintf ( tmp, "sizeof(msg)=%i msg=0x%x", sizeof(msg), msg ) ;
DbgMsg((tmp));
if ( msg == 0xe )
{
DbgMsg(("Destroy Scan3d dialog box here"));
myCleanUp() ;
}
DbgMsg(("CustomPluginImpl myNotify exit"));
}