Notifications
Clear all

[Closed] Error using ParamBlock2-based parameter rollouts [C++]

I’m working on implementing a new camera type through the Max SDK. I’m doing this by creating a new class that inherits from GenCamera and I have run into a problem when creating a rollout to let users edit the camera parameters.

The way I’m trying to create the rollout is to just call ClassDesc2::BeginEditParams and ClassDesc2::EndEditParams from my camera’s BeginEditParams and EndEditParams functions. This ClassDesc2 has just one ParamBlockDesc2 registered with it that is configured with P_AUTO_UI. I’ve included the relevant bits of code in this paste: https://pastebin.com/H77hTcAT

In that example IDD_PANEL_CAM_PANO_PARAM is the resource identifier for a simple blank pane with the correct width for command panel rollouts.

The problem I’m having is that when I use my camera object like this I get the following showing up in max instead of the empty rollout (titled “test panel”) I expect:

It looks like Max is trying to let me know that something is quite wrong, but I can’t find any other error messages or any indication as to what specifically the problem is. Anyone know what might be causing my trouble here? I had some trouble searching as the string “>>> @!&*# <<<” doesn’t produce any worthwhile results on google.

1 Reply

Found the cause of this. It seems that the problem was my ClassDesc2 didn’t implement the function HInstance(), which is required for these rollouts to work. I just added that and made it return the dll’s hinstance and everything works.