• <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>

            大龍的博客

            常用鏈接

            統(tǒng)計

            最新評論

            Don’t Use the Win32 API PostThreadMessage() to Post Messages to UI Threads(翻譯)

            Don’t Use the Win32 API PostThreadMessage() to Post Messages to UI Threads
              不要用Win32 API PostThreadMessage()向UI線程發(fā)送消息。
              
              PostThreadMessage is a Win32 API used to post messages to threads. Usually, the message posted is a standard windows message with the window handle set to NULL.
              PostThreadMessage是一個Win32 API常用于向線程發(fā)送消息。通常,這個被發(fā)送的消息是個窗口句柄被設為NULL的,標準的窗口消息。
              When PostThreadMessage is used to post messages to a thread that has created a window, it is very likely that the posted messages will be lost. This is because UI threads are not always run by the primary message loop. For example, when a thread is showing a message box, it is running on the message loop supplied by the message box. This secondary message loop does not know how to handle the thread message (since its window handle is NULL) and it will be dropped.
              當你將PostThreadMessage用于向一個創(chuàng)建窗口的線程發(fā)送消息,結果這個消息很可能會丟失。這是因為UI線程并非總是在一級消息循環(huán)中。例如,當一個線程正顯示一個消息對話框,它就運行在這個消息對話框提供的(代理的)消息循環(huán)中。這個二級消息循環(huán)不知如何處理這個線程消息(因為其窗口句柄是NULL)所以它會被放棄。
              So when posting messages to a UI threads, use PostMessage() instead and post messages to a window owned by that thread. Then the messages won’t be lost, even if the thread is running a secondary message loop.
              因此,當要發(fā)送一個消息給UI線程,就用PostMessage()作替代并向線程自己的窗口發(fā)消息。這樣消息就不會被丟失,即便這個消息是運行在二級消息循環(huán)中。

            posted on 2009-04-22 11:37 大龍 閱讀(739) 評論(0)  編輯 收藏 引用

            国产精品九九久久免费视频 | 亚洲伊人久久精品影院| 久久久精品人妻一区二区三区蜜桃| 伊色综合久久之综合久久| 18禁黄久久久AAA片| 久久精品国产亚洲AV香蕉| 亚洲国产精品久久电影欧美| 国产精品久久久久久福利漫画| 国产精品永久久久久久久久久| 久久婷婷人人澡人人爽人人爱| 波多野结衣中文字幕久久| 欧美粉嫩小泬久久久久久久| 日韩AV无码久久一区二区 | 久久99精品国产麻豆宅宅| 国内精品久久久久久久97牛牛 | 色综合久久久久综合99| 精品久久久久久国产潘金莲| 日韩影院久久| 国产亚洲精久久久久久无码AV| 777午夜精品久久av蜜臀| 精品久久久久久久久久中文字幕| 久久亚洲中文字幕精品有坂深雪| 久久久99精品一区二区| 丁香五月网久久综合| 五月丁香综合激情六月久久| 亚州日韩精品专区久久久| 色综合久久中文色婷婷| AV无码久久久久不卡网站下载 | 伊人久久大香线蕉精品| 国产亚洲精品美女久久久| 久久国产亚洲精品| 久久乐国产综合亚洲精品| 亚洲国产成人精品女人久久久 | 亚洲伊人久久成综合人影院 | 久久97久久97精品免视看| 久久九九有精品国产23百花影院| 久久精品夜夜夜夜夜久久| 婷婷久久久亚洲欧洲日产国码AV | 久久超碰97人人做人人爱| 一本色综合网久久| 色综合久久久久无码专区|