mapping plugin functionality

On 06/08/2013 at 02:47, xxxxxxxx wrote:

[USERFORM][p]User Information:[/p]Cinema 4D Version:   R13.061 
Platform:      
Language(s) :       
[p]---------[/p][/USERFORM] Is there a way to map the functionality of a command plugin on the close button (X button) on the corner of the Cinema4D window?