|
OWLNext 6.32
|
#include <wsyscls.h>
Public Member Functions | |
| TResource (HINSTANCE hModule, TResId resId) | |
| TResource (HINSTANCE hModule, TResId resid, LANGID langid) | |
| ~TResource () | |
| bool | IsOK () const |
| operator T * () | |
Protected Attributes | |
| HGLOBAL | MemHandle |
| T * | MemPtr |
TResource simplifies access to a resource by encapsulating the find, load, lock and free steps for accessing a resource.
typedef TResource<DLGTEMPLATE, (int)RT_DIALOG> TDlgResource;
TDlgResource dlgInfo(hInstance, IDD_ABOUTDLG);
DLGTEMPLATE* pDlgTmpl = dlgInfo;
| owl::TResource< T, resType >::TResource | ( | HINSTANCE | hModule, |
| TResId | resId | ||
| ) |
Loads & locks the specified resource..
References owl::TResource< T, resType >::MemHandle, and owl::TResource< T, resType >::MemPtr.
| owl::TResource< T, resType >::TResource | ( | HINSTANCE | hModule, |
| TResId | resId, | ||
| LANGID | lcid | ||
| ) |
Loads & locks a resource of the type 'resType' from the module (hModule). Accepts a LanguageID for localized resources.
References owl::TResource< T, resType >::MemHandle, and owl::TResource< T, resType >::MemPtr.
| owl::TResource< T, resType >::~TResource | ( | ) |
Unlocks and frees the resource loaded earlier.
| bool owl::TResource< T, resType >::IsOK | ( | ) | const |
Confirms whether resource was found.
Returns true if resource was successfully loaded or false otherwise.
| owl::TResource< T, resType >::operator T * | ( | ) |
Conversion operator to point to structure representing binary layout of the resource...
Returns a pointer to the locked resource.
HGLOBAL owl::TResource< T, resType >::MemHandle [protected] |
Handle of resource.
T* owl::TResource< T, resType >::MemPtr [protected] |
Pointer to locked resource.
1.7.4