In my MDI application I have a certain function that needs to be called whenever a document is opened AND whenever the user switches from one already opened document window to a different already opened document window. Is there a single message handler that will cover both opening a document and switching doc windows???

If not, OnOpenDocument should cover the open doc case, what would be the handler that would cover the switching windows case???