[lazarus] Creating Components...
Jeffrey A. Wormsley
daworm at cdc.net
Wed Aug 11 20:27:10 EDT 1999
Hello all,
Work is moving forward on the win32 stuff, but I have now ran into
another problem that maybe you guys can help with.
I am currently using the HELLO.PP example as my test base. I am creating
the form and the button only, the Font and ControlCanvas are do-nothing
right now.
My problem is the way in which messages are sent to create the button. The
first message sent is the LM_CREATE, then the LM_ADDCHILD to tell the
button what it's parent is. However, win32 wants to know the window handle
of the button's parent when the button is created. I don't have that
information yet!!! I won't get that until the LM_ADDCHILD message is
recieved. I have all of the other data needed, such as the size and the
position of the button, but not the parent. The net result is that I get
the main form and a very small form that contains the button, since windows
creates a form to go around the button because it has no parent.
Must I move the creation of the button to the LM_ADDCHILD handler? Will
this cause problems if the button has it's parent changed?
How much code does it break to have the buttons parent already assigned to
the Parent property before the call to SendMessage is made?
Jeff.
More information about the Lazarus
mailing list