Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 22nd, 2006, 12:25 AM   #11
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 825
Rep Power: 4 The Dark is on a distinguished road
or straight from the horses mouth
The Dark is offline   Reply With Quote
Old Mar 22nd, 2006, 10:30 PM   #12
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
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?
Writlaus is offline   Reply With Quote
Old Mar 23rd, 2006, 2:51 AM   #13
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by Writlaus
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?
Yes, you are wrong, there is none. MSDN is as close as you get.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Mar 23rd, 2006, 4:48 AM   #14
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
I've found some functions on there, but I can't find any definitions of events. Could someone help me there?
Writlaus is offline   Reply With Quote
Old Mar 23rd, 2006, 5:33 AM   #15
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
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
nnxion is offline   Reply With Quote
Old Mar 24th, 2006, 1:33 AM   #16
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
Ah right, sorry about that.
Writlaus is offline   Reply With Quote
Old Mar 24th, 2006, 3:04 AM   #17
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,208
Rep Power: 5 grumpy is on a distinguished road
Quote:
Originally Posted by nnxion
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.
A windows message is not an event. A windows message is received by the application (and routed to an appropriate message handler) when an event occurs .... or at some, usually small, time interval after the event occurs.

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).
grumpy is offline   Reply With Quote
Old Mar 24th, 2006, 4:29 AM   #18
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by grumpy
A windows message is not an event. A windows message is received by the application (and routed to an appropriate message handler) when an event occurs .... or at some, usually small, time interval after the event occurs.

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).
So the real event a hardware interrupt?
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Mar 24th, 2006, 5:25 AM   #19
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,208
Rep Power: 5 grumpy is on a distinguished road
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.
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC