In John Montenigro's last post he mentioned questions about messages.
Even after reading (a lot) recently on the topic, I also seem to be missing a few points that would help me understand how messages and PowerBASIC interact.
Like John, I'd rather read about it first, then post questions so that I'm asking from a position of having worked on it first, rather than abusing the help of the folks here.
But his post flagged my ongoing lack of having read the right materials to complete my understanding of the topic.
So I decided to write this message more to help me clarify what questions I'm trying to answer on my own, rather than ask for any detailed responses.
As I understand it, here's the list of procedures in the loop:
1. subclassing redirected window procedure (if used)
2. control callback function
3. dialog callback function
4. DDT default callback funciton
5. window procedure for the dialog/control class
6. Windows OS default window procedure
And here are the kinds of questions I'm still looking for answers in the online documentation. (I've order a couple of the books I've seen recommended, so I'm hoping they will help out).
1. Is the procedure list above a complete/correct list of procedures that are involved?
2. Which notifications and messages documented for classes on MSDN, are available to the procedures on the list, and in what order (especially if a subclassed control is involved)? Why aren't all MSDN notifications available to one of my dialogs/controls? Does the window procedure for the control class selectively allow some notifications/messages through to my own callback functions?
3. Are some notifications/messages not received by a PB dialog or child control? If not, why is that? How would we know which ones are or are not available for processing within our PB app?
4. Does a PB app shield the dialog/control callbacks from any messages received by the PB app (such as via the DDT engine default callback function)?
5. This seems true: All messages sent by the Windows OS to a window control/dialog) are not normally available in their corresponding PB callback function, else there wouldn't be a need for subclassing.
6. Once a PB callback does what it wants, and returns TRUE, what does PB do with the message? Does it call the default window class procedure for the control/dialog window class for further processing? If so, what does the default window procedure do? Nothing, or does it simply do more if False is returned and less if True is returned?
9. Does the DDT engine default callback procedure actually do anything, of does it simply call the window procedure of the window class for the control/dialog?
10. Is there some kind of "app" level message processing added by the compiler? Or is each dialog a separate entity that processes it's own messages? Perhaps the compiler adds a default callback to each dialog?
I wrote this message more to help me clarify what questions I'm trying to answer on my own, rather than ask for any detailed responses.
However, if there's an apparent fundamental point of misunderstanding that my questions highlight, I'd appreciate feedback.
Dominic had read a (wrong) comment I made and was going to provide some clarification. I'm looking forward to his, and any other comments that seem appropriate.
In the meantime, I'll keep reading/experimenting until I get past the questions I've raised.
Even after reading (a lot) recently on the topic, I also seem to be missing a few points that would help me understand how messages and PowerBASIC interact.
Like John, I'd rather read about it first, then post questions so that I'm asking from a position of having worked on it first, rather than abusing the help of the folks here.
But his post flagged my ongoing lack of having read the right materials to complete my understanding of the topic.
So I decided to write this message more to help me clarify what questions I'm trying to answer on my own, rather than ask for any detailed responses.
As I understand it, here's the list of procedures in the loop:
1. subclassing redirected window procedure (if used)
2. control callback function
3. dialog callback function
4. DDT default callback funciton
5. window procedure for the dialog/control class
6. Windows OS default window procedure
And here are the kinds of questions I'm still looking for answers in the online documentation. (I've order a couple of the books I've seen recommended, so I'm hoping they will help out).
1. Is the procedure list above a complete/correct list of procedures that are involved?
2. Which notifications and messages documented for classes on MSDN, are available to the procedures on the list, and in what order (especially if a subclassed control is involved)? Why aren't all MSDN notifications available to one of my dialogs/controls? Does the window procedure for the control class selectively allow some notifications/messages through to my own callback functions?
3. Are some notifications/messages not received by a PB dialog or child control? If not, why is that? How would we know which ones are or are not available for processing within our PB app?
4. Does a PB app shield the dialog/control callbacks from any messages received by the PB app (such as via the DDT engine default callback function)?
5. This seems true: All messages sent by the Windows OS to a window control/dialog) are not normally available in their corresponding PB callback function, else there wouldn't be a need for subclassing.
6. Once a PB callback does what it wants, and returns TRUE, what does PB do with the message? Does it call the default window class procedure for the control/dialog window class for further processing? If so, what does the default window procedure do? Nothing, or does it simply do more if False is returned and less if True is returned?
9. Does the DDT engine default callback procedure actually do anything, of does it simply call the window procedure of the window class for the control/dialog?
10. Is there some kind of "app" level message processing added by the compiler? Or is each dialog a separate entity that processes it's own messages? Perhaps the compiler adds a default callback to each dialog?
I wrote this message more to help me clarify what questions I'm trying to answer on my own, rather than ask for any detailed responses.
However, if there's an apparent fundamental point of misunderstanding that my questions highlight, I'd appreciate feedback.
Dominic had read a (wrong) comment I made and was going to provide some clarification. I'm looking forward to his, and any other comments that seem appropriate.
In the meantime, I'll keep reading/experimenting until I get past the questions I've raised.
Comment