Connecting Tech Pros Worldwide Help | Site Map

Duffers question (revision in MFC)

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 12:50 AM
kizmet
Guest
 
Posts: n/a
Default Duffers question (revision in MFC)

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...

  #2  
Old July 23rd, 2005, 12:50 AM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Duffers question (revision in MFC)

"kizmet" <pleasedo.not.mailme@nodesearch.net> wrote...[color=blue]
> 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...[/color]

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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.