Board.KolibriOS.org
https://board.kolibrios.org/

Message Loop
https://board.kolibrios.org/viewtopic.php?f=23&t=799
Page 1 of 1

Author:  makedon [ Sun Aug 19, 2007 12:32 pm ]
Post subject:  Message Loop

Здравство и Богатсво !

Как изгледа ситуацийта на имплементиранйе на "Мессаге Пумпе Сустем" во Колибриос.

По мой вид еден Евент Сустем со Мессаге Пумпе не е имплементиран во Колибриос !

Еден Пример как Мессаге Пумпе кай Виндовс функтионира.

http://win32assembly.online.fr/tut3.html

Quote:
.WHILE TRUE
invoke GetMessage, ADDR msg,NULL,0,0
.BREAK .IF (!eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
.ENDW

At this time, our window is up on the screen. But it cannot receive input from the world. So we have to *inform* it of relevant events. We accomplish this with a message loop. There's only one message loop for each module. This message loop continually checks for messages from Windows with GetMessage call. GetMessage passes a pointer to a MSG structure to Windows. This MSG structure will be filled with information about the message that Windows want to send to a window in the module. GetMessage function will not return until there's a message for a window in the module. During that time, Windows can give control to other programs. This is what forms the cooperative multitasking scheme of Win16 platform. GetMessage returns FALSE if WM_QUIT message is received which, in the message loop, will terminate the loop and exit the program.
TranslateMessage is a utility function that takes raw keyboard input and generates a new message (WM_CHAR) that is placed on the message queue. The message with WM_CHAR contains the ASCII value for the key pressed, which is easier to deal with than the raw keyboard scan codes. You can omit this call if your program doesn't process keystrokes.
DispatchMessage sends the message data to the window procedure responsible for the specific window the message is for.

Author:  turbanoff [ Thu Aug 23, 2007 6:50 pm ]
Post subject: 

давайте договоримся постить по-русски, или (за не знанием онного) хотя бы как минимум по-английски

Author:  makedon [ Wed Sep 05, 2007 11:25 pm ]
Post subject: 

davajte govorite malko poveke makedonski !
Ne se pravejte tolko prosti majko moja ;-) !

But before you all start Crying here
the question is how much of such EVENTS like here as example will be one day implemented in KOS !

http://www.codeproject.com/dialog/messagehandling.asp

http://msdn2.microsoft.com/en-us/library/ms645616.aspx

Code:
WM_CAPTURECHANGED

WM_LBUTTONDBLCLK
WM_MBUTTONDBLCLK

WM_LBUTTONDOWN
WM_MBUTTONDOWN

WM_LBUTTONUP
WM_MBUTTONUP
   
WM_MOUSEACTIVATE

WM_MOUSEHOVER

WM_MOUSEHWHEEL
WM_MOUSEWHEEL
WM_MOUSELEAVE

WM_MOUSEMOVE
....
.......
...........

Page 1 of 1 All times are UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/