亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? resources.html

?? This tutorial attempts to get you started developing with the Win32 API as quickly and clearly as po
?? HTML
字號:
<HTML><LINK HREF="style.css" REL="STYLESHEET" TYPE="text/css"><HEAD><TITLE>Tutorial: Using Resources</TITLE></HEAD><BODY><FONT SIZE="-1">[ <A HREF="./index.html">contents</A>| <A HREF="http://www.winprog.org/">#winprog</A>]</FONT><HR><H1>Using Resources</H1><P>You may also want to refer to the Appendices at the end of this tutorial for more information on resources with VC++ and BC++.<P>Before we get any deeper I will cover the topic of resources so that I won'thave to re-write it for each section.<B>Youdon't actually need to compile the stuff in this section, it's as example only.</B><P>Resources are pre-defined bits of data stored in binary format inside yourexecutable file.  You create resources in a resources script, a file withan extension of ".rc".  comercial compilers will have a visual resourceeditor which allows you to create resources without manually editing thisfile but sometimes editing it is the only way to go, especially if your compilerhas no visual editor, it sucks, or doesn't support the exact feature you need.  <P>Unfortunately different compiler suites handle resources differently.  I willdo the best I can to explain the common features needed to work with resourcesin general.<P>The resource editor included with MSVC++ makes it very difficult to edit the resources manually, since it enforces a proprietary format on them, and will totally mangle thefile if you save one that you had created by hand.  In general you shouldn't bother withcreating .rc files from scratch, but knowing how to modify them manually can be very useful.Another annoyance is that MSVC++ will by default name the resource header file "resource.h"even if you wanted to call it something else.  I will go with this for the sake of simplicityin this document, but will show you how to change this in the appendix on compilers.<P>First lets take a very simple resource script, with a single icon.<PRE CLASS="LIST">#include "resource.h"IDI_MYICON ICON "my_icon.ico"</PRE><P>That's the entire file.  <CODE>IDI_MYICON</CODE> is the identifier of the resource, <CODE>ICON</CODE> is the typeand "my_icon.ico" is the name of the external file which contains it.  Thisshould work on any compiler.<P>Now what about this <CODE>#include "resource.h"</CODE> ?  Well your program needs a way toidentify the icon, and the best way to do that is to assign it a unique ID (<CODE>IDI_MYICON</CODE>).  We can do this by creating the file "resource.h" and including it in both our resource script, and oursource file.<PRE CLASS="LIST">#define IDI_MYICON  101</PRE><P>As you can see, we've assigned <CODE>IDI_MYICON</CODE> the value of <CODE>101</CODE>.  We could just forget about the identifier and use <CODE>101</CODE> wherever we needto reference the icon, but <CODE>IDI_MYICON</CODE> is a lot clearer as to what youare refering too, and easier to remember when you have large number of resources.<P>Now lets say we add a <CODE>MENU</CODE> resource:<PRE CLASS="LIST">#include "resource.h"IDI_MYICON ICON "my_icon.ico"IDR_MYMENU MENUBEGIN    POPUP "&File"    BEGIN        MENUITEM "E&xit", ID_FILE_EXIT    ENDEND</PRE>Again <CODE>IDR_MYMENU</CODE> is the name of the resource and <CODE>MENU</CODE> is the type.  Now a fine point, see the <CODE>BEGIN</CODE> and <CODE>END</CODE> up there?  Some resource editors or compilers use <CODE>{</CODE> in placeof <CODE>BEGIN</CODE> and <CODE>}</CODE> in place of <CODE>END</CODE>.  If your compiler supports both feel free to pick which one you use.  If it only supports one or the other, you will need to make the necessary replacements to get it to work.<P>We've also added a new identifier, <CODE>ID_FILE_EXIT</CODE>, so we need to add this to ourresource header file, resource.h, in order to use it in our program.<PRE CLASS="LIST">#define IDI_MYICON  101#define ID_FILE_EXIT	4001</PRE><P>Generating and keeping track of all these ids can become a real chore with large projects,that's why most people use a visual resource editor which takes care of all this for you.They still screw up from time to time, and you could end up with multiple items withthe same ID or a similar problem, and it's good to be able to go in and fix it yourself.<P>Now an example of how to use a resource in your program.<PRE CLASS="SNIP">    HICON hMyIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MYICON));</PRE>The first parameter of <CODE>LoadIcon()</CODE> and many other resource using functions is thehandle to the current instance (which we are given in <CODE>WinMain()</CODE> and can also be retreived byusing <CODE>GetModuleHandle()</CODE> as demonstrated in previous sections).  Thesecond is the identifier of the resource.<P>You're probably wondering what's up with <CODE>MAKEINTRESOURCE()</CODE> and possibly wonderingwhy <CODE>LoadIcon()</CODE> takes a parameter of type <CODE>LPCTSTR</CODE> instead of say <CODE>UINT</CODE>when we're passing it an ID.  All <CODE>MAKEINTRESOURCE()</CODE> does is cast from an integer (what our ID is) to <CODE>LPCTSTR</CODE>, which <CODE>LoadIcon()</CODE> expects.  This brings usto the second way of identifying resources, and that's with strings.  Almost nobody does thisany more, so I won't go into details, but basically if you don't use #define to assign an integervalue to your resources then the name is interpreted as a string, and can be referenced inyour program like this:<PRE CLASS="SNIP">    HICON hMyIcon = LoadIcon(hInstance, "MYICON");</PRE><P><CODE>LoadIcon()</CODE> and other resource loading APIs can tell the difference between aninteger passed in and a pointer to a string passed in by checking the high word of the value.If it's <CODE>0</CODE> (as would be the case of any integer with a value less than or equalto 65535) then it assumes it is a resource ID.  This effectively limits your resources tousing IDs below 65535, which unless you have a whole lot of resources, should not be a problem.If it's not <CODE>0</CODE> then it assumes the value is a pointer, and looks up the resourceby name.  Never rely on an API to do this unless it is explicitely stated in the documentation.<P>For example, this doesn't work for menu commands like <CODE>ID_FILE_EXIT</CODE>, since they can only be integers.<HR><FONT SIZE="-1">Copyright &copy; 1998-2003, Brook Miles (<A HREF="mailto:forger(nospam)winprog.org">theForger</A>).  All rights reserved.</FONT><SCRIPT language="JavaScript"><!--   var re = /\(nospam\)/ig;   var str;   for(i = 0;i < document.links.length;i++)    {      str = "" + document.links(i).href;      if(str.search(re) != -1)         document.links(i).href = str.replace(re, "@");      str = "" + document.links(i).innerHTML;      if(str.search(re) != -1)         document.links(i).innerHTML = str.replace(re, "@");   }--></SCRIPT></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美一区二区三区极速播放| 欧美日韩一区中文字幕| 欧美一级日韩不卡播放免费| 性感美女久久精品| 日韩三级精品电影久久久| 蜜桃视频一区二区三区在线观看| 91精品国产91久久久久久最新毛片| 免费观看日韩av| 久久久精品天堂| 不卡的av电影| 亚洲精品视频一区二区| 欧美剧情片在线观看| 中文字幕中文字幕一区二区 | 中文字幕中文乱码欧美一区二区| 97超碰欧美中文字幕| 午夜精品久久久久影视| 欧美大胆人体bbbb| 懂色av一区二区夜夜嗨| 一区二区在线观看不卡| 欧美一区二区三区小说| 国产乱码精品1区2区3区| 亚洲图片另类小说| 欧美日韩在线一区二区| 国产一区二区三区蝌蚪| 亚洲精品高清视频在线观看| 91精品国产综合久久久久久 | 欧美一级艳片视频免费观看| 激情五月婷婷综合网| 亚洲欧美日韩一区| 91精品国产综合久久婷婷香蕉 | 久久精品夜夜夜夜久久| 色综合激情五月| 麻豆久久久久久久| 亚洲另类春色校园小说| 久久综合999| 欧美在线|欧美| 国产精品1区2区3区| 亚洲国产美女搞黄色| 国产亚洲欧美一区在线观看| 欧美日韩第一区日日骚| av亚洲精华国产精华精| 奇米影视7777精品一区二区| 亚洲欧美色图小说| 国产清纯美女被跳蛋高潮一区二区久久w | 日韩精品影音先锋| 91久久精品一区二区三区| 国产毛片精品视频| 天使萌一区二区三区免费观看| 国产精品成人一区二区艾草 | 欧美精选一区二区| 成人的网站免费观看| 精品影院一区二区久久久| 亚洲二区在线观看| 国产精品亲子伦对白| 日韩欧美高清dvd碟片| 日本韩国欧美在线| av电影在线观看不卡| 国产精品一卡二卡| 久草这里只有精品视频| 肉肉av福利一精品导航| 亚洲成人激情综合网| 亚洲精品日韩一| 国产精品白丝在线| 国产欧美日韩麻豆91| 久久精品视频免费| 久久女同性恋中文字幕| 精品国产乱码91久久久久久网站| 欧美精品久久久久久久多人混战| 在线免费观看日本欧美| 91在线小视频| 色婷婷久久久亚洲一区二区三区| 成人免费观看视频| 成人免费毛片嘿嘿连载视频| 国产美女精品在线| 国产91综合一区在线观看| 国产伦理精品不卡| 国产成人鲁色资源国产91色综| 国产专区欧美精品| 国产激情视频一区二区三区欧美| 国产做a爰片久久毛片| 国产精品一区二区你懂的| 国产成人免费网站| 国产成人午夜精品5599| 成人激情小说网站| 99国产精品一区| 91国内精品野花午夜精品| 精品制服美女丁香| 人人超碰91尤物精品国产| 蜜臀av一区二区| 极品少妇xxxx偷拍精品少妇| 国产一区二区三区最好精华液| 国产麻豆成人精品| 91丨porny丨首页| 欧美亚洲国产一区二区三区va | 99精品1区2区| 欧美三级视频在线观看| 91精品国产一区二区| 精品国产123| 国产精品家庭影院| 亚洲一区二区三区自拍| 免费人成精品欧美精品| 国产激情一区二区三区四区| 一本到三区不卡视频| 欧美剧情电影在线观看完整版免费励志电影 | 久久福利资源站| 国产传媒一区在线| 欧洲国产伦久久久久久久| 欧美一区二区三区在线| 国产精品美女久久久久久久久久久| 日韩一区中文字幕| 日本aⅴ亚洲精品中文乱码| 国产一区二区三区四区五区入口| 91丨九色丨黑人外教| 日韩一级视频免费观看在线| 国产精品天天看| 午夜精品福利一区二区三区蜜桃| 精品中文字幕一区二区| 色噜噜狠狠色综合欧洲selulu| 91精品国产综合久久香蕉的特点 | 亚洲va欧美va天堂v国产综合| 精品亚洲porn| 一本色道a无线码一区v| 欧美tickling网站挠脚心| 亚洲日本在线观看| 久久97超碰国产精品超碰| 91久久奴性调教| 国产亚洲成av人在线观看导航| 夜夜精品浪潮av一区二区三区| 国产精品一区二区在线播放| 欧美久久久久久久久久| 中文字幕五月欧美| 韩国精品久久久| 欧美妇女性影城| 亚洲视频小说图片| 国产在线不卡一区| 91精品国产丝袜白色高跟鞋| 亚洲美女区一区| 成人精品视频一区| 欧美大片日本大片免费观看| 亚洲午夜久久久久久久久久久| 福利视频网站一区二区三区| 精品国产一区二区精华| 丝袜诱惑亚洲看片| 精品视频一区三区九区| 《视频一区视频二区| 成人丝袜高跟foot| 久久无码av三级| 美国三级日本三级久久99| 欧美日韩一级片网站| 亚洲影院免费观看| 91小视频在线观看| 亚洲天天做日日做天天谢日日欢| 国产伦精品一区二区三区免费迷| 欧美一区二区三区爱爱| 午夜激情综合网| 欧美精品自拍偷拍| 亚洲午夜精品网| 在线免费观看成人短视频| 亚洲视频在线观看一区| jvid福利写真一区二区三区| 国产精品婷婷午夜在线观看| 国产成人精品亚洲777人妖 | 日本高清无吗v一区| 综合色天天鬼久久鬼色| 成人av在线一区二区| 国产精品久久99| 色综合天天天天做夜夜夜夜做| 欧美xxxxx牲另类人与| 青青国产91久久久久久 | 欧美大片免费久久精品三p| 日韩成人av影视| 88在线观看91蜜桃国自产| 日韩精品电影在线观看| 国产人成一区二区三区影院| 国产乱码精品一区二区三区五月婷 | 国产日韩欧美精品一区| 国产精品1区2区| 国产精品蜜臀av| 一本大道av伊人久久综合| 亚洲午夜电影在线观看| 欧美精品粉嫩高潮一区二区| 日欧美一区二区| 日韩欧美一卡二卡| 国产揄拍国内精品对白| 国产精品福利一区| 欧美色倩网站大全免费| 久久精品国产秦先生| 精品久久久久久综合日本欧美| 国产资源精品在线观看| 1024亚洲合集| 欧美日韩视频一区二区| 精品亚洲成a人| 亚洲欧美aⅴ...| 7799精品视频| 国产一区二区三区美女| 亚洲精品国产一区二区精华液| 欧美日韩大陆在线| 国产成人午夜精品5599| 亚洲国产欧美在线| 久久久一区二区三区捆绑**|