20 if (pdoc==NULL)
return false;
21 if (pfrm==NULL)
return false;
22 if (pviw==NULL)
return false;
45 bool rslt =
SetExLink(pdoc, pfrm, pviw, papp);
48 DEBUG_ERROR(
"jbxwl::CreateDocFrmView(): ERROR: Document is NULL\n");
52 DEBUG_ERROR(
"jbxwl::CreateDocFrmView(): ERROR: View is NULL\n");
56 DEBUG_ERROR(
"jbxwl::CreateDocFrmView(): ERROR: Frame is NULL\n");
84 if (!rslt)
return FALSE;
101 if (pfrm ==NULL)
return 1;
118 pfrm->ShowWindow(SW_SHOW);
120 pfrm->
pView->SetFocus();
124 if (title.IsEmpty()) {
126 pfrm->
pDoc->
Title = _T(
"Temporary Blank");
131 if (pfrm->
Title.IsEmpty()) pfrm->
Title = title;
135 pfrm->
pDoc->SetTitle(title);
136 pfrm->SetTitle(title);
137 pfrm->SetWindowText(title);
152 int err_flag =
false;
174 if (err_flag) MessageBox(hwnd, mesg, NULL, MB_OK);
189 int ret, color = GRAPH_COLOR_MONO;
190 BOOL hasReadData = FALSE;
191 BOOL hasViewData = FALSE;
197 hWnd = prntFrm->m_hWnd;
198 prntDoc = prntFrm->
pDoc;
202 if (pmsGraph!=NULL) {
203 if (!pmsGraph->isNull()) hasReadData = TRUE;
205 if (pcmnHead!=NULL) {
206 if (!pcmnHead->isNull()) hasViewData = TRUE;
223 else if (hasReadData) {
240 if (fname.IsEmpty())
return -1;
277 bzero(fn,
sizeof(fn));
278 bzero(&ofn,
sizeof(ofn));
280 ofn.lStructSize =
sizeof(ofn);
281 ofn.hwndOwner = hWnd;
282 ofn.Flags = OFN_HIDEREADONLY;
284 ofn.nMaxFile =
sizeof(fn) /
sizeof(fn[0]);
285 if (title != NULL) ofn.lpstrTitle = title;
287 GetOpenFileName(&ofn);
323 bzero(fn,
sizeof(fn));
324 bzero(&ofn,
sizeof(ofn));
326 ofn.lStructSize =
sizeof(ofn);
327 ofn.hwndOwner = hWnd;
331 ofn.nMaxFile =
sizeof(fn) /
sizeof(fn[0]);
332 ofn.lpstrDefExt = extnt;
333 if (title != NULL) ofn.lpstrTitle = title;
335 GetSaveFileName(&ofn);
359 CString str = _T(
"");
362 bzero(&bri,
sizeof(bri));
364 bri.hwndOwner = hWnd;
365 bri.lpszTitle = title;
366 bri.ulFlags = BIF_RETURNONLYFSDIRS;
369 bri.lParam = (LPARAM)folder;
371 pilst = SHBrowseForFolder(&bri);
373 SHGetPathFromIDList(pilst, fldr);
375 CoTaskMemFree(pilst);
389 if(uMsg==BFFM_INITIALIZED){
390 SendMessage(hwnd, BFFM_SETSELECTION, (WPARAM)TRUE, lpData);
#define MSG_DFV_FAIL_VIEW
#define MSG_DFV_UNVISIBLE
virtual BOOL OnNewDocument()
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName)
ExMSGraph< sWord > msGraph
CMultiDocTemplate * pTempl
virtual void OnInitialUpdate()
void SetTitle(LPCTSTR title)
CString EasyGetOpenFileName(LPCTSTR title=NULL, HWND hWnd=NULL)
int ExecDocFrmView(CExFrame *pfrm, LPCTSTR fname=NULL)
CString EasyGetSaveFileName(LPCTSTR title=NULL, LPCTSTR extnt=NULL, HWND hWnd=NULL)
CString get_file_name_t(LPCTSTR str)
BOOL InitialDocView(CExFrame *pfrm, LPCTSTR fname)
CExFrame * CreateDocFrmView(CMultiDocTemplate *pDocTemp, CAppCallBack *papp=NULL)
int ExecTemplate(CMultiDocTemplate *ptemp, ExMSGraph< sWord > *pmsGraph=NULL, ExCmnHead *pcmnHead=NULL, CExFrame *prntFrm=NULL, int vPoint=0)
bool SetExLink(CExDocument *pdoc, CExFrame *pfrm, CExView *pview, CAppCallBack *papp)
void ExecDocFrmViewError(HWND hwnd, int ret)
int CALLBACK EasyGetSaveFolderNameCallBack(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
CString EasyGetSaveFolderName(LPCTSTR folder=_T(""), LPCTSTR title=NULL, HWND hWnd=NULL)
#define IDS_STR_NULLPT_FRM
#define IDS_STR_CANCEL_OPRTN
#define IDS_STR_ERR_UNDISP
#define IDS_STR_ERR_OPEN_FILE
#define IDS_STR_ERR_PREDISP
#define IDS_STR_OPEN_FILE