This is homework.

I have been tasked with creating a new dialog in WinMerge that provides line stats for every open file. It should show total lines, lines modified and lines deleted. I am working on implementing the total lines part. I have already created the dialog, a class for the dialog and member variables for the controls on the dialog. I know how to update the data in the dialog as well. However, I cannot access the built in 'GetLineTotal' function. It is hidden in CGhostTextView, which CMergeEditView derives from. While it is implemented as a virtual function in the base class, I cannot access it from CMergeEditView. I've tried creating a new member function in CMergeEditView, but I keep getting an access violation whenever I try to access it.

I guess the better question is, how do I capture a current instance of CMergeEditView and have its member functions usable by CDialog?

Re: WinMerge MFC - Access CEditView from CDialog 80 80

If you are using CDocument then you can get a handle to CView derived classes from there -- CDocument conbtains a linked list of CView class objects. From CDialog you will want to get the handle to CDocument from CWinApp (I don't recall the exact details as it's only been about 10 years since I worked with MFC)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.