Lazarus Posted April 1, 2015 Share Posted April 1, 2015 // // function will now recurse back into here if loading a script! (*.mvs) // BOOL CModViewDoc::OnOpenDocument(LPCTSTR lpszPathName) { string str = LengthenFilenameW95W98(lpszPathName); if (str.empty()) // if it was empty, then arg didn't eval to a filename (eg "#startminimized"), so return original { str = lpszPathName; } lpszPathName = str.c_str(); if (strstr(lpszPathName,"#startminimized")) { extern bool gbStartMinimized; gbStartMinimized = true; OnNewDocument(); // None of this shit works, because whatever you set the current document to MS override it with a derived name, // and since the CWinApp class can't even ask what it's own fucking document pointer is without doing a hundred // lines of shit deep within MFC then I'm going to fuck the whole lot off by storing a pointer which I can then // use later in the CWinApp class to override the doc name. // // All this fucking bollocks was because MS insist on doing their own switch-comparing so I can't pass in 'real' // switches, I have to use this '#' crap. Stupid fucking incompetent MS dickheads. Like how hard would it be to // pass command line switches to the app instead of just filenames? // strLastRealDocName = "Untitled"; SetPathName(strLastRealDocName, false); // I shouldn't have to do this, but MFC doesn't do it for some reason SetTitle(strLastRealDocName); gpLastOpenedModViewDoc = this; return true; } I was working my way through a little coding from modview, since I tried to understand some of the principles (have nothing to do usefull i guess) and I bumped into line 129 and I was like .. wut? Link to comment
eezstreet Posted April 1, 2015 Share Posted April 1, 2015 I see you found Ste's rant. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now