• <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)  編輯 收藏 引用

            无码精品久久一区二区三区| 色播久久人人爽人人爽人人片aV| 亚洲欧美日韩中文久久| 日本强好片久久久久久AAA| 国产成人无码久久久精品一| 国产精品九九久久免费视频 | 欧美精品丝袜久久久中文字幕| 久久无码人妻精品一区二区三区| 97香蕉久久夜色精品国产 | segui久久国产精品| 久久久噜噜噜久久中文字幕色伊伊 | 国产精品青草久久久久婷婷 | 久久综合给久久狠狠97色| 国产午夜精品久久久久九九| 亚洲中文字幕无码一久久区| 99久久免费只有精品国产| 亚洲国产精品无码久久98| 亚洲国产成人久久一区久久| 久久久精品一区二区三区| 午夜不卡久久精品无码免费| 久久久噜噜噜久久中文字幕色伊伊| 久久精品欧美日韩精品| 亚洲精品成人久久久| 久久国产美女免费观看精品| 久久99精品国产麻豆宅宅| 亚洲日本va中文字幕久久| 亚洲欧美精品一区久久中文字幕| 亚洲国产精品一区二区久久| 久久最新精品国产| 久久91精品国产91久久小草| 国产成年无码久久久久毛片| 久久亚洲精品中文字幕| 亚洲欧美成人综合久久久| 久久无码AV中文出轨人妻| 一本大道久久香蕉成人网| 欧美麻豆久久久久久中文| 久久强奷乱码老熟女| 国产69精品久久久久APP下载| 亚洲色欲久久久久综合网| 人人妻久久人人澡人人爽人人精品| 一本久久免费视频|