• <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 大龍 閱讀(744) 評論(0)  編輯 收藏 引用

            亚洲va中文字幕无码久久不卡| 亚洲人成网亚洲欧洲无码久久| 久久精品国产半推半就| 99久久国产主播综合精品| 亚洲精品NV久久久久久久久久| 久久精品国产亚洲77777| 88久久精品无码一区二区毛片 | 久久久久久久精品妇女99| 精品无码久久久久久尤物| 亚洲精品高清一二区久久| 久久久婷婷五月亚洲97号色 | 久久亚洲AV无码精品色午夜麻豆| 久久91综合国产91久久精品| 2021国内久久精品| 国产成人综合久久久久久| 色欲久久久天天天综合网| 深夜久久AAAAA级毛片免费看| 久久精品这里热有精品| 欧美一区二区三区久久综| 久久这里都是精品| 伊人久久亚洲综合影院| 合区精品久久久中文字幕一区| 99久久国产亚洲高清观看2024 | 精品国产乱码久久久久久郑州公司 | 日本免费久久久久久久网站| 久久偷看各类wc女厕嘘嘘| 99精品国产免费久久久久久下载| 久久中文字幕一区二区| 中文精品久久久久国产网址 | 18禁黄久久久AAA片| 亚洲国产高清精品线久久 | 久久久久久精品无码人妻| 思思久久99热只有频精品66| 香蕉99久久国产综合精品宅男自 | 曰曰摸天天摸人人看久久久| 狠狠综合久久AV一区二区三区| 久久精品?ⅴ无码中文字幕| 久久国产精品一区二区| 99久久精品日本一区二区免费| 77777亚洲午夜久久多人| 亚洲中文字幕久久精品无码APP|