I have a question about inheritance and the flow of logic. There is
a class, CCommUI, which is decended from CDialog. CComUI contains a
method, OnCancel, which is included in the appropriate message map to
be called whenever the "Cancel" button in the modal dialog box (the
CComUI object) is pressed.
A snippet of code goes something like this:
void CComUI::OnCancel()
{
CWnd * pbutton = GetDlgItem(IDCANCEL);
pbutton->EnableWindow(FALSE);
.
.
.
CDialog::OnCancel();
}
The question I have is this:
Does the line containing the call to the parent "percolate" up to the
child? What is the purpose of this call in the first place if
CDialog::OnCancel() had never been specifically fleshed out (or even
mentioned) anywhere in the code?
As an aside, I commented this line out and the software ran as
expected. With that line left in the code there was always a premature
closing of the dialog box. Does this mean that the method,
CDialog::OnCancel(), was performing some action on its own without me
even being aware of it?
* KWQ/2 1.2i *
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)
|