duffers question - Programmer

This is a discussion on duffers question - Programmer ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: duffers question

  1. duffers question

    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. Re: duffers question

    kizmet 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();
    >}


    Should work. You've told the compiler that this function is part of
    the class CDay2Dlg, so when you call OnOK it should look for that
    function in that class.

    >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();
    >}


    Shouldn't have to do that. Are you sure you've got everything spelled
    right and capitalized correctly?

    --
    Tim Slattery
    Slattery_T@bls.gov

+ Reply to Thread