[lazarus] WNDPROC Debate.......Chapter 12, the saga continues.....

Shane Miller SMiller1 at stvgb.org
Thu Sep 30 13:45:25 EDT 1999

First, I say add the wndproc.  As a matter if fact, I think I added the procedure already, but I didn't code it.

Also, about adding it for GTK.  Michael is against it beacause GTK does such a nice job allowing each signal to call a sperate callback that it seems like a waste, but you know, I've been thinking about that.  I think that the callbacks should be assigned to the wndproc and the wndproc would do exactly what it does in Windows.  It will check to see if the control gets that message and if so call the appropriate procedure for that control.  I think that's the best way to do it.  
It also gives the developer the ability to override the wndproc.
All we do is have it send the wndproc the msg variable and it can then tell what message was sent, and who sent it (by the self pointer).


>>> "Michael A. Hess" <mhess at miraclec.com> 09/30/99 05:49AM >>>
Samuel Liddicott wrote:
> Because Michael Hess is dead set against it.

Hooooold on!

I am not dead set against windproc. I am against making any of the code
WIN32 specific or following a WIN32 design. If you can add windproc
without the need of ifdefs and the like to implement it then fine by me.
I just don't want to see alot of ifdef stuff being added so that the
code will work in a pure WIN32 invironment when we already have lots of
tools for doing that already. If the windproc stuff can be added to the
base Lazarus classes so that it can be used with a Windows API set well
then fine. However, unless I misunderstood something you wanted to add
WindProc to work with GTK. Isn't that right? Since that isn't how GTK
does the message handling I don't see how you could add doing it using
the windproc method that Delphi uses without tying the LCL directly to
GTK. If you can show me how, by all means do it.

> >We have been drawn down
> >in to discussions of WindProc, WinHandles, etc. etc. and it just doesn't
> >need to be talked about or done at this time.
> Basically he wants to tie strongly with GTK to get the themes, DnD and
> Corbra for free (despite the fact it goes against his other well
> publicised intention to keep things platform independant).

Here is where you are mistaken. Not PLATFORM independant, WIDGET (API)
independent. This is refering to GTK, Qt, wxWindows, XForms, XLib, etc.
etc. etc.

In many cases such as GTK, wxWindows this widget sets already have a
Windows (WIN32) version which means they would also be platform
independant if they adhere to these widget sets.
> He thinks supporting wndproc makes it windows dependant, despite the
> fact I tried to show it is just an extra layer of abstraction and
> therefore makes it less dependant.

Again maybe I am missing something here. Please show me again how, in
code if possible, how you could do this and not tie directly to the
widget API.

We can take it off of the mailing list to discuss. Just email me
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com 

     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus

More information about the Lazarus mailing list