Hello.
I use Visual C++ 2003, with MFC application and OCC 5.2, and I want to upgrade to OCC 6.3 but I can't compile this source with OCC 6.3.
Here is the source:
void draw_solidblock_3d(Handle_V3d_View view,
Standard_Real *points,
unsigned long color,
unsigned int width,
Standard_Integer m_drawingMode)
{
HPEN m_drawingPen, hPenOld;
if (!view)
return;
Handle(WNT_Window) NTWindow = Handle(WNT_Window)::DownCast(view->Window());
HWND hWindow = ( HWND )NTWindow -> HWindow();
HDC hDC = GetDC (hWindow);
int oldDrawingMode = SetROP2(hDC, m_drawingMode);
m_drawingPen = CreatePen(PS_SOLID, width, color);
hPenOld = (HPEN) SelectObject(hDC, m_drawingPen);
SelectObject(hDC, hPenOld);
SetROP2(hDC, oldDrawingMode);
DeleteObject(m_drawingPen);
ReleaseDC(hWindow, hDC);
}
I don't know what is the problem because if I change the CASROOT from OCC5.2 to OCC6.3 I can't compile this fragment, it came with the following errors:
drawers\3Dsolid.cpp(32) : error C3861: 'GetDC': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(34) : error C3861: 'SetROP2': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(35) : error C2065: 'PS_SOLID' : undeclared identifier
drawers\3Dsolid.cpp(35) : error C3861: 'CreatePen': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(36) : error C3861: 'SelectObject': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(39) : error C3861: 'SelectObject': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(40) : error C3861: 'SetROP2': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(41) : error C3861: 'DeleteObject': identifier not found, even with argument-dependent lookup
drawers\3Dsolid.cpp(43) : error C3861: 'ReleaseDC': identifier not found, even with argument-dependent lookup
Best regards. Sandor.