Notifications
Clear all

[Closed] 3dsmax.exe not ending when using a ParamMap2UserDlgProc

I’m trying to set up a ParamMap2UserDlgProc to handle some things for a plugin material I’m working on.

To do this, I created a subclass of ParamMap2UserDlgProc and passed a pointer to an instance of that class in to the ParamBlockDesc2 constructor for my material plugin. The DlgProc is called as I expect and everything seems to work right while max is running.

The problem I’m seeing with this is that upon exiting Max, 3dsmax.exe continues running and must be killed through the task manager.

To test this I’ve kept the ParamMap2UserDlgProc as simple as possible. The only two functions implemented are DlgProc which always returns FALSE and DeleteThis which does what it says.

Has anyone seen this sort of problem before? Do I need to add something to my DlgProc so it can clean itself up properly?

1 Reply

So I still haven’t solved this, but I have a workaround for now.

I only see this problem when attempting to attach a UserDlgProc to an interface rollup made with P_AUTO_UI in a ParamBlock2Desc. To solve this, I just split my interface into two rollups, one with P_AUTO_UI and no DlgProc, and another made through IMtlParams::AddRollup with a normal DlgProc.