![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 825
Rep Power: 4
![]() |
or straight from the horses mouth
|
|
|
|
|
|
#12 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
Thanks, but none of those links led me to any complete reference for win32. There has to be some complete reference somewhere, am I wrong?
|
|
|
|
|
|
#13 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#14 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
I've found some functions on there, but I can't find any definitions of events. Could someone help me there?
|
|
|
|
|
|
#15 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Grumpy answered your question on events already, in Windows those events are called messages. Hence your message loop. If you mean something else, please state so.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#16 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
Ah right, sorry about that.
|
|
|
|
|
|
#17 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,208
Rep Power: 5
![]() |
Quote:
However, the message handler is often referred to as an event handler as it is the code in which the application responds to the content of the message, and the content of the message describes the original event (eg a mouse click, application close event, keyboard event, etc etc). |
|
|
|
|
|
|
#18 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#19 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,208
Rep Power: 5
![]() |
The "real event" is any occurence of significance.
As far as the machine is concerned, the real event might be a hardware interrupt because that is the first time the machine can detect that an event has occurred. In the real world, most events occur in clusters. Let's assume that the mouse cursor is visible over a button. A user thinks "I want the action corresponding to the caption on that button to occur". That is an event. Associated with that event is a series of electrical and chemical changes in the brain. Each of those changes is an event. Following that sequence, some neuron (nerve cell) is stimulated so it stimulates another nerve cell. And so on, until a set of muscles in the hand or arm are stimulated to contract. Another set of events, as several muscle fibres are involved. As a result, a certain finger moves and applies pressure to the left mouse button. Another event. An electrical connection is made in the mouse, and an electrical signal is sent to the computer. Another event. As a result, a hardware interrupt is triggered. Another event. Another sequence of events occur, in which the brain triggers a set of neurons again, and the finger lifts off the mouse button, and the electrical connection is lost in the mouse. Another hardware event is triggered. Each of those hardware interrupts trigger responses within the operating system, and two messages (corresponding to button up and button down) are eventually routed to a running application. That application routes those messages to a message handler which processes them ....... In this sequence, which is the "real event"? The answer is that they are all real events. If I don't decide to press a button, the message handler will never be invoked. Similarly, if the mouse is faulty, and an appropriate electrical connection is not made when I press and release the button, then the message hander will never be invoked. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|