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

            大龍的博客

            常用鏈接

            統計

            最新評論

            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線程發送消息。
              
              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常用于向線程發送消息。通常,這個被發送的消息是個窗口句柄被設為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用于向一個創建窗口的線程發送消息,結果這個消息很可能會丟失。這是因為UI線程并非總是在一級消息循環中。例如,當一個線程正顯示一個消息對話框,它就運行在這個消息對話框提供的(代理的)消息循環中。這個二級消息循環不知如何處理這個線程消息(因為其窗口句柄是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.
              因此,當要發送一個消息給UI線程,就用PostMessage()作替代并向線程自己的窗口發消息。這樣消息就不會被丟失,即便這個消息是運行在二級消息循環中。

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

            久久男人AV资源网站| 精品熟女少妇AV免费久久| 狠狠色丁香久久婷婷综| 久久ww精品w免费人成| 国产99久久久国产精免费| 久久久久一级精品亚洲国产成人综合AV区| 久久久久久久亚洲精品| 久久久无码人妻精品无码| 精品无码久久久久久久动漫| 婷婷国产天堂久久综合五月| 久久这里只有精品久久| 亚洲精品午夜国产va久久| 色综合久久中文综合网| 国产成人无码精品久久久性色 | 久久99精品国产麻豆不卡| 久久婷婷五月综合97色直播| 中文字幕亚洲综合久久2| 亚洲国产精品无码久久久秋霞2| 99久久伊人精品综合观看| 97久久精品人妻人人搡人人玩 | 久久亚洲国产最新网站| 久久香蕉国产线看观看99| 777午夜精品久久av蜜臀| 久久久久黑人强伦姧人妻| 精品久久久久香蕉网| 国产激情久久久久久熟女老人| 蜜臀久久99精品久久久久久| 亚洲综合久久综合激情久久| 1000部精品久久久久久久久| 亚洲成色www久久网站夜月| 久久香综合精品久久伊人| 理论片午午伦夜理片久久 | 亚洲国产欧美国产综合久久| 久久夜色精品国产噜噜亚洲a| 久久夜色精品国产亚洲av| 国产精品久久久99| 久久国产成人| 久久91精品国产91久| 久久人人爽人人爽人人片AV麻烦| 一本色综合久久| 蜜臀av性久久久久蜜臀aⅴ |