If you know what you need MSDN is the best place to find class definitions, etc.
The beauty (or some would say the bane) of .NET is that you don't have to do anything when the user clicks the X, all of that is taken care of. Now if you want something to happen when you click the X (besides the program exiting) you have to add some code to the event handler. With the Form1.h [Design] tab selected, click on your form, go over to the properties pane on the right side of the VC++ window, click on the lightning bolt, scroll down to form closing and double click the cell right next to it. That will place the even handler in your code. Check out http://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx for the specifics.
Any references you find with code for .NET that are in C# can be translated to C++, knowing that in C# the . operator serves as both namespace separator and as method invocation.