0

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?

2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by Ancient Dragon
0

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)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.