F# High Performance by Eriawan Kusumawardhono

F# High Performance by Eriawan Kusumawardhono

Author:Eriawan Kusumawardhono [Kusumawardhono, Eriawan]
Language: eng
Format: azw3, mobi, pdf
Publisher: Packt Publishing
Published: 2017-01-17T16:00:00+00:00


Note

The term message in this message loop is different from the message in a message queue: the message is an encapsulation of a known system event to ease communication of system events. It always happens in loops and can be in the form of a looping queue (circular queue), instead of a queue in a message agent that does not operate in a loop (open ended queue).

For more information about the Windows message loop of Windows API, consult the MSDN Library at:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms644927(v=vs.85).aspx

It is common in Windows API to have this message loop of calling GetMessage, coded like this (this code is in C++):

while(GetMessage( &msg, hWnd, 0, 0) != 0) { if (bRet == -1) { // handle the error and possibly exit } else { TranslateMessage(&msg); DispatchMessage(&msg); } }

The preceding code will always loop by examining any incoming Windows WM_XXX messages. It will end the loop if there are implied errors, especially system errors. This common practice is also used in built-in Windows applets, such as the applets in the Control Panel (compiled as .cpl).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.