I have a problem When I Display a 3D object.

hi all:
When display a 3D object, the Window always has a black region in the right and bottom direction.when I change the background color, the region color is not changed and black. every time I start a new window,the black region is changed and sometime small and sometime big. why?
When I display a 2D object in v2d_view, I change the background color , no problem.

DU's picture

Hi,

you can modify the wizard code in View generated by OCC.
e.g.
////////////////////// By Dsjian appended in 06.03.02
CFrameWnd* pParentFrm = GetParentFrame();
pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED);
/////////////////////////////////////////////////////////////////////////////////

/* // MODIF for ususal bug in graphic card : first redraw is not done
Standard_Integer w=100, h=100;
aWNTWindow->Size(w,h);
::PostMessage ( GetSafeHwnd (), WM_SIZE, SIZE_RESTORED , w + h*65536);
//====================================================================

I think, your problem can be solved!

xazdw's picture

I put "CFrameWnd* pParentFrm = GetParentFrame();
pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED);"
in the Cdrawview::OnInitialUpdate( ) function.

when the first Start a application, the first window still has a black region in the right and bottom. but
close the first window, new a window; then there is no problem. I try many times

xazdw's picture

I put "CFrameWnd* pParentFrm = GetParentFrame();
pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED);"
in the Cdrawview::OnInitialUpdate( ) function.

when the first Start a application, the first window still has a black region in the right and bottom. but
close the first window, new a window; then there is no problem. I try many times