青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

S.l.e!ep.¢%

像打了激速一樣,以四倍的速度運(yùn)轉(zhuǎn),開心的工作
簡(jiǎn)單、開放、平等的公司文化;尊重個(gè)性、自由與個(gè)人價(jià)值;
posts - 1098, comments - 335, trackbacks - 0, articles - 1
  C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

關(guān)于RegisterClass的注冊(cè)位置

Posted on 2010-05-28 14:40 S.l.e!ep.¢% 閱讀(1001) 評(píng)論(0)  編輯 收藏 引用 所屬分類: VC

?昨天在smth,有人問起RegisterClass函數(shù)到底將窗口類注冊(cè)到哪里了,想了一下,應(yīng)該是一個(gè)系統(tǒng)級(jí)的存儲(chǔ)空間里,但是卻沒有一個(gè)明確的說法,msdn上看了半天,基本上沒有提到具體注冊(cè)的位置。倒是返回值給了不少提示,ATOM,查ATOM終于找到如下的一段描述

?The system provides a number of atom tables. Each atom table serves a different purpose. For example, dynamic data exchange (DDE) applications use the global atom table to share item-name and topic-name strings with other applications. Rather than passing actual strings, a DDE application passes global atoms to its partner application. The partner uses the atoms to obtain the strings from the atom table.

Applications can use local atom tables to store their own item-name associations.

The system uses atom tables that are not directly accessible to applications. However, the application uses these atoms when calling a variety of functions. For example, registered clipboard formats are stored in an internal atom table used by the system. An application adds atoms to this atom table using the RegisterClipboardFormat function. Also, registered classes are stored in an internal atom table used by the system. An application adds atoms to this atom table using the RegisterClass or RegisterClassEx function.


也就是說應(yīng)該在一個(gè)原子表中,于是google之,終于找到一片像樣的文章。轉(zhuǎn)貼如下:

What's the atom returned by RegisterClass useful for?

The RegisterClass and RegisterClassEx functions return an ATOM. What is that ATOM good for?

The names of all registered window classes is kept in an atom table internal to USER32. The value returned by the class registration functions is that atom. You can also retrieve the atom for a window class by asking a window of that class for its class atom via GetClassWord(hwnd, GCW_ATOM).

The atom can be converted to an integer atom via the MAKEINTATOM macro, which then can be used by functions that accept class names in the form of strings or atoms. The most common case is the lpClassName parameter to the CreateWindow macro and the CreateWindowEx function. Less commonly, you can also use it as the lpClassName parameter for the GetClassInfo and GetClassInfoEx functions. (Though why you would do this I can't figure out. In order to have the atom to pass to GetClassInfo in the first place, you must have registered the class (since that's what returns the atom), in which case why are you asking for information about a class that you registered?)

To convert a class name to a class atom, you can create a dummy window of that class and then do the aforementioned GetClassWord(hwnd, GCW_ATOM). Or you can take advantage of the fact that the return value from the GetClassInfoEx function is the atom for the class, cast to a BOOL. This lets you do the conversion without having to create a dummy window. (Beware, however, that GetClassInfoEx's return value is not the atom on Windows 95-derived operating systems.)

But what good is the atom?

Not much, really. Sure, it saves you from having to pass a string to functions like CreateWindow, but all it did was replace a string with with an integer you now have to save in a global variable for later use. What used to be a string that you could hard-code is now an atom that you have to keep track of. Unclear that you actually won anything there.

I guess you could use it to check quickly whether a window belongs to a particular class. You get the atom for that class (via GetClassInfo, say) and then get the atom for the window and compare them. But you can't cache the class atom since the class might get unregistered and then re-registered (which will give it a new atom number). And you can't prefetch the class atom since the class may not yet be registered at the point you prefetch it. (And as noted above, you can't cache the prefetched value anyway.) So this case is pretty much a non-starter anyway; you may as well use the GetClassName function and compare the resulting class name against the class you're looking for.

In other words, window class atoms are an anachronism. Like replacement dialog box classes, it's one of those generalities of the Win32 API that never really got off the ground, but which must be carried forward for backwards compatibility.

But at least now you know what they are.

最終的結(jié)論,RegisterClass應(yīng)該是將窗口類的數(shù)據(jù)放在User32.dll維護(hù)的一個(gè)原子表中了:)

?

本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/Hamxj/archive/2007/05/09/1601758.aspx

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美少妇一区| 国产精品久久久久久久久| 久久精品亚洲一区二区三区浴池| 亚洲欧美在线aaa| 亚洲欧美日韩国产另类专区| 亚洲一区二区免费视频| 亚洲中无吗在线| 亚洲欧洲99久久| 欧美一级视频精品观看| 久久久99爱| 美日韩免费视频| 欧美美女福利视频| 国产精品高潮呻吟久久av黑人| 国产精品久久久久久久久借妻 | 玖玖综合伊人| 欧美插天视频在线播放| 欧美精品免费视频| 欧美日韩午夜精品| 国产日韩欧美视频在线| 伊人久久久大香线蕉综合直播| 亚洲高清在线观看一区| 99re8这里有精品热视频免费| 亚洲午夜激情网页| 欧美在线亚洲综合一区| 欧美不卡一区| 99精品视频免费全部在线| 亚洲一区二区在线观看视频| 欧美亚洲免费高清在线观看| 久久这里有精品15一区二区三区| 欧美精品在线看| 国产欧美在线观看| 在线免费精品视频| 亚洲一二三级电影| 久久久久久穴| 亚洲人成在线观看一区二区| 亚洲欧美成人一区二区在线电影| 久久精品中文字幕一区| 欧美日韩国产bt| 国产亚洲精品aa| 亚洲理论在线观看| 欧美一级艳片视频免费观看| 欧美大尺度在线| 在线视频亚洲欧美| 噜噜噜久久亚洲精品国产品小说| 国产精品电影网站| 亚洲高清资源| 久久不见久久见免费视频1| 亚洲福利一区| 午夜精品福利在线| 欧美精品色综合| 国产日韩欧美亚洲| 一区二区三区欧美日韩| 老司机一区二区三区| 日韩一级在线观看| 久久久www| 国产精品久久波多野结衣| 亚洲国产高清一区二区三区| 亚洲欧美中文另类| 亚洲欧洲日本一区二区三区| 午夜国产精品视频| 欧美日韩国产成人在线| 亚洲二区免费| 久久se精品一区二区| 亚洲最快最全在线视频| 免费亚洲一区二区| 国产一区清纯| 亚洲一区二区在线视频| 亚洲国产精品v| 久久久久九九视频| 国产亚洲精品久久久久婷婷瑜伽| 亚洲一级在线| 亚洲精品久久久久久一区二区| 久久夜色精品国产噜噜av| 国产亚洲毛片在线| 香蕉av福利精品导航| 夜色激情一区二区| 欧美韩国一区| 亚洲激情中文1区| 久久综合成人精品亚洲另类欧美| 午夜精品福利一区二区三区av| 国产精品扒开腿爽爽爽视频 | 欧美激情一区二区三区蜜桃视频 | 午夜精品久久久久久| 亚洲剧情一区二区| 欧美二区乱c少妇| 亚洲第一区中文99精品| 美女久久一区| 久久不见久久见免费视频1| 国产精品一区二区三区乱码| 亚洲男女自偷自拍| 一本色道久久| 欧美日韩一区视频| 亚洲影院高清在线| 亚洲调教视频在线观看| 欧美日韩裸体免费视频| 一区二区三区波多野结衣在线观看| 欧美激情视频一区二区三区免费| 久久综合伊人| 亚洲国产99| 欧美激情综合色| 欧美高清视频一区二区| 亚洲精品日韩综合观看成人91| 欧美黄色免费网站| 欧美国产精品va在线观看| 亚洲片在线观看| 亚洲美女av黄| 国产精品扒开腿做爽爽爽软件| 亚洲制服av| 亚洲欧美日韩国产一区| 国内精品久久久久影院色| 久久婷婷蜜乳一本欲蜜臀| 久久久水蜜桃| 亚洲国产一区二区视频| 亚洲激情av在线| 欧美性片在线观看| 欧美综合二区| 久久久久久香蕉网| 亚洲黑丝一区二区| 亚洲伦伦在线| 国产精品视频成人| 久久综合久色欧美综合狠狠 | 欧美亚洲成人免费| 久久精品99国产精品| 久久一区二区三区国产精品| 亚洲欧洲一区二区在线播放| 99re66热这里只有精品3直播| 国产精品日韩欧美一区| 久久香蕉国产线看观看av| 欧美高清一区二区| 亚洲欧美区自拍先锋| 久久se精品一区精品二区| 亚洲高清在线观看一区| 日韩一级黄色av| 国产日韩1区| 亚洲第一页在线| 国产精品videosex极品| 久久久欧美一区二区| 欧美精品日日鲁夜夜添| 午夜日韩av| 美女图片一区二区| 亚洲私人影吧| 久久精品中文字幕一区二区三区| 亚洲精品少妇网址| 亚洲欧美日韩精品久久久久| 亚洲国产精品视频| 亚洲一区二区免费在线| 亚洲黄色免费电影| 亚洲男女自偷自拍| 亚洲肉体裸体xxxx137| 亚洲一区免费| 亚洲精选视频在线| 香蕉久久夜色精品国产使用方法| 亚洲人体一区| 性高湖久久久久久久久| 一区二区av| 久久久九九九九| 亚洲伊人观看| 欧美成人一区二区| 久久精品一区二区国产| 欧美日韩激情网| 蜜桃av一区| 国产精品自拍小视频| 亚洲精品社区| 亚洲福利av| 亚洲欧美综合v| 一区二区三区国产精华| 蜜臀99久久精品久久久久久软件| 欧美一区二区三区在线免费观看| 欧美国产综合视频| 免费毛片一区二区三区久久久| 国产精品自拍三区| 日韩一级裸体免费视频| 亚洲人体偷拍| 老妇喷水一区二区三区| 久久久999精品免费| 国产精品激情| 99av国产精品欲麻豆| 亚洲三级电影在线观看| 久久人人爽人人爽| 久久久久国产一区二区三区| 国产精品久久久久久久久免费| 亚洲国产一区二区三区a毛片| 狠狠色综合网| 久久er99精品| 欧美在线观看你懂的| 欧美亚一区二区| 亚洲最新在线| 在线亚洲成人| 欧美日韩亚洲另类| 亚洲巨乳在线| 一区二区三区高清不卡| 欧美久久99| 亚洲精品永久免费精品| 亚洲精品综合精品自拍| 米奇777超碰欧美日韩亚洲| 久久综合福利| 伊人久久大香线蕉综合热线| 久久精品99国产精品日本| 久久久99国产精品免费| 国内揄拍国内精品久久|