锘??xml version="1.0" encoding="utf-8" standalone="yes"?> 4.澶勭悊鎺т歡瑙﹀彂鐨勪簨浠?br /> 閲嶈澆鐖剁獥浣撶殑OnCmdMsg鍑芥暟錛屽鐞嗗搴旂殑浜嬩歡鍗沖彲錛孫nCmdMsg鍘熷瀷濡備笅錛?/p>
# Resource locations to be added to the default path
1.棣栧厛鏄幏鍙栧埌鎺т歡鐨凣UID錛屽彲浠ラ氳繃閰嶇疆銆?br />2.鑾峰彇鎺т歡鐨勬柟娉曘佷簨浠剁瓑灞炴э紝鏂逛究鍚庨潰鐨勪簨浠跺鐞?br />3.閲囩敤CWnd::CreateControl鍒涘緩鎺т歡瀹炰緥錛屽鏋滄槸閫氳繃鑴氭湰璋冪敤鎺т歡鎺ュ彛錛屽彲浠ュ皢璇ユ帶浠舵坊鍔犲埌鑴氭湰寮曟搸銆?br /> CreateControl鍘熷瀷濡備笅錛?/p>
BOOL CreateControl( REFCLSID clsid, LPCTSTR pszWindowName, DWORD dwStyle,
const POINT* ppt, const SIZE* psize, CWnd* pParentWnd, UINT nID,
CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL );
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo);
]]>AFX_STATIC CFixedAlloc _afxAlloc64(ROUND4(65*sizeof(TCHAR)+sizeof(CStringData)));
2AFX_STATIC CFixedAlloc _afxAlloc128(ROUND4(129*sizeof(TCHAR)+sizeof(CStringData)));
3AFX_STATIC CFixedAlloc _afxAlloc256(ROUND4(257*sizeof(TCHAR)+sizeof(CStringData)));
4AFX_STATIC CFixedAlloc _afxAlloc512(ROUND4(513*sizeof(TCHAR)+sizeof(CStringData)));
]]>
閰嶇疆鏂瑰紡
resources.cfg灝辨槸鐢ㄦ潵閰嶇疆璧勬簮鐨勮礬寰勭殑錛屽唴瀹瑰涓嬶細
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../Media/packs/OgreCore.zip
[General]
FileSystem=../../Media
FileSystem=../../Media/fonts
FileSystem=../../Media/materials/programs
FileSystem=../../Media/materials/scripts
FileSystem=../../Media/materials/textures
FileSystem=../../Media/models
FileSystem=../../Media/overlays
FileSystem=../../Media/particle
FileSystem=../../Media/gui
FileSystem=../../Media/DeferredShadingMedia
Zip=../../Media/packs/cubemap.zip
Zip=../../Media/packs/cubemapsJS.zip
Zip=../../Media/packs/dragon.zip
Zip=../../Media/packs/fresneldemo.zip
Zip=../../Media/packs/ogretestmap.zip
Zip=../../Media/packs/skybox.zip
Bootstrap銆丟eneral灝辨槸璧勬簮緇勫悕縐幫紝FileSystem銆乑ip灝辨槸鏂囦歡緋葷粺綾誨瀷錛岃〃紺哄帇緙╁寘榪樻槸鏂囦歡緋葷粺銆備竴鑸垜浠紑鍙戞椂閮芥槸浣跨敤鏂囦歡緋葷粺錛屾墍浠ラ厤緗搴旂殑璺緞灝卞彲浠ャ侽GRE鏄敮鎸乑ip鍘嬬緝鍖呯殑錛屽鏋滆瀹炵幇鑷繁鐨勫帇緙╁寘闇瑕佸疄鐜板搴旂殑Archive鐨勫瓙綾伙紝瀹炵幇瀵瑰簲鎺ュ彛灝卞彲浠ャ傚彲浠ュ弬鑰僙ipArchive銆乑ipArchiveFactory銆乑ipDataStream瀹炵幇銆?br />
紼嬪簭鏂瑰紡
鍏跺疄閰嶇疆鏂瑰紡鏈緇堜篃鏄皟鐢ㄧ▼搴忔潵璁劇疆鐨勶紝resources.cfg鍙槸鎸囧畾浜哛esourceGroupManager::getSingleton().addResourceLocation鐨勫弬鏁般?br />鐪嬩笅闈㈢殑鍑芥暟灝卞緢娓呮浜嗭紝灝辨槸璇誨彇resources.cfg錛屽皢閰嶇疆鐨勮礬寰勯兘娣誨姞鍒拌祫婧愮鐞嗭紝璁劇疆瀹岃祫婧愮粍璺緞錛岃皟鐢≧esourceGroupManager::getSingleton().initialiseAllResourceGroups()鍒濆鍖栧氨鍙互錛屽悗緇氨鍙互鐩存帴鍔犺澆璧勬簮錛屽緢綆鍗曞惂銆?/p>
virtual void setupResources(void)
2 {
3 // Load resource paths from config file
4 ConfigFile cf;
5 cf.load(mResourcePath + "resources.cfg");
6
7 // Go through all sections & settings in the file
8 ConfigFile::SectionIterator seci = cf.getSectionIterator();
9
10 String secName, typeName, archName;
11 while (seci.hasMoreElements())
12 {
13 secName = seci.peekNextKey();
14 ConfigFile::SettingsMultiMap *settings = seci.getNext();
15 ConfigFile::SettingsMultiMap::iterator i;
16 for (i = settings->begin(); i != settings->end(); ++i)
17 {
18 typeName = i->first;
19 archName = i->second;
20#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
21 // OS X does not set the working directory relative to the app,
22 // In order to make things portable on OS X we need to provide
23 // the loading with it's own bundle path location
24 ResourceGroupManager::getSingleton().addResourceLocation(
25 String(macBundlePath() + "/" + archName), typeName, secName);
26#else
27 ResourceGroupManager::getSingleton().addResourceLocation(
28 archName, typeName, secName);
29#endif
30 }
31 }
32 }
]]>
1.娉ㄥ唽琛ㄦ潈闄?br> HKEY_LOCAL_MACHINE鐩綍鍙楅檺鐢ㄦ埛鍙湁璇誨彇鏉冮檺錛屾病鏈変慨鏀規潈闄愩?br> 2.鏂囦歡澶規潈闄?br> 涓鑸皢鍙鐨勭▼搴忔枃浠舵斁鍒癈:\Program Files錛堜笉鍚屾搷浣滅郴緇熶笉鐩稿悓錛屽彲浠ラ氳繃鐜鍙橀噺鑾峰彇錛変笅闈紝鐢ㄦ埛鏁版嵁鎴栬呴厤緗枃浠舵斁鍒板綋鍓嶇敤鎴風洰褰曟垨鑰呮墍鏈夌敤鎴風洰褰曪紙C:\Documents and Settings\All Users錛屼笉鍚屾搷浣滅郴緇熺洰褰曚笉涓鏍鳳級銆?br> 紼嬪簭鏀懼埌鍙楅檺鐢ㄦ埛榪愯錛屾渶綆鍗曠殑鏂規硶灝辨槸緇欐寚瀹氱殑娉ㄥ唽琛ㄧ洰褰曞拰鏂囦歡鐩綍鎺堜簣鏉冮檺銆?br> 娉ㄥ唽琛ㄦ潈闄愯璁★細
鏂囦歡鐩綍鏉冮檺璁劇疆錛?span lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 瀹嬩綋; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-no-proof: yes">