[ODE] toolbar in win32

Alex Holkner xander at yifan.net
Wed May 29 00:12:02 2002


> i am trying to make a tollbar appear for my robot
> simulator. however i am not familiar with how i can
> attach one to a program i created with ode.  i am only
> familiar with adding toolbars in an sdi or mdi
> application using visual c++.  is this possible and
> how would i be able to do it?  where do i put the code
> for the toolbar creation and stuff.

You use the win32 API directly to create the toolbar, as ODE does not make
use of the MFC wrapper (MFC itself calls the windows API, so you are just
sidestepping it).   In particular you should look at the CreateToolbarEx
function (documented in the Platform SDK).  Call this function in
drawstuff's dsPlatformSimLoop function (circa line 375 in
ode/drawstuff/src/windows.cpp).

However this is a kludge and as Anselm points out you really should develop
your own framework.  You might like to use MFC for this if you are familiar
with it.  In developing your own framework you can just follow the example
of drawstuff to show the 3D view using OpenGL, or you might prefer to use
the Microsoft alternative of DirectX - both will work just fine.

-Alex.