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

            S.l.e!ep.¢%

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

            MSDN 中的 MessageLoop

            Posted on 2009-05-01 22:00 S.l.e!ep.¢% 閱讀(330) 評論(0)  編輯 收藏 引用 所屬分類: MulThreads

            int MessageLoop (
            HANDLE* lphObjects, // handles that need to be waited on
            int cObjects // number of handles to wait on
            )
            {
            // The message loop lasts until we get a WM_QUIT message,
            // upon which we shall return from the function.
            while (TRUE)
            {
            // block-local variable
            DWORD result ;
            MSG msg ;

            // Read all of the messages in this next loop,
            // removing each message as we read it.
            while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
            {
            // If it is a quit message, exit.
            if (msg.message == WM_QUIT)
            return 1;
            // Otherwise, dispatch the message.
            DispatchMessage(&msg);
            } // End of PeekMessage while loop.

            // Wait for any message sent or posted to this queue
            // or for one of the passed handles be set to signaled.
            result = MsgWaitForMultipleObjects(cObjects, lphObjects,
            FALSE, INFINITE, QS_ALLINPUT);

            // The result tells us the type of event we have.
            if (result == (WAIT_OBJECT_0 cObjects))
            {
            // New messages have arrived.
            // Continue to the top of the always while loop to
            // dispatch them and resume waiting.
            continue;
            }
            else
            {
            // One of the handles became signaled.
            DoStuff (result - WAIT_OBJECT_0) ;
            } // End of else clause.
            } // End of the always while loop.
            } // End of function.

            ?

            久久亚洲精品视频| 久久九九青青国产精品| 久久久青草青青国产亚洲免观| 免费观看久久精彩视频| 国产午夜精品久久久久九九电影| 99久久国产免费福利| 青青草原综合久久大伊人| 久久久精品人妻一区二区三区四| 色综合久久中文综合网| 污污内射久久一区二区欧美日韩| 无码伊人66久久大杳蕉网站谷歌| 99久久伊人精品综合观看| 伊人久久综合成人网| 国产成人久久精品麻豆一区 | 国产毛片久久久久久国产毛片| 性做久久久久久久久久久| 成人久久久观看免费毛片| 免费一级欧美大片久久网| 国产精品久久久久久福利69堂| 综合久久给合久久狠狠狠97色 | 久久人妻少妇嫩草AV无码蜜桃| 亚洲精品乱码久久久久久蜜桃不卡| 国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 亚洲精品久久久www| 大伊人青草狠狠久久| 精品国产青草久久久久福利| 人妻系列无码专区久久五月天| 国产精品欧美久久久天天影视| 色综合久久综合中文综合网| 久久91精品国产91久| 一本综合久久国产二区| 久久国产成人午夜aⅴ影院| 99re这里只有精品热久久| 久久综合综合久久综合| 亚洲人成伊人成综合网久久久| 国产精品久久新婚兰兰| 久久亚洲精品无码观看不卡| 一本大道加勒比久久综合| 国产精品青草久久久久婷婷 | 亚洲国产一成久久精品国产成人综合 | 97r久久精品国产99国产精|