The class that you are probably looking for is MxDocument:
- Get IApplication
- From IApplication call get_Document to get IDocument
- Call AtlAdvise to subscribe to the document events
If the above is not sufficient information then I'd suggest to install and dig through the C++ samples associated with the ArcObjects SDK.
In general, programming in C# would be easier but your post indicated that you wanted to use C++.
Best of luck!
The question is how to Call AtlAdvise to subscribe to the document events. For IActiveviewEvents, we can use CLSID_ActiveViewEventsListener, but for IDocumentEvents, what is the Listener?