Some controls may need to be processed by the developer directly. For example the sphere has a 'Create' button in the 'Keyboard Entry' rollup. Button controls are not processed by parameter maps. In order to process the messages sent when the user operates the button, the developer needs to derive a class from ParamMapUserDlgProc and set it as the parameter map's user using SetUserDialogProc().
class SphereTypeInDlgProc : public ParamMapUserDlgProc { public: SphereObject *so; SphereTypeInDlgProc(SphereObject *s) {so=s;} BOOL DlgProc(TimeValue t,IParamMap *map, HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam); void DeleteThis() {delete this;} };
The IParamMap::SetUserDlgProc() method is then used to set the callback to handle the messages. Note that the callback is called after the default processing is complete.
pmapTypeIn->SetUserDlgProc(new SphereTypeInDlgProc(this));