91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

TranslateMessage ,GetMessage, DispatchMessage分析

小億
80
2024-01-02 18:41:23
欄目: 編程語言

TranslateMessage, GetMessage, DispatchMessage are all functions used in Windows programming to handle messages in a message loop.

  1. TranslateMessage: This function is used to translate virtual-key messages into character messages. This function typically processes keyboard input. It checks if the message is a WM_KEYDOWN or WM_KEYUP message and translates it into WM_CHAR messages which represent the corresponding character for the key pressed.

  2. GetMessage: This function retrieves a message from the message queue of the calling thread. It blocks the thread until a message is available. The function retrieves a message from the thread’s message queue and stores it in the specified structure. It also checks if the retrieved message is a quit message (WM_QUIT) and if so, it terminates the message loop.

  3. DispatchMessage: This function dispatches a message to a window procedure. It sends the message to the appropriate window procedure for processing. The window procedure then handles the message and performs the necessary actions based on the message type. This function is typically called after GetMessage to dispatch the retrieved message to the appropriate window procedure for processing.

Overall, these functions work together in a typical message loop to handle messages in a Windows program. The TranslateMessage function is used to process keyboard input, the GetMessage function retrieves messages from the message queue, and the DispatchMessage function dispatches the retrieved message to the appropriate window procedure for processing.

0
舟曲县| 眉山市| 潍坊市| 东山县| 开封县| 赣州市| 临漳县| 永泰县| 定陶县| 闻喜县| 屏山县| 宁武县| 贵阳市| 乌什县| 阳泉市| 黄梅县| 云霄县| 中江县| 工布江达县| 武冈市| 大荔县| 永善县| 萨迦县| 仁怀市| 秭归县| 沙河市| 天气| 香格里拉县| 阳高县| 广宗县| 教育| 汉源县| 乐平市| 昌江| 儋州市| 霍邱县| 宁夏| 苍梧县| 三河市| 镇远县| 葫芦岛市|