I have a class with base class CFrameWnd. I need to have access to the activedocument as soon as the dialog box starts without any user input. I've tried accessing it from oncreate functions but because the activedocument isn't created yet, the pointer is to nothing. Are there any functions in the CFrameWnd I can override to have access to the activedocument? I hope this makes sense. This is the first time I've done something like this, any help is appreciated. Thank you so much.