New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

Compatibility problem of IDAutomationLinear5 ocx with Visual Studio 2010


Hello,

I have to update an older application developed with VS6 with MFC that uses IDAutomationLinear5.ocx. The same application compiled with VS2010 cannot run. I get an error getting a pointer to the OCX control inserted in a Dialog window. I get a NULL pointer in:

CBarCode *pBarCode=(CBarCode*)GetDlgItem(IDC_BARCODE);

instruction.

Was there a compatibility problem?

Operating System: WIN7 / 64

10-04-12     11.9 year(s) ago    

  Report Abuse

 

Ben

Best Answer

We do not have any examples for VS2010. What barcode type do you need to create? We do have an alternative product and tool that would work--the C++ Header file (font encoder). It includes functions for several barcode types. It will be different than the ActiveX in that the header file just encodes your data and you will need a barcode font (the barcode type that you are attempting to create).

Posted 11.9 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (5)
Hello,

Thanks for the answer,

Actually, I use :
- SymbologyID=CODE128
- charset=AUTO
- EANUPCSupplement=NO
- AddCheckDigit=YES
- UPCESystem=System0

I will check this implementation.

Posted 11.9 year(s) ago

(0)
(0)
   Report Abuse
Hi Ben,

I think I cannot use the .NET form control because it seems to be used with the .NET application.
My application was developed with C++ and MFC.

I think I can try to use the "OCX as a DLL". I have only to print a linear Bar Code and I think I can use this method but I haven't seen any example for printing with C++.
The example in C++ that I have downloaded from the site doesn't work.

Have you any working example(vs20010) of it?

I haven't understood the use of the DLL(interface IBarCode) as described in the readme3.txt.

I Insert here the lines of description from Readme3.txt for quick use.

---------------------------------------------------------------------------------------------------------------------------
Adding the ability to use IDAutomationPDF417e.dll 's font Encoder in an MFC 7.0 application

Step 1 (Preparation of project)
- Start Classwizard, go to the tab 'Active X Events'
- Push the button 'Add Class' and choose 'From a type library...'
- Now select the DLL containing your Active-X
(e.g. C:WinntSystem32IDAutomationPDF417e.dll. Other controls will be IDAutomationMaxicode5.dll, IDAutomationLinear5.dll, or IDAutomationDMATRIX6.DLL)
- And press OK
- This will generate 2 files: CPDF.h/cpp
CIBarCOdeEvents.cpp/h contains the com-interface IBarCode
to your Active-X control.

Step 2 (Create the ActiveX-control)
- To use the class, call CoInitialize, this is the MFC COM
initialization.
HRESULT l_Initialize = CoInitialize ( NULL );
if ( l_Initialize != S_OK )
TRACE ( "CoInitialize Errorn" );
- Create the com-class wrapper and link it with the Active-X
IBarCode *l_BarCode = new IBarCode ();
if ( !l_BarCode->CreateDispatch ( "IDAuto.PDF417.1" ) )
TRACE ( "Could not start IDAutomation ActiveX (IDAuto.PDF417.1) !n" );
//Please note that the above parameters will be changed based on the ActiveX control being used. They will
//be "IDAuto.Maxicode.1", "IDAuto.Barcode", "IDAuto.DataMatrix", respectively.
Step 3 (The Control (IBarCode) can be used now)
- Use the interface
l_BarCode->FontEncode(strStringToEncode,0, 0, 0, 0, 0, 0, &TheBstr);

Step 4 Don't forget to set the output text box to the font you wish to use
-----------------------------------------------------------------------------------------------------------

Posted 11.9 year(s) ago

(0)
(0)
   Report Abuse
You are probably going to want to use the .NET Forms Control in Visual Studio .NET because it is better suited.

Posted 11.9 year(s) ago

(0)
(0)
   Report Abuse
Hello Ben,

I have downloaded the last version, I have uninstalled the old version, and install the new one.
In the project, I get the "BarCodeControl" with the "Demo" string inside.
The first problem I can see is that the OCXControl cannot be hidden with the "Visibile=false" property.
The old ocx has the same behavior as VS2010.
I am using VC++ with MFC.
I have created a new project. A Dialog application.
I have inserted the OCX in the dialog by "Insert OCX Control"
I have created the CBarCode.h/CBarCode.h class file by "Class wizard/add class7From type library
In the event of OK button, I try to get the pointer to the Ocx control by
CBarCode *pBarCode=(CBarCode*)GetDlgItem(IDC_BARCODE);
Running the application I get a NULL pointer for pBarCode.

Is this control usable with VC 2010?

Posted 11.9 year(s) ago

(0)
(0)
   Report Abuse
You are using an outdated version of the ActiveX Control. You may want to use the latest version--you can test it by downloading the demo.

If this resolves the problem, to receive the latest version, purchase the Priority Support and Upgrade Subscription.

If you are writing your application for .NET, then you should consider using the .NET Forms Control.

Posted 11.9 year(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook