[lazarus] This should get me much closer, but still questions :^(

Jeffrey A. Wormsley daworm at cdc.net
Tue Aug 10 19:24:50 EDT 1999


I think I am getting somewhere now, thanks to everyone's patience.  See if
I am following things correctly as per your views on things...

Steps following LM_CREATE

1. If I have not yet registered a window class, do so with RegisterClass or
RegisterClassEx and the WNDCLASS or WNDCLASSEX structure.  

Q. Do I need more than one window class?  If so, I will need a unique
window procedure for each class, correct?

2. Create a window handle with CreateWindow or CreateWindowEx, passing the
initial position, size and style information, translated from LCL to Win32,
and using the appropriate parent window from the Data pointer passed in.

3. Use SetProp to store Data to the window handle structure.  

Q. Should this utilize the lpString parameter directly, subverting its
intention as a pointer to a string, or is there a way to get a unique
string and use this to index the hData parameter?

Q. What do I do with the WM_CREATE message recieved by the window
procedure?  Throw it away?  If I pass it on to
TObject(Data).Dispatch(LM_CREATE), will this cause an infinite loop?

Steps following LM_DESTROY

1. Call RemoveProp to remove the window handle storage of Data

2. ???

Steps following WM_xxxx in the window procedure

1. Use GetProp to get the instance of the control as Data

2. Translate the WM_xxxx messages into LM_xxxx messages

3. Call TObject(Data).Dispatch(LM_xxxx)

Steps following LM_xxxx

1. ????

Q. Once I get the this far, I am somewhat lost again.  For instance, what
do I do to handle something simple like LM_SETTEXT for a TForm?  This
should change the form title, correct?  How do I get the window handle for
the form, then what message do I send to Windows to do this, and with what
function?

Jeff.






More information about the Lazarus mailing list