Click here to Skip to main content
15,912,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionfatal error C1189: #error : This add-in is for VC++ 6.0 only Pin
pandit8414-Feb-09 23:18
pandit8414-Feb-09 23:18 
AnswerRe: fatal error C1189: #error : This add-in is for VC++ 6.0 only Pin
Stuart Dootson14-Feb-09 23:25
professionalStuart Dootson14-Feb-09 23:25 
GeneralRe: fatal error C1189: #error : This add-in is for VC++ 6.0 only Pin
pandit8414-Feb-09 23:39
pandit8414-Feb-09 23:39 
GeneralRe: fatal error C1189: #error : This add-in is for VC++ 6.0 only Pin
Stuart Dootson15-Feb-09 0:39
professionalStuart Dootson15-Feb-09 0:39 
QuestionCEditView Pin
grassrootkit14-Feb-09 22:44
grassrootkit14-Feb-09 22:44 
AnswerRe: CEditView Pin
grassrootkit14-Feb-09 22:56
grassrootkit14-Feb-09 22:56 
GeneralRe: CEditView Pin
Stuart Dootson14-Feb-09 23:13
professionalStuart Dootson14-Feb-09 23:13 
GeneralRe: CEditView Pin
grassrootkit15-Feb-09 0:50
grassrootkit15-Feb-09 0:50 
Thanks for your replies again. I've done those changes you suggested. Now the reading part moved to document. but I'm still calling the document's reading functions from the view. Is that ok? Please find below ,In the CmyCView::OnOpen function,

<br />
CmyCView::OnOpen()<br />
{<br />
  CFileDialog dlg(TRUE,NULL,NULL,NULL,szFilter);<br />
  CSDITestDoc* pDoc = GetDocument();<br />
  if (dlg.DoModal() == IDOK)<br />
  {<br />
	pDoc->readFile((LPCTSTR)dlg.GetPathName());<br />
  }<br />
	CString str = pDoc->getText().c_str();<br />
	CEdit& ced = GetEditCtrl();<br />
	ced.SetWindowTextA(str);<br />
}<br />


So far so good, some queries regarding the below comment:
Stuart Dootson wrote:
You should probably do that in the OnUpdate handler - that should get called when the document is updated, by the document calling its UpdateAllViews method (that's part of CView).


The only interface between the user & the document object(here a text content) is the CEditview, where the user modifies the text and when he saves, it's going be View->to->Doc. And it's going to be one way. Where does your comment fit in? I can't get the picture.. How does the document get modified by itself so that it updates the view from there? May be you are talking about multiple view?

Question No 2:
I guessed about a scenario where , as you said the document gets modified from an external window, may be another dialog. So added a dialog. Now I dont have any clue how do I get the document pointer into my Dialog? looks like I'm on the other end of the river..
GeneralRe: CEditView Pin
Stuart Dootson15-Feb-09 3:01
professionalStuart Dootson15-Feb-09 3:01 
GeneralRe: CEditView Pin
grassrootkit15-Feb-09 5:34
grassrootkit15-Feb-09 5:34 
GeneralRe: CEditView Pin
grassrootkit15-Feb-09 22:31
grassrootkit15-Feb-09 22:31 
GeneralRe: CEditView Pin
Stuart Dootson15-Feb-09 23:30
professionalStuart Dootson15-Feb-09 23:30 
GeneralRe: CEditView Pin
grassrootkit15-Feb-09 22:54
grassrootkit15-Feb-09 22:54 
GeneralRe: CEditView Pin
Stuart Dootson15-Feb-09 23:26
professionalStuart Dootson15-Feb-09 23:26 
AnswerRe: CEditView // Displaying text Pin
grassrootkit14-Feb-09 23:00
grassrootkit14-Feb-09 23:00 
GeneralRe: CEditView // Displaying text Pin
grassrootkit14-Feb-09 23:11
grassrootkit14-Feb-09 23:11 
GeneralRe: CEditView // Displaying text Pin
Stuart Dootson14-Feb-09 23:17
professionalStuart Dootson14-Feb-09 23:17 
GeneralRe: CEditView // Displaying text Pin
grassrootkit14-Feb-09 23:27
grassrootkit14-Feb-09 23:27 
QuestionCListCtrl "show selection always" doesn't work in vista aero theme Pin
xanagan66614-Feb-09 21:05
xanagan66614-Feb-09 21:05 
AnswerRe: CListCtrl "show selection always" doesn't work in vista aero theme Pin
Stuart Dootson14-Feb-09 23:14
professionalStuart Dootson14-Feb-09 23:14 
Question871127 - intellisense Pin
ilostmyid214-Feb-09 17:30
professionalilostmyid214-Feb-09 17:30 
AnswerRe: 871127 - intellisense Pin
Stuart Dootson14-Feb-09 23:20
professionalStuart Dootson14-Feb-09 23:20 
GeneralRe: 871127 - intellisense Pin
ilostmyid217-Feb-09 18:21
professionalilostmyid217-Feb-09 18:21 
QuestionToUpper and ToLower part of a string in .net C++? Pin
TabascoSauce14-Feb-09 13:00
TabascoSauce14-Feb-09 13:00 
AnswerRe: ToUpper and ToLower part of a string in .net C++? Pin
Stuart Dootson14-Feb-09 13:33
professionalStuart Dootson14-Feb-09 13:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.