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:

Chook in V9 upgrade to X2 *Help


Recommended Posts

Hi, it has been a while since I posted here. And I apreciate any help on this. TIA.

 

I have a chook program in V9 and I used Visual C++ 6.0, and now I am interested in upgrading to X2 but would like to know what I need to do to get my V9 chook ported over to X2?

 

Thanks,

Girus

Link to comment
Share on other sites

First, load the old project in VS 2005.

 

Then the Mastercam (X2) specific changes are adding the references to the new UICtrls ->

 

(In the X2 SDK, the 'UIxxx.h" files should be located in the SDKUICtrls folder.)

 

1. Update stdafx.h to include these header files.

// XP Themes support

#include "tmschema.h"

#include "CommCtrl.h"

#include "Uxtheme.h"

 

2. Update the project to add UICtrls folder to the “AdditionalIncludeDirectories”.

 

3. Update the project to add the UICtrls.lib to the “AdditionalDependencies”.

 

4. Make sure that the WIN_VER definition is set to 0501. You can do that by adding /D_WIN32_WINNT=0x0501 to the (C/C++) Command line (Additional options) of the project properties.

 

There may be more required to get your old CHook to work properly with X2 - but those will most likey be specific to your CHook.

Link to comment
Share on other sites
  • 2 weeks later...

I can only guess here as I do not have either X2 or VS2005 installed, but in my opinion it is sort of optional. I think that as long as you do not mix X2 types with standard C++ runtime calls (and vice versa), you can compile with the option on or off. If you are going to mix them, then you must define the macro.

Link to comment
Share on other sites
  • 2 months later...

Great post here Zerren, your instructions worked well.

 

You guys are probly too good to use the chook wizard smile.gif , but do you know if there is an update for that for X2? Because, as you state in step 1, stdafx.h needs to be changed for each project, so the wizard's template files could change too.

 

Maybe this is on the forum somewhere, but I couldn't find it. I am also missing something else, because I copied the old chookwizard files and followed the install instructions, but still wasn't successful. Any other recommendations would be helpful. I'm running the X2 SDK and compiling with VS 2003.

Link to comment
Share on other sites

Ok. I'll see if I can get 2005. But for now, I want to make sure I'm understanding you correctly, I cannot get a wizard working for 2003 and X2? (If it won't work, I have some more pull for getting 2005:))

 

I have been able to rebuild my old dlls with 2003 and get them to work with X2 (using the X2 SDK of course).

Link to comment
Share on other sites

Ok, I was thinking of adding the X2 changes for stdafx.h.

 

But right now, when I try to create a new project with the wizard (with the X MR2 "CHookWizard.vsz") it does not create a project. As M. Harnad mentioned to me in another post, they didn't create a wizard that would work with VS 2003, only with 2005. So, I can't really see if any of my changes to the templates worked anyway:(

 

I can try to copy the X2 .vsz wizard file into the vcprojects folder, but that errors out before creating a project. It tells me it's looking for a "CLSID" with a number matching the one found in "CHookWizard.vsz". So I'm am guessing it can't match that CLSID with the old class/es found in the old template files I copied into my sdk folder.

 

Thanks for the suggestion. Let me know if I'm missing anything, or if you've gotten anything to work that I haven't, thanks.

Link to comment
Share on other sites

Well, with VS 2003 and X2 it has never worked. I copied over the old CHookWizard.vsz and with VS 2003 it starts to look like it will work, but when I click Finish on the project, it doesn't create any files, and VS 2003 is blank (no files to work on and nothing in the Solution explorer).

 

If I use the X2 CHookWizard.vsz file, it won't even start the wizard.

Link to comment
Share on other sites

If you're using Visual Studio 2003, you can try these manual steps to install the C-Hook wizard:

 

Visual Studio .NET C-HookWizard Install steps

April 20, 2005

 

1.Copy the CHookWizard.dll and CHookWizard.vsz files to your SDK folder.

2.Copy the Scripts and Templates folders under your SDK folder.

3.Copy the CHookWizard.ico and CHookWizard.vsz files from the vc7vcprojects folder to the .Net vc7vcprojects folder.

4.Register the CHookWizard.dll file.

 

 

Note: If you don’t use the default install path (ie. C:Mcamx), you’ll need to modify default.js and vc7vcprojectsCHookWizard.vsz to point to the correct folder.

 

If you're using Visual Studio 2005, you'll need to install the C-Hook wizard from X2 MR1 when it is available.

Link to comment
Share on other sites

Thank you for the instructions, but I've already performed these steps. I currently only have 2003, so I used my X MR2 CHookWizard.vsz file.

 

So I followed the instructions, but the scripts and templates folders were from the old version, and the rest of sdk contents are for X2.

Link to comment
Share on other sites

M. Harnad. I now have VS2005. I have copied the CHookWizard.vsz file that came with my X2 SDK into VCvcprojects along with the icon. When I try to create the project it gives me this error:

 

"Class not registered.

Looking for object with CLSID: {AC9539BE-66BE-47D8-ADBF-25490263CAF7}."

 

This number is the same number that is in the CHookWizard.vsz file that I just placed into VCvcprojects. Is there maybe a different location for this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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...