Jump to content
Software FX Community

trap ChartFX DLL event


User (Legacy)

Recommended Posts

About trapping Chart FX DLL event:

I met ICfxEvents : base class undefined error. In my CfxEvent.h file, I

define a CCfxEvent class as follows:

#ifndef __AFXWIN_H__

#error include 'stdafx.h' before including this file for PCH

#endif

#include "resource.h" // main symbols

class CCfxEvents : public ICfxEvents

{ ...

}

I already imported sfxbar.dll and cfx4032.dll in the stdafx.h and stdafx.cpp

file.

How to fix the undefined error?

Link to comment
Share on other sites

remember to add path for the CfxEvents.h. eg.

#include "C:\Program Files\ChartFX Client Server\Include\CfxEvents.h "

"Danqing" <dhu@chemimage.com> wrote in message

news:g3alTnJtBHA.1412@webserver1.softwarefx.com...

> About trapping Chart FX DLL event:

>

> I met ICfxEvents : base class undefined error. In my CfxEvent.h file, I

> define a CCfxEvent class as follows:

> #ifndef __AFXWIN_H__

> #error include 'stdafx.h' before including this file for PCH

> #endif

>

> #include "resource.h" // main symbols

>

> class CCfxEvents : public ICfxEvents

> { ...

>

> }

>

> I already imported sfxbar.dll and cfx4032.dll in the stdafx.h and

stdafx.cpp

> file.

> How to fix the undefined error?

>

>

>

>

>

Link to comment
Share on other sites

Another error I met as follows:

error LNK2001: unresolved external symbol _IID_ICfxEvents

Is there anybody can help me to figure out what wrong?

Thanks,

"Danqing" <dhu@chemimage.com> wrote in message

news:g3alTnJtBHA.1412@webserver1.softwarefx.com...

> About trapping Chart FX DLL event:

>

> I met ICfxEvents : base class undefined error. In my CfxEvent.h file, I

> define a CCfxEvent class as follows:

> #ifndef __AFXWIN_H__

> #error include 'stdafx.h' before including this file for PCH

> #endif

>

> #include "resource.h" // main symbols

>

> class CCfxEvents : public ICfxEvents

> { ...

>

> }

>

> I already imported sfxbar.dll and cfx4032.dll in the stdafx.h and

stdafx.cpp

> file.

> How to fix the undefined error?

>

>

>

>

>

Link to comment
Share on other sites

CfxEvents.h uses:

DEFINE_GUID(IID_ICfxEvents, 0x7588a6a0, 0xc7e7, 0x11d1, 0x89, 0x7e, 0x0,

0xaa, 0x0, 0xbd, 0x9, 0x1c);

Check out MSDN Article

Q130869

HOWTO: Avoid Error LNK2001 Unresolved External Using DEFINE_GUID

It will explain you why this error happens and how to fix it by including

the header file containing the IID in two different ways.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

I just want to pop up my own dialog box when user double click the left

mouse button. But the following code doesn't work.

STDMETHODIMP CCfxEvents::Fire_LButtonDblClk(THIS_ int x,int y,long

nSerie,long nPoint)

{

CCDblDialog pDlg;

pDlg.DoModal();

return S_OK;

}

If I use a message box instead, then it works well. I was wondering why the dialog box can't be displayed. How to deal with this problem?

Thanks.

"Danqing" <dhu@chemimage.com> wrote in message news:g3alTnJtBHA.1412@webserver1.softwarefx.com...

> About trapping Chart FX DLL event:

>

> I met ICfxEvents : base class undefined error. In my CfxEvent.h file, I

> define a CCfxEvent class as follows:

> #ifndef __AFXWIN_H__

> #error include 'stdafx.h' before including this file for PCH

> #endif

>

> #include "resource.h" // main symbols

>

> class CCfxEvents : public ICfxEvents

> { ...

>

> }

>

> I already imported sfxbar.dll and cfx4032.dll in the stdafx.h and stdafx.cpp

> file.

> How to fix the undefined error?

>

>

>

>

>

Link to comment
Share on other sites

I tested the dialog using the same code but from somewhere else. It works

fine.

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:GGC$QGWtBHA.1412@webserver1.softwarefx.com...

> I don't see the difference between MessageBox and a Modal Dialog.

>

> Have you tested calling this dialog from somewhere else using the same

code

> ?

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...