[Mono-winforms-list] Final changes re Window registration procedure

Aleksey Ryabchuk ryabchuk@yahoo.com
Mon, 24 Mar 2003 03:11:26 -0800 (PST)

Some remarks ...

regarding this change:

/* there was  variable name duplication - we have it
as member of parent class. vkaluzhny@openlinksw.co.uk
createParams = new CreateParams ();

I don't think that the base class, namely ButtonBase,
should declare that field at all. It should override
CreateParams property, create new instance of
CreateParams class and set properties common to all
ButtonBase-derived classes. Derived classes should
call the base.CreateParams. Otherwise, I don't see any
reason why ButtonBase overrides this property at all,
if it does not do anything useful.

Regarding GetCurrentThreadId, I'm really wondering how
it can be absent in Wine, if a quick look at the
Wine's sources shows that it is being used throughout
the Wine's code. Though I'm not a Wine user and may be

Regarding your RegisterClass function... I believe
that the Hashtable container is not appropriate here.
May be it's better to use some set-like container.
What sense does it make to put "this" pointer in
hashtable ? I'm afraid that it will result in not
GC-ing of some NativeWindow instances ... Again, you
say that we should use constants from
win32functions.cs for window class names, but may be
we have to do it for names like "BUTTON", "STATIC",
etc. as well. Just for consistency purpose. 


--- Vlad Kaluzhny <vkaluzhny@openlinksw.co.uk> wrote:
> Hi.
> After analizing of the guys wishes, I have modified
> the Window Class
> registration.
> The only suggestion - use the class names, which are
> described in Win32
> class
> (I put them in win32functions.cs file). Or add there
> your class name, if you
> need it.
> This will avoid the class names duplications with 
> small and/or  capital
> chars mixture.
> And Second,  be attentive when specify the
> CreateParams.ClassStyle value.
> It is simply duplication of class being registered,
> when you have the same
> style for
> different classes. Another to say - when assign new
> class name, take care,
> that
> it have the style, which  is not specified for
> another  window class.
> Regards, Vlad

> ATTACHMENT part 2 application/octet-stream

Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!