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

Alexandre Pigolkine pigolkine@gmx.de
Mon, 24 Mar 2003 13:01:31 +0100

-----Original Message-----
From: Alexandre Pigolkine [mailto:pigolkine@gmx.de]=20
Sent: Montag, 24. M=E4rz 2003 13:00
To: 'Vlad Kaluzhny'
Subject: RE: [Mono-winforms-list] Final changes re Window registration


1. Button.cs :
- CreateParams createParams =3D new CreateParams ();

The variable createParams is used here only to setup a structure and
return it to the caller, and not to set _private_ member of base class.

It's needed to set style of button to BS_OWNERDRAW to be able to paint
Flat/Popup/Standard buttons and Background image and icon on the button.

Conversion of ContentAlignment to button style is needed to position
text on FlatStyle.System button.

2. Control.cs
Wine implements GetCurrentThreadId().

3. NativeWindow.cs
Regarding private void RegisterClass( CreateParams cp ).
The test for "known" window classes doesn't worth resources it takes. We
have approx. 5 special window classes to register now=20
and a lot more preregistered control classes. Do you want to put all
names inside this function ? Isn't it simpler and faster to register=20
the window classes we need in the classes which use it?=20

Alexandre Pigolkine

-----Original Message-----
From: mono-winforms-list-admin@lists.ximian.com
[mailto:mono-winforms-list-admin@lists.ximian.com] On Behalf Of Vlad
Sent: Montag, 24. M=E4rz 2003 10:59
To: mono-winforms-list@lists.ximian.com
Subject: [Mono-winforms-list] Final changes re Window registration

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