Refresh a view
-
Hi I have an view opened in my MDI application. And, after a execution of a specific process, the file which is viewed is modified. I want to refresh the view. How do i do that. Can someone please help me on this. I thank in advance. Cheers Mughi
-
Hi I have an view opened in my MDI application. And, after a execution of a specific process, the file which is viewed is modified. I want to refresh the view. How do i do that. Can someone please help me on this. I thank in advance. Cheers Mughi
-
Hi I have an view opened in my MDI application. And, after a execution of a specific process, the file which is viewed is modified. I want to refresh the view. How do i do that. Can someone please help me on this. I thank in advance. Cheers Mughi
Hi U can call updateAllViews() which calls the update function which we have added. I do hope this may help you. Sujan
-
I have tried this. But still, its not working. Where exactly should i implement this UpdateAllviews(NULL); Sorry for the inconvenience. thanx mughi
-
Mughi wrote: Where exactly should i implement this UpdateAllviews(NULL); After finishing the process.
Work hard and a bit of luck is the key to success.
:)
Thats true. But my code flow is like this. All i have created is an MDI application of the following. class CComputeApp : public CWinApp class CComputeView : public CEditView class CComputeDoc : public CDocument 1. I haven't coded anything on File open / save / close. 2. Everything is taken care automatically. 3. Imagine a file named compute.txt is opened in my application. 4. And after that, I run a process (thats a different class) from CComputeApp. 5. And the process returns a string (contains the filename). 6. Using the string, i call CDocument* CComputeApp::OpenDocumentFile(LPCTSTR lpszFileName) to open the file. 7. The problem is, if the file is already opened, this OpenDocumentFile method doesn't call CComputeDoc::OnOpenDocument(LPCTSTR lpszPathName). 8. And so, the view is not updated. This is where my problem is. And thats why, i was curious about the place of code. Sorry for all the frustrations. And hope that, i would overcome this problem. Again, I thank in advance. thanx mughi
-
Hi U can call updateAllViews() which calls the update function which we have added. I do hope this may help you. Sujan
Thats true. But my code flow is like this. All i have created is an MDI application of the following. class CComputeApp : public CWinApp class CComputeView : public CEditView class CComputeDoc : public CDocument 1. I haven't coded anything on File open / save / close. 2. Everything is taken care automatically. 3. Imagine a file named compute.txt is opened in my application. 4. And after that, I run a process (thats a different class) from CComputeApp. 5. And the process returns a string (contains the filename). 6. Using the string, i call CDocument* CComputeApp::OpenDocumentFile(LPCTSTR lpszFileName) to open the file. 7. The problem is, if the file is already opened, this OpenDocumentFile method doesn't call CComputeDoc::OnOpenDocument(LPCTSTR lpszPathName). 8. And so, the view is not updated. This is where my problem is. And thats why, i was curious about the place of code. Sorry for all the frustrations. And hope that, i would overcome this problem. Again, I thank in advance. thanx mughi
-
Thats true. But my code flow is like this. All i have created is an MDI application of the following. class CComputeApp : public CWinApp class CComputeView : public CEditView class CComputeDoc : public CDocument 1. I haven't coded anything on File open / save / close. 2. Everything is taken care automatically. 3. Imagine a file named compute.txt is opened in my application. 4. And after that, I run a process (thats a different class) from CComputeApp. 5. And the process returns a string (contains the filename). 6. Using the string, i call CDocument* CComputeApp::OpenDocumentFile(LPCTSTR lpszFileName) to open the file. 7. The problem is, if the file is already opened, this OpenDocumentFile method doesn't call CComputeDoc::OnOpenDocument(LPCTSTR lpszPathName). 8. And so, the view is not updated. This is where my problem is. And thats why, i was curious about the place of code. Sorry for all the frustrations. And hope that, i would overcome this problem. Again, I thank in advance. thanx mughi
I hope i don`t get you wrong. I think I get the same problem with you before. I haven`t got the solution yet. I tried using CDocument::OnCloseDocument (if i`m not mistaken) and it close the application. I think we should code to call the File Close. :confused:
Work hard and a bit of luck is the key to success.
:)