I figured out how to do this... In case anyone else has had this problem this is how I did it:
Code:
CMasmEditDoc *openedDoc = NULL;
// find the view with our target filename
POSITION pos = AfxGetApp()->GetFirstDocTemplatePosition();
while (pos != NULL && openedDoc == NULL) {
CDocTemplate *doc = AfxGetApp()->GetNextDocTemplate(pos);
POSITION docpos = doc->GetFirstDocPosition();
while (docpos != NULL) {
CDocument *richDoc = doc->GetNextDoc(docpos);
if (richDoc != NULL)
if (_tcsicmp(richDoc->GetPathName(), src) == 0) {
openedDoc = (CMasmEditDoc*)richDoc;
break;
}
}
}