Page 1 of 1

Message Loop

Posted: Sun Aug 19, 2007 12:32 pm
by makedon
Здравство и Богатсво !

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

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

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

http://win32assembly.online.fr/tut3.html
.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.

Posted: Thu Aug 23, 2007 6:50 pm
by turbanoff
давайте договоримся постить по-русски, или (за не знанием онного) хотя бы как минимум по-английски

Posted: Wed Sep 05, 2007 11:25 pm
by makedon
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: Select all

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