Starting with OCC - drawing images

Hi all
I'm beginner in OCC, so on start i got a problem :), i've searched solution on the forum, but didn't find an answer. I'm trying to display 2D image, but not as 3D texture, just simple bitmap (like from MFC samples). My starting code looks like that:
This is constructor of window:

h_viewer = new V2d_Viewer( CMDData::graphic_device, (short*) "Visu2D" );
h_window = new WNT_Window( CMDData::graphic_device, (HWND*) this->GetHandle() );
h_driver = new WNT_WDriver( h_window );
h_view = new V2d_View( h_driver, h_viewer, 0, 0, 50 );
ais_interactive_context_2d = new AIS2D_InteractiveContext( h_viewer );

p_occ_bmp = new CProjectBitmap();
ais_interactive_context_2d->Display( p_occ_bmp, Standard_False );

where CProjectBitmap:

class CMDProjectOCCBitmap : public AIS2D_InteractiveObject
{
// ...
};

void CMDProjectOCCBitmap::SetContext(const Handle(AIS2D_InteractiveContext)& theContext)
{
AIS2D_InteractiveObject::SetContext( theContext );
Graphic2d_GraphicObject::SetView( theContext->CurrentViewer()->View() );

OSD_Path path( "C:\\private\\petitsobj.gif" );
OSD_File file( path );
OSD_Protection prot;

file.Open( OSD_ReadOnly, prot );
Standard_Boolean a = file.IsOpen();
Standard_Integer b = file.Size();

Handle(Graphic2d_ImageFile) aGraphic2dImageFile = new Graphic2d_ImageFile(
this,
file,
0.0f,
0.0f,
0.0f,
0.0f,
Aspect_CP_Center,
1.0f );

}

Of course nothing is displayed on the screen :/. Whole app uses wxWidgets as window framework, but this is not a problem. Is anybody could see a issue, which causes that image is not displayed on the screen?

directx11's picture

Maybe for somebody information will be helpfull - in my application problem was lack of call for h_view->MustBeResized( V2d_TOWRE_ENLARGE_OBJECTS ); (h_view is V2d_View) in handler for window size change. On start window has just not proper size - so after that everything works OK