Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 12:02:50 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Mach3 Plugin Tutorial Document and Prototype File Set
Pages: « 1 2 3 4 5 6 7 8 9 10   Go Down
Print
Author Topic: Mach3 Plugin Tutorial Document and Prototype File Set  (Read 25134 times)
0 Members and 1 Guest are viewing this topic.
TomHubin
Active Member

Offline Offline

Posts: 141


View Profile
« Reply #90 on: April 05, 2009, 01:50:04 PM »

I suspect it must vary or something, I tried your code in mine, by calling the cleanup from my notivy, and it crashed mach....

so, back to the drawing board..........

scott

Hello Scott,

What msg is myNotify() getting when Mach3 is shutting down?

If the plugin is enabled then Mach3 will call also myCleanUp(). So if you have already cleaned up with myNotfiy() then you need to be sure that myCleanUp() does not cleanup again. I set a flag to true when I create the plugin dialog box. When myCleanUp() cleans up it first tests this flag to see if there is something to clean up. If so, then it does the cleanup job then clears this flag.

Tom
Logged
jemmyell
Active Member

Offline Offline

Posts: 106


View Profile WWW
« Reply #91 on: April 05, 2009, 02:06:57 PM »

Hi,

Since the notification ALWAYS gets called I simply stopped using myCleanup all together.

See the Yahoo group for a prior discussion, particularly:

http://groups.yahoo.com/group/mach1mach2cnc/message/95280

-James

Logged

poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,690


Briceville, TN, USA


View Profile WWW
« Reply #92 on: May 15, 2009, 10:19:11 AM »

Hey Guys, just as a side note:  I got the Modless windows closing in Mach MAD, by using both of the notifications in MyNotify().

#define SHUTDOWN      14 // Undocumented notification
#define JAMESSHUTDOWN      0x12000e  // Undocumented notification

But out of about 112 users so far, I have 2 that STill get the crash, I suspect that there is a 3rd notification that they must get on thier computers. I had to have them "down grade" back to the previous version since I had no way to see what message ID that thier computers where throwing.

void   myNotify ( int ID)
{
   if ((ID == SHUTDOWN)||(ID == JAMESSHUTDOWN))
   {   
      //AfxMessageBox("ShutDown called.");
      
      if (NULL != dlg) {

         dlg->DestroyWindow();         
         delete dlg;
         dlg = NULL;
      }

      mach3CWnd.Detach();      
   }

} //myNotify

//scott
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
RapidZer
Holding

Offline Offline

Posts: 1


View Profile
« Reply #93 on: February 21, 2010, 10:17:31 PM »

            With the help of the tutorial I think my problem will be solved finally. All the suggestions and details I got in this discussion are really great. Now I can do the prototype perfectly with no mistakes.
Logged
NosmoKing
Active Member

Offline Offline

Posts: 193


View Profile
« Reply #94 on: September 18, 2011, 11:00:29 AM »

This thread seems to have petered out, is it carried on elswhere?
I just got hold of VS2008 so am hoping to use it for a plug-in?
Nosmo.
Logged
jemmyell
Active Member

Offline Offline

Posts: 106


View Profile WWW
« Reply #95 on: September 18, 2011, 11:06:29 AM »

Hi,

There is another thread about VC2008:

http://www.machsupport.com/forum/index.php/topic,10733.0.html

But I personally would use 2003 - it is native for Mach3 plugins.  There are serious issues with MFC versions that the 2008 stuff sidesteps.  If you want to use this tutorial you really need to use 2003.

Just my two cents.

-James Leonard
Logged

jarekk
Active Member

Offline Offline

Posts: 42


View Profile
« Reply #96 on: September 20, 2011, 02:53:14 AM »

I use VC2010 Express with no problem with my motion plugin. But rather with .NET then MFC. Just installed DDK to get ATL support ( needed when callling some Mach functions).

Jarek
Logged
Pages: « 1 2 3 4 5 6 7 8 9 10   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!