Jump to content
Software FX Community

Re: Question about creating chart using CreateWnd


User (Legacy)

Recommended Posts

Thanks again for the help frank, just wanted to let people know what helped: 

I was calling both the ocx and dll in my program (BAD.... ;-)

here was the code that worked:

// Stdafx.h

#import "sfxbar.dll" no_namespace no_implementation

#import "Cfx4032.dll" no_namespace no_implementation

// Stdafx.cpp

#import "sfxbar.dll" no_namespace implementation_only

#import "Cfx4032.dll" no_namespace implementation_only

//RealTime.cpp

IClassFactory2 *pFactory2;

LPUNKNOWN pUnk;

HRESULT hr;

if (SUCCEEDED(hr = CoGetClassObject(__uuidof(ChartFX),

CLSCTX_INPROC_SERVER,

NULL,

IID_IClassFactory2,

(LPVOID FAR *) &pFactory2)))

{

hr = pFactory2->CreateInstanceLic(

NULL,

NULL,

IID_IUnknown,

license,

(LPVOID FAR *) &pUnk);

if (SUCCEEDED(hr))

{

m_pChartFX = pUnk;

pUnk->Release();

}

m_pChartFX->CreateWnd((long)this->m_hWnd, IDC_CHART1,

rc.left,

rc.top - 5,

(rc.right- rc.left), (rc.bottom - rc.top), WS_CHILD | WS_VISIBLE);

m_hwndChartFX = (HWND)m_pChartFX->hWnd;

Francisco Padron <frankp@softwarefx.com> wrote in message news:DE0379D14694D211B4CE00609770710D0390DA@sftfx-221.wamnet.net...

> Please call our Tech support number so that we can help you with this.

>

> Frank

> SFX

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...