Re: CRegKey

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Michael Buechel (Muechel.removeme_at_gmx.at)
Date: 03/19/04


Date: Fri, 19 Mar 2004 14:58:25 +0100

hi jon,

normally if you overwrite functions from base classes your own class does
not know them anymore. why this? you are also allowed to overwrite like this:
CMyRegKey::SetValue(CString sz)
{
    // do anything with the string:
    :

    // call base class function
    CRegKey::SetValue(sz);
}

in these cases use the keyword using:

class CMyRegKey : public CRegKey
{
using CRegKey::SetValue;
:
:
}

now you are able to access directly to:

CMyRegKey::SetValue(_T("string"));
CMyRegKey::SetValue((DWORD)1234);

-- 
kind regards, michael
while(!sleep())
   ++sheep;

Quantcast