I think mainframe's PreCreateWindow(CREATESTRUCT& cs) virtual function is best place to positioned your application window.