This C++ add-in implements mouse events and currently handles the LMB down event. Search for the string "MouseImplementation" in the Document.h and Document.cpp files for the implementation code of the CMouse class. Note that the mouse handler is implemented per model view, so your add-in must implement the model view event handling as well. (Check the ModelView events checkbox during the add-in creation). You have to change the Visual Studio Project\Properties C/C++ settings to your main SolidWorks install folder to pick up the sldworks.tlb.
In 2015, Microsoft removed support for Windows 2000 and earlier. Windows 2000 support has been replaced by Windows 7 support in the attached stdafx.h. ( #define WINVER 0x0400 ==> 0x0601) After you have extracted the attached SwAddinMouse.zip, replace its stdafx.h with the attached version. If you need XP support, modify stdafx.h to use it (#define WINVER 0x0501).
|- required for full access.|
- Looking for more API Examples?
Copyright (c) 2010 Dassault Systemes SolidWorks Corp. All rights reserved. Do not distribute or reproduce without the written consent of Dassault Systemes SolidWorks Corp.