Jump to content
Software FX Community

Problem getting DC in Visual C++ 6.0


User (Legacy)

Recommended Posts

Hello, I have been having a problem trying to get a device context of a 

chartfx object. I am using VC++ 6.0.

The following code is what I put in:

HDC hDevice;

hDevice = m_pChartFX->PaintInfo(CPI_GETDC);

Once I set this in, I get a "error C2679: binary '=' : no operator defined

which takes a right-hand operand of type 'class _variant_t' (or there is no

acceptable conversion)" error.

Am I doing something wrong here? This seems to be the process that the

example uses...

Thank you for your help!

--

Joshua Eanes

PS. I have also tried using PaintInfo2. For example, the following code:

HDC hDevice;

_variant_t hmel;

m_pChartFX->PaintInfo2(CPI_GETDC, hmel, hDevice);

Gives me a "error C2664: 'PaintInfo2' : cannot convert parameter 3 from

'struct HDC__ *' to 'struct tagVARIANT *'

Types pointed to are unrelated; conversion requires

reinterpret_cast, C-style cast or function-style cast" error.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...