MFC视图类中用不了OpenDocumentFile解决思路

MFC视图类中用不了OpenDocumentFile
在下初学MFC的小虾一只
想自己另外写一个用文件过滤器打开图像文件的程序image
于是把CImageApp中的ON_COMMAND(ID_FILE_OPEN, &CWinAppEx::OnFileOpen)注释掉
在视图类中添加“打开文件”的消息相应程序
代码如下:
void CImageView::OnFileOpen()
{
// TODO:  在此添加命令处理程序代码
wchar_t filters[] =
L"图像文件(*.bmp;*.gif;*.jpg;*.png;*.tif)\
 |*.bmp;*.gif;*.jpg;*.png;*.tif|位图文件(*.bmp)|*.bmp|\
 图形交换格式文件(*.gif)|*.gif|联合图象专家组[JPEG]文件(*.jpg)\
 |*.jpg|可移植网络图形文件(*.png)|*.png|标记图像文件格式[TIFF]文件\
 (*.tif) |*.tif|所有文件(*.*)|*.*||";
CFileDialog fileDlg(TRUE, NULL, NULL,OFN_HIDEREADONLY, filters);
if(fileDlg.DoModal()==IDOK)
                OpenDocumentFile(fileDlg.GetPathName());
}
但是在vs2012和vs2013中都报错:
Error:未定义标识符“OpenDocumentFile”

视图类中的头文件有:
#include "stdafx.h"
#include "Image.h"
#include "afxwinappex.h"
#include "afxdialogex.h"
#include "ImageDoc.h"
#include "ImageView.h"
#include "MainFrm.h"

在下百思不得其解,小小问题,望各位大牛指点一二MFC视图类中用不了OpenDocumentFile解决思路
#include "Resource.h"
MFC VS OpenDocumentFile

------解决方案--------------------
CWinApp::OpenDocumentFile(FileName)

extern CYourApp theApp;

theApp.OpenDocumentFile(FileName)
------解决方案--------------------
不是 “应该包含的头文件”

因为 OpenDocumentFile(FileName) 这个函数是 CImageApp 的, 所以 要 取得 这个 类实例, 也 就是 

theApp。

所以 View 中 要 :
extern CImageApp theApp;