1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<title>Windows Interface Reference: Resource structure</title> 6</head> 7 8<body> 9 10<h1>Resource </h1> 11 12<p>The Resource structure contains functions to load resources from a resource file. 13 In many cases there are functions in other structures which will load the 14appropriate item from the resource file.</p> 15 16<pre>structure Resource : 17 sig 18 datatype ResourceType = 19 RT_CURSOR | RT_BITMAP | RT_ICON | RT_MENU | RT_DIALOG | RT_STRING | RT_FONTDIR | 20 RT_FONT | RT_ACCELERATOR | RT_RCDATA | RT_MESSAGETABLE | RT_GROUP_CURSOR | 21 RT_GROUP_ICON | RT_VERSION | RT_DLGINCLUDE | RT_ANICURSOR | RT_ANIICON | 22 RT_PLUGPLAY | RT_VXD 23 24 type HRSRC 25 type HRSRCGLOBAL 26 type HINSTANCE 27 28 datatype RESID = IdAsInt of int | IdAsString of string 29 val MAKEINTRESOURCE : int -> RESID 30 31 type HUPDATE 32 33 val BeginUpdateResource : string * bool -> HUPDATE 34 val EndUpdateResource : HUPDATE * bool -> unit 35 val FindResource : HINSTANCE * RESID * ResourceType -> HRSRC 36 val FindResourceEx : HINSTANCE * ResourceType * RESID * Locale.LANGID -> HRSRC 37 val FreeLibrary : HINSTANCE -> bool 38 val <a 39name="LoadLibrary">LoadLibrary</a> : string -> HINSTANCE 40 val <a name="LoadResource">LoadResource</a> : HINSTANCE * HRSRC -> HRSRCGLOBAL 41 val LoadString : HINSTANCE * RESID -> string 42 val LockResource : HRSRCGLOBAL -> Word8Vector.vector 43 val SizeofResource : HINSTANCE * HRSRC -> int 44 val UpdateResource : 45 HUPDATE * ResourceType * RESID * Locale.LANGID * Word8Vector.vector option -> unit 46 end</pre> 47</body> 48</html> 49