soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SResLoadFromFile Class Reference

Utility class for loading resources from files. More...

#include <SResProvider.h>

Static Public Member Functions

static HBITMAP LoadBitmap (LPCTSTR pszFileName)
 Loads a bitmap from a file.
 
static HICON LoadIcon (LPCTSTR pszFileName, int cx=0, int cy=0)
 Loads an icon from a file.
 
static HCURSOR LoadCursor (LPCTSTR pszFileName)
 Loads a cursor from a file.
 
static IBitmapSLoadImage (LPCTSTR pszFileName)
 Loads an image from a file as an IBitmapS object.
 
static IImgXLoadImgX (LPCTSTR pszFileName)
 Loads an image from a file as an IImgX object.
 
static size_t GetRawBufferSize (LPCTSTR pszFileName)
 Retrieves the size of the raw buffer for a file.
 
static BOOL GetRawBuffer (LPCTSTR pszFileName, LPVOID pBuf, size_t size)
 Retrieves the raw buffer for a file.
 

Detailed Description

Utility class for loading resources from files.

Definition at line 172 of file SResProvider.h.

Member Function Documentation

◆ GetRawBuffer()

BOOL SResLoadFromFile::GetRawBuffer ( LPCTSTR pszFileName,
LPVOID pBuf,
size_t size )
static

Retrieves the raw buffer for a file.

Parameters
pszFileNameName of the file.
pBufBuffer to store the raw data.
sizeSize of the buffer.
Returns
TRUE if the raw buffer is successfully retrieved, FALSE otherwise.

Definition at line 326 of file SResProvider.cpp.

◆ GetRawBufferSize()

size_t SResLoadFromFile::GetRawBufferSize ( LPCTSTR pszFileName)
static

Retrieves the size of the raw buffer for a file.

Parameters
pszFileNameName of the file.
Returns
Size of the raw buffer, or 0 if the file does not exist.

Definition at line 321 of file SResProvider.cpp.

◆ LoadBitmap()

HBITMAP SResLoadFromFile::LoadBitmap ( LPCTSTR pszFileName)
static

Loads a bitmap from a file.

Parameters
pszFileNameName of the file containing the bitmap.
Returns
Handle to the loaded bitmap, or nullptr if loading fails.

Definition at line 274 of file SResProvider.cpp.

◆ LoadCursor()

HCURSOR SResLoadFromFile::LoadCursor ( LPCTSTR pszFileName)
static

Loads a cursor from a file.

Parameters
pszFileNameName of the file containing the cursor.
Returns
Handle to the loaded cursor, or nullptr if loading fails.

Definition at line 284 of file SResProvider.cpp.

◆ LoadIcon()

HICON SResLoadFromFile::LoadIcon ( LPCTSTR pszFileName,
int cx = 0,
int cy = 0 )
static

Loads an icon from a file.

Parameters
pszFileNameName of the file containing the icon.
cxDesired width of the icon.
cyDesired height of the icon.
Returns
Handle to the loaded icon, or nullptr if loading fails.

Definition at line 279 of file SResProvider.cpp.

◆ LoadImage()

IBitmapS * SResLoadFromFile::LoadImage ( LPCTSTR pszFileName)
static

Loads an image from a file as an IBitmapS object.

Parameters
pszFileNameName of the file containing the image.
Returns
Pointer to the loaded IBitmapS object, or nullptr if loading fails.

Definition at line 289 of file SResProvider.cpp.

◆ LoadImgX()

IImgX * SResLoadFromFile::LoadImgX ( LPCTSTR pszFileName)
static

Loads an image from a file as an IImgX object.

Parameters
pszFileNameName of the file containing the image.
Returns
Pointer to the loaded IImgX object, or nullptr if loading fails.

Definition at line 303 of file SResProvider.cpp.


The documentation for this class was generated from the following files: