Hi,
I developed a MFC application to use an activeX control. The ocx file is used for barcode reader in a device.
when I add the ocx in my application, two different classes are added to my project.
Here is some codes in my .cpp file for class 1:
...
1) Barcode barcode;
2) barcode.Create(_T("STATIC"), _T("Hi"), WS_CHILD | WS_VISIBLE, CRect(0, 0, 20, 20), this, 1234);
...
When I run the application, an error comes up at line 2.
here is the detail of error:
First-chance exception at 0x7c812aeb in TestBCR.exe: Microsoft C++ exception: COleException at memory location 0x0012f0f0.
This error related to a function named AtlTraceVA.
inline void __cdecl CTrace::TraceV(const char *pszFileName, int nLine,
DWORD_PTR dwCategory, UINT nLevel, LPCSTR pszFmt, va_list args) const
{
AtlTraceVA(m_dwModule, pszFileName, nLine, dwCategory, nLevel, pszFmt, args);
}
Can someone help me?
Thanks in advance
Ahrost