Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Visual C++ Example for Aztec Encoder SDK/LIB

Visual C++ Example for Aztec Encoder SDK/LIB 4 years 2 months ago #3896

#define ENC_NORMAL 0
#define ENC_BINARY 1

#define CONFIGURATION_ANY 0
#define CONFIGURATION_COMPACT 1
#define CONFIGURATION_FULL 2

#define CONFIGURATION_AUTO -1
#define CONFIGURATION_15X15_COMPACT 0
#define CONFIGURATION_19X19 = 1
#define CONFIGURATION_19X19_COMPACT 2
#define CONFIGURATION_23X23 3
#define CONFIGURATION_23X23_COMPACT 4
#define CONFIGURATION_27X27 5
#define CONFIGURATION_27X27_COMPACT 6
#define CONFIGURATION_31X31 7
#define CONFIGURATION_37X37 8
#define CONFIGURATION_41X41 9
#define CONFIGURATION_45X45 10
#define CONFIGURATION_49X49 11
#define CONFIGURATION_53X53 12
#define CONFIGURATION_57X57 13
#define CONFIGURATION_61X61 14
#define CONFIGURATION_67X67 15
#define CONFIGURATION_71X71 16
#define CONFIGURATION_75X75 17
#define CONFIGURATION_79X79 18
#define CONFIGURATION_83X83 19
#define CONFIGURATION_87X87 20
#define CONFIGURATION_91X91 21
#define CONFIGURATION_95X95 22
#define CONFIGURATION_101X101 23
#define CONFIGURATION_105X105 24
#define CONFIGURATION_109X109 25
#define CONFIGURATION_113X113 26
#define CONFIGURATION_117X117 27
#define CONFIGURATION_121X121 28
#define CONFIGURATION_125X125 29
#define CONFIGURATION_131X131 30
#define CONFIGURATION_135X135 31
#define CONFIGURATION_139X139 32
#define CONFIGURATION_143X143 33
#define CONFIGURATION_147X147 34
#define CONFIGURATION_151X151 35

typedef struct _tagAZTECCONTEXT
{
int nEncodeMode;
int nCorrectionLevel;
int nConfigType;
int nConfiguration;
int nRune;
int nPixelSize;
int nMargin;
int nStructuredAppendCounter;
int nStructuredAppendIndex;
int nDataSize;
BOOL bProcessTilde;
BOOL bStructuredAppend;
COLORREF clForeColor;
COLORREF clBackColor;
char *pFileID;
char cEncodedData[3750];
}_AZTECCONTEXT;


void CAztecVc6TestDlg::OnEncode()
{
_AZTECCONTEXT tAztecCtx;

_InitAztecContext(&tAztecCtx);

tAztecCtx.nConfigType = m_ConfigType.GetCurSel();
tAztecCtx.nCorrectionLevel = m_Level.GetCurSel()+1;
tAztecCtx.nEncodeMode = m_EncodeMode.GetCurSel();

tAztecCtx.nStructuredAppendIndex = m_nAppendIndex;
tAztecCtx.nStructuredAppendCounter = m_nAppendCounter;
tAztecCtx.bStructuredAppend = (m_StruAppend.GetCheck() == BST_CHECKED );
tAztecCtx.bProcessTilde = (m_ProcTilde.GetCheck()== BST_CHECKED);

tAztecCtx.nMargin = m_nMargin;
tAztecCtx.nPixelSize = m_nModuleSize;
tAztecCtx.clBackColor = m_BackColor.GetColor();
tAztecCtx.clForeColor = m_ForeColor.GetColor();
if (m_strText != "") memcpy(tAztecCtx.cEncodedData,m_strText.GetBuffer(0),m_strText.GetLength());

_FreeAztecContext();
hbmp =_AztecEncode2Bitmap(&tAztecCtx);
Invalidate();
}
The administrator has disabled public write access.

  • Posts:59
  • developer's Avatar
  • developer
  • Moderator
  • OFFLINE
  • Karma: 1
  • Page:
  • 1
Time to create page: 0.159 seconds
Powered by Kunena Forum :: Wibi