共用方式為


CWinAppEx::GetObject

Reads CObject-dervied data from the registry.

BOOL GetObject(
   LPCTSTR lpszEntry,
   CObject& obj 
);

Parameters

  • [in] lpszEntry
    A string that contains the relative path of a registry entry.

  • [out] obj
    A reference to a CObject. The method uses this reference to store the registry data.

Return Value

Nonzero if the method was successful; otherwise 0.

Remarks

This method reads data from the registry that is derived from CObject. To write CObject data to the registry, use either CWinAppEx::WriteObject or CWinAppEx::WriteSectionObject.

The lpszEntry parameter is the name of a registry entry that is located under the default registry key for your application. To get or set the default registry key, use the methods CWinAppEx::GetRegistryBase and CWinAppEx::SetRegistryBase respectively.

Requirements

Header: afxwinappex.h

See Also

Reference

CWinAppEx Class

Hierarchy Chart

CWinAppEx::WriteObject

CWinAppEx::WriteSectionObject