Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

ruicarreiras

Members
  • Posts

    1
  • Joined

  • Last visited

ruicarreiras's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I´m trying to update a Chook done with the mastercam x sdk to de mastercam x9 sdk,everything it´s working but there is a function that existed on x sdk which is no longer on x9 sdk. CGui_ch.h //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Function prototype for RegisterModelessDLLPreTranslateCallBack() */ typedef BOOL (__cdecl *fp_modeless_dll_pretranslate_cb) (MSG* pMsg); /** * * @par Purpose: * This method registers the PreTranslate CallBack for a DLL application that uses a * modeless window. * * @param[in] pFuncCB The pointer to the PreTranslate CallBack function * */ DllImpExp void RegisterModelessDLLPreTranslateCallBack (fp_modeless_dll_pretranslate_cb pFuncCB); /** * * @par Purpose: * This method unregisters the PreTranslate CallBack for a DLL application that uses a * modeless window. * * @param[in] pFuncCB The pointer to the PreTranslate CallBack function * */ DllImpExp void UnRegisterModelessDLLPreTranslateCallBack (fp_modeless_dll_pretranslate_cb pFuncCB); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// This is part of my mastercam x Chook code: // BB.cpp : Define as rotinas de inicialização para o DLL. // Rui M. B. Carreiras--------------2012 #include "stdafx.h" #include "BB.h" #include "m_mastercam.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif // Note! // // If this DLL is dynamically linked against the MFC // DLLs, any functions exported from this DLL which // call into MFC must have the AFX_MANAGE_STATE macro // added at the very beginning of the function. // // For example: // // extern "C" BOOL PASCAL EXPORT ExportedFunction() // { // AFX_MANAGE_STATE(AfxGetStaticModuleState()); // // normal function body here // } // // It is very important that this macro appear in each // function, prior to any calls into MFC. This means that // it must appear as the first statement within the // function, even before any object variable declarations // as their constructors may generate calls into the MFC // DLL. // // Please see MFC Technical Notes 33 and 58 for additional // details. // ///////////////////////////////////////////////////////////////////////////// // CSelectApp BEGIN_MESSAGE_MAP(CBBApp, CWinApp) //{{AFX_MSG_MAP(CSelectApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CSelectApp construction CBBApp::CBBApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance MM_KeyDown; } ///////////////////////////////////////////////////////////////////////////// // The one and only CSelectApp object CBBApp theApp; static BOOL AppPreTranslateMessage(MSG* pMsg) { AFX_MANAGE_STATE(AfxGetStaticModuleState()) return theApp.PreTranslateMessage(pMsg); } BOOL CBBApp::InitInstance() { RegisterModelessDLLPreTranslateCallBack(AppPreTranslateMessage); return CWinApp::InitInstance(); } int CBBApp::ExitInstance() { UnRegisterModelessDLLPreTranslateCallBack(AppPreTranslateMessage); return CWinApp::ExitInstance(); } class var { double num; }; And i ask,how can i do the same thing with the mastercam x9 sdk. Best regards Rui Carreiras

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...