久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='qwoZA'></bdo><ul id='qwoZA'></ul>

      <i id='qwoZA'><tr id='qwoZA'><dt id='qwoZA'><q id='qwoZA'><span id='qwoZA'><b id='qwoZA'><form id='qwoZA'><ins id='qwoZA'></ins><ul id='qwoZA'></ul><sub id='qwoZA'></sub></form><legend id='qwoZA'></legend><bdo id='qwoZA'><pre id='qwoZA'><center id='qwoZA'></center></pre></bdo></b><th id='qwoZA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qwoZA'><tfoot id='qwoZA'></tfoot><dl id='qwoZA'><fieldset id='qwoZA'></fieldset></dl></div>

      <small id='qwoZA'></small><noframes id='qwoZA'>

    1. <tfoot id='qwoZA'></tfoot>
      <legend id='qwoZA'><style id='qwoZA'><dir id='qwoZA'><q id='qwoZA'></q></dir></style></legend>

      1. 鍵盤輸入Win32 消息循環

        Keyboard Input amp; the Win32 message loop(鍵盤輸入Win32 消息循環)
        • <i id='L78x1'><tr id='L78x1'><dt id='L78x1'><q id='L78x1'><span id='L78x1'><b id='L78x1'><form id='L78x1'><ins id='L78x1'></ins><ul id='L78x1'></ul><sub id='L78x1'></sub></form><legend id='L78x1'></legend><bdo id='L78x1'><pre id='L78x1'><center id='L78x1'></center></pre></bdo></b><th id='L78x1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='L78x1'><tfoot id='L78x1'></tfoot><dl id='L78x1'><fieldset id='L78x1'></fieldset></dl></div>

        • <tfoot id='L78x1'></tfoot><legend id='L78x1'><style id='L78x1'><dir id='L78x1'><q id='L78x1'></q></dir></style></legend>

              • <bdo id='L78x1'></bdo><ul id='L78x1'></ul>

                <small id='L78x1'></small><noframes id='L78x1'>

                    <tbody id='L78x1'></tbody>

                1. 本文介紹了鍵盤輸入Win32 消息循環的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何處理 Windows 消息循環中的按鍵和按鍵事件?我需要能夠調用兩個函數 OnKeyUp(char c);OnKeyDown(char c);.

                  How do I handle key presses and key up events in the windows message loop? I need to be able to call two functions OnKeyUp(char c); and OnKeyDown(char c);.

                  我從谷歌搜索中發現的當前文獻讓我對 WM_CHAR 或 WM_KEYUP 和 WM_KEYDOWN 感到困惑,并且通常針對 PDA 或托管代碼,而我使用的是 C++.

                  Current literature I've found from googling has lead me to confusion over WM_CHAR or WM_KEYUP and WM_KEYDOWN, and is normally targeted at PDA or Managed code, whereas I'm using C++.

                  推薦答案

                  使用char c = MapVirtualKey(param,MAPVK_VK_TO_CHAR);將虛擬鍵碼轉換為char,并處理WM_KEYUP和WM_KEYDOWN及其wParams.

                  Use char c = MapVirtualKey(param,MAPVK_VK_TO_CHAR); to convert virtual key codes to char, and process WM_KEYUP and WM_KEYDOWN and their wParams.

                  if (PeekMessage (&mssg, hwnd, 0, 0, PM_REMOVE))
                  {
                      switch (mssg.message)
                      {
                          case WM_QUIT:
                              PostQuitMessage (0);
                              notdone = false;
                              quit = true;
                              break;
                  
                          case WM_KEYDOWN:
                              WPARAM param = mssg.wParam;
                              char c = MapVirtualKey (param, MAPVK_VK_TO_CHAR);
                              this->p->Input ()->Keyboard ()->Listeners ()->OnKeyDown (c);
                              break;
                  
                          case WM_KEYUP:
                              WPARAM param = mssg.wParam;
                              char c = MapVirtualKey (param, MAPVK_VK_TO_CHAR);
                              this->p->Input ()->Keyboard ()->Listeners ()->OnKeyUp (c);
                              break;
                      }
                      // dispatch the message
                      TranslateMessage (&mssg);
                      DispatchMessage (&mssg);
                  }
                  

                  這篇關于鍵盤輸入Win32 消息循環的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  In what ways do C++ exceptions slow down code when there are no exceptions thown?(當沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                  Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                  When and how should I use exception handling?(我應該何時以及如何使用異常處理?)
                  Scope of exception object in C++(C++中異常對象的范圍)
                  Catching exceptions from a constructor#39;s initializer list(從構造函數的初始化列表中捕獲異常)
                  Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區別)
                    <tbody id='rmgG8'></tbody>
                    <bdo id='rmgG8'></bdo><ul id='rmgG8'></ul>
                    <legend id='rmgG8'><style id='rmgG8'><dir id='rmgG8'><q id='rmgG8'></q></dir></style></legend>
                  • <i id='rmgG8'><tr id='rmgG8'><dt id='rmgG8'><q id='rmgG8'><span id='rmgG8'><b id='rmgG8'><form id='rmgG8'><ins id='rmgG8'></ins><ul id='rmgG8'></ul><sub id='rmgG8'></sub></form><legend id='rmgG8'></legend><bdo id='rmgG8'><pre id='rmgG8'><center id='rmgG8'></center></pre></bdo></b><th id='rmgG8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rmgG8'><tfoot id='rmgG8'></tfoot><dl id='rmgG8'><fieldset id='rmgG8'></fieldset></dl></div>

                      • <tfoot id='rmgG8'></tfoot>

                        <small id='rmgG8'></small><noframes id='rmgG8'>

                          • 主站蜘蛛池模板: 欧美人妖网站 | 国产成人精品午夜 | 成人精品系列 | 午夜视频网站 | 欧美日韩久久精品 | 北条麻妃国产九九九精品小说 | 亚洲欧美日本在线 | 日韩三区在线观看 | 日韩欧美第一页 | 日韩高清av | 国产三区精品 | 欧美看片 | 国际精品久久 | 国产美女在线精品免费 | 精品一区av | 97精品超碰一区二区三区 | 99精品网 | 午夜免费在线 | 中文字幕在线第一页 | 涩色视频在线观看 | 国产精品久久 | 国产精品免费一区二区三区四区 | 亚洲高清免费视频 | 国产精品一区二区欧美 | 日日噜噜噜夜夜爽爽狠狠视频97 | 国产精品一区二区久久久久 | 蜜桃视频在线观看免费视频网站www | 国产日韩久久 | 久久人 | 99久久电影 | 99久久视频 | 久久99视频这里只有精品 | 91在线观看视频 | 超碰在线人人 | 亚洲人成网亚洲欧洲无码 | 亚洲免费三区 | 亚洲网站观看 | 一区二区日本 | 亚洲成人日韩 | 奇米超碰 | 亚洲一区二区在线免费观看 |