By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,413 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,413 IT Pros & Developers. It's quick & easy.

Duffers question (revision in MFC)

P: n/a
Ok - so I'm going through my teach yourself VC++ in 21 days book
second time around for revision). I've got to day 2 (groan).

The book says to put the following code in....

void CDay2Dlg::OnExit()
{
// TODO: Add your control notification handler code here
OnOK();
}

But I can only get the function to work if I write it as:

void CDay2Dlg::OnExit()
{
// TODO: Add your control notification handler code here
CDay2Dlg::OnOK();
}

Last time I did this it worked fine without the CDay2Dlg::

Any ideas? Thanks...
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"kizmet" <pl*****************@nodesearch.net> wrote...
Ok - so I'm going through my teach yourself VC++ in 21 days book
second time around for revision). I've got to day 2 (groan).

The book says to put the following code in....

void CDay2Dlg::OnExit()
{
// TODO: Add your control notification handler code here
OnOK();
}

But I can only get the function to work if I write it as:

void CDay2Dlg::OnExit()
{
// TODO: Add your control notification handler code here
CDay2Dlg::OnOK();
}

Last time I did this it worked fine without the CDay2Dlg::

Any ideas? Thanks...


Since MFC is not topical here, you have two choices: post to an MFC
newsgroup (like microsoft.public.vc.mfc) or follow the suggestions
outlined in FAQ 5.8. If you decide to do the latter, keep in mind
that none of MFC classes are known here, so you'll need to emulate
what's involved with Standard C++ constructs.

Also, it is extremely useful to indicate what makes you think that
you can't get the code to work in the initial form. Do you get some
kind of compiler diagnostic? If so, do we have to guess or will you
be kind enough to tell us next time?

Now, this is a shot in the dark, but often the necessity to fully
qualify the name stems from the inability of the compiler to find
the name or to resolve it into a single name when more than one is
available. It happens in templates, it happens with multiple
inheritance, but in your case I have no idea as to the real reason
since CDay2Dlg is undefined.

V
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.