Monday, January 28, 2008

How to Load / Save predefined resource types : Win32 API

HRSRC FindResource( HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType);

If we are using custom resource Type then we can give like,
HRSRC   hRes = FindResource(NULL,MAKEINTRESOURCE(IDR_DM_USER_LCENSE),_T("LicensingData"));
But for predefined resource type we can’t give like
FindResource(NULL,MAKEINTRESOURCE(IDR_DM_LOGIN_HTML),_T("HTML"));

To do this we can use MAKEINTRESOURCE(RT_HTML).

 

Value

Meaning

RT_ACCELERATOR

Accelerator table.

RT_ANICURSOR

Animated cursor.

RT_ANIICON

Animated icon.

RT_BITMAP

Bitmap resource.

RT_CURSOR

Hardware-dependent cursor resource.

RT_DIALOG

Dialog box.

RT_DLGINCLUDE

Allows a resource editing tool to associate a string with an .rc file. Typically, the string is the name of the header file that provides symbolic names. The resource compiler parses the string but otherwise ignores the value. For example,

/* file MyFile.dlg */

1 DLGINCLUDE "MyFile.h"

RT_FONT

Font resource.

RT_FONTDIR

Font directory resource.

RT_GROUP_CURSOR

Hardware-independent cursor resource.

RT_GROUP_ICON

Hardware-independent icon resource.

RT_HTML

HTML.

RT_ICON

Hardware-dependent icon resource.

RT_MANIFEST

Microsoft Windows XP: Side-by-Side Assembly XML Manifest.

RT_MENU

Menu resource.

RT_MESSAGETABLE

Message-table entry.

RT_PLUGPLAY

Plug and Play resource.

RT_RCDATA

Application-defined resource (raw data).

RT_STRING

String-table entry.

RT_VERSION

Version resource.

RT_VXD

VXD.

 

 

No comments: