⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resources.html

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 HTML
字号:
<html><head>	<title>wGui - Resources</title></head><body>	<h1>wGui - Resources</h1>	<p>wGui now has a simpler method for handling resources.  The CResourceHandle class (and it's derived classes) is a smart handle,		so it automatically keeps track of how many times a resource is in use and can free the resource when it's no longer needed.		These classes are contained in wg_resource_handle.h/cpp.	</p>	<p>The CBitmapResourceHandle class is specifically designed for bitmaps, and is a wrapper for an SDL_Surface.  This surface		is automatically freed when the reference count for the bitmap goes to zero.<br />		There is also a CBitmapFileResourceHandle class that takes a file name in it's constructor and will allocate a unique		resource ID and load the bitmap into the handle.  This simplifies using external resources greatly as the programmer no longer		has any need to worry about properly deallocating the bitmap when they're done with it.		The unique resource ID can be used to get more handles to the bitmap (as long as the reference count for the handle hasn't hit		zero and the bitmap freed), simply by calling CBitmapResourceHandle with the resource ID.	</p>	<p>For example:<br /><br />		<code>CBitmapFileResource MyResource("mybitmap.bmp");<br />		TResourceId myBitmapResourceId = MyResource.GetResourceId();<br />		CBitmapResource MyResourceRef(myBitmapResourceId);<br />		// MyResourceRef is the exact same as MyResource		</code>	</p>	<p>While it isn't enforced, Resource handles are intended to be read only.  Keep this in mind as in the future this may be enforced.	</p>	<p>The CStringResourceHandle is a class for handling string resources.  While this may seem a little foolish, it's actually quite practical		since it allows you to put all of the strings for a project in one file, and just refer to them via their resource IDs.  This makes		localizing the strings to other languages much easier.	</p>	<p>wGui internally uses a number of resources as well, which are contained in the CwgBitmapResourceHandle and CwgStringResourceHandle		classes.  These resources include things like commonly used bitmaps (i.e. arrows, icons, etc).  These are contained in		wg_resources.h/cpp.	</p>	<p>Resource IDs should all be unique.  IDs below 1000 are reserved for wGui provided resources.  User created resources should use IDs		between 1000 and 9999, or should use AUTO_CREATE_RESOURCE_ID.  Resources created using AUTO_CREATE_RESOURCE_ID start counting		at 10000.	</p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -