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
Mughi
Posts
-
Refresh a view -
Refresh a viewThats 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
-
Refresh a viewI have tried this. But still, its not working. Where exactly should i implement this UpdateAllviews(NULL); Sorry for the inconvenience. thanx mughi
-
Refresh a viewHi 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
-
multitask progress and process ???I tried that. But that doesn't happen in parallel. Only after the progress completes, my process of loading the file starts. Mughi
-
multitask progress and process ???hi I have an MFC MDI application, in which i carry out an process and at the end open an log file. This process involves quite a lot of time. During this process, i want to implement a progress bar, showing the status of the process. How do i do tht. Can someone, please help me on this. I thank in advance. cheers Mughi
-
Unable to open a fileHi, The file was opened somewhere else (for other module) and was not closed. I had to track down the whole flow of the application and had the problem solved. Thats been a silly mistake and sorry for the inconvenience caused. Thanks for your support. Thanx Mughi
-
Unable to open a fileHi, Here is the code. FILE *fp = fopen(this->output,"w"); fprintf(fp,"8\n"); for(rc=0;rc<9;rc++) for(gc=0;gc<9;gc++) for(bc=0;bc<9;bc++) { lut[0][rc][gc][bc] = (lut[0][rc][gc][bc]>255)?255:lut[0][rc][gc][bc]; lut[1][rc][gc][bc] = (lut[1][rc][gc][bc]>255)?255:lut[1][rc][gc][bc]; lut[2][rc][gc][bc] = (lut[2][rc][gc][bc]>255)?255:lut[2][rc][gc][bc]; fprintf(fp,"%d %d %d\n",lut[0][rc][gc][bc],lut[1][rc][gc][bc],lut[2][rc][gc][bc]); } fclose(fp); When my MFC application still runs, Iam able to open the file in dos prompt, but not in any of WIN32 application or in my own MFC application. Am still not getting it. Could you please help me out, if you have the answers. Thanx Mughi
-
Unable to open a fileHi, I have created a MDI using MFC Application. The application is developed to process some input files and create an output file. At the end of the process, after the output file is created, iam trying to open the same. But its popping an error message saying "A sharing violation occured while accessing C:\temp\output.txt" And, iam not able to open it through any other application and the popping error message is "The document C:\temp\output.txt is being used by another application and cannot be accessed". I have properly coded on file opening and file closing. But still, iam not able to understand on why the problem occurs. Only, when i close my MFC application, iam able to access the created output file through any applicaton. Could someone, please help me, to get out of this situation. I thank in advance. Thanx Mughi Mughilan
-
remove the initial ChildFrameThank You Roger Allen. It working perfectly. Thanx Mughi
-
remove the initial ChildFrameHi, I have created a MDI sing MFC Application. When I run the application, single empty childframe appears, which i don't want. Only when the click the 'New' menu/Icon, a new childframe should appear. Initially, no document should appear. Could somebody please help me on this. I thank in advance. Thanx Mughi
-
Unable to view documentHi, Iam unable to view the opened document, when I create a MFC Application with CView / CRichEditView as the View Base class. The title appears as the opened filename. But the contents of the document are not viewed. Its plain white. What would be the problem ??? But, when I use CEditView, Iam able to view the opened document. I thank in advance. Mughi
-
change dialog captionThanks a lot. Got it working. cheers mughi
-
change dialog captionPlease tell me on, how do I change the caption (name) of dialog window at runtime. I thank in advance. cheers mughi
-
Call another program from my project ??thanks for your support cheers
-
Call another program from my project ??thanks for your support cheers
-
Call another program from my project ??Its working. Thanks for your support. And by the way, I would like to know on how to run any other program, not only HLP files but also to invoke other files like documents, executables, etc., Once again, I thank you for your support.
-
Call another program from my project ??I have Help->Contents menu in my project. And I have a help.hlp file. What I need is : On click of the contents menu, I need to display this help.hlp file. How do i do it ?? Could someone help me on this, please. I thank in advance. Mughi
-
'class' type redefinition errorI got this error in my program error C2011: 'CRichText' : 'class' type redefinition. I added a RichText ActiveX Control and added a variable for it. Once when i compiled, I got stuck with the above error. Iam unable to proceed further. Please help me out. I thank in advance. Mughi
-
hot to set the step value in spinI had set the min value and max value to spin by m_spin.SetRange(250,500); But then, how to set the step value to spin. It should increment like 250, 300, 350, 400, 450, 500 Can anyone help me out, please. It is so urgent. I thank in advance. Mughilan