For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

wxWidgets Viewer window gets painted over continously

John Bijnens's picture

I'm trying to get an example I found on this forum to work.
The code was quite old so I tried to adapt it to the current version OpenCascade 7.3.0.
It uses wxWidgets 3.1.0 which I want to use instead of Qt because of the licensing.

The problem that I have is that the code compiles with no errors (using VisualStudio 2015 on Windows 7 64-bit) but when it is run you can see the desired output in a flash and then it is painted over. This painting over is something I'm unable to resolve.

Any help/hint/... that can point me into the right direction is much appreciated.

The complete source code is attached to this posting.
STEPViewer_Frame.cpp : the GUI generated with wxFormBuilder
STEPViewer.cpp ; my own code based on the code I found on this forum

Kirill Gavrilov's picture

I would say that since toolkit provides dedicated class wxGLCanvas for OpenGL, it sounds reasonable first trying to embed OCCT 3D Viewer into this wxGLCanvas (basing on provided OpenGL samples).
In your code I don't see any overriding of OnPaint() or similar event (which should be redirected to V3d_View::Redraw() or similar),
so that it looks quite expected that wxWidgets overwrites window content (fills with gradient, etc.) at some step.

John Bijnens's picture

Thank you so much for your advice.
That was something I had overlooked.
I've now changed the code of STEPViewer.cpp based on another code sample I found on this forum.
It works now completely as expected. Now my real work can start :)
The code is attached to this posting so it can be of use to others.

Yongjun Zhou's picture

Hi, I am a newbie and try to learn how to use OCCT here. I have downloaded this example and compiled with VC2015 with no error. However, when I tried to run the executable, I got the following error message:

The procedure entry point FT_New_face could not be located in the dynamic link library C:SDK\OCC\OCCT-7.3.0\win64\vc14\bin\TKService.dll.

I have tried to add OCCT and 3rd party bin folders into path library. Also I tried to use Dependency walker to find the problem without success. 

Any help/hint? I really appreciate any advice to the right direction.

Kirill Gavrilov's picture

I have tried to add OCCT and 3rd party bin folders into path library.

Have you specified a proper version (compatible with your Visual Studio compiler) of 3rd-party libraries?

Yongjun Zhou's picture

Thanks for the help. I found the problem. 3rd party library freetype which I downloaded from website does not work. I recompiled one and now it works.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.