Groups | Blog | Home
all groups > dotnet internationalization > february 2005 >

dotnet internationalization : Form.RightToLeft doesn't respect GetProcessDefaultLayout


Michael (michka) Kaplan [MS]
2/14/2005 1:46:49 PM
One could easily ask why not all unmanaged property settings are picked up
by existing APIs and messages that are very useful.

The answer is that they are two very different models that share some of the
same infrastructure but do some things entirely separately. In this case the
rendering is GDI/Uniscribe vs. GDI+ -- and there is no easy way to do
one-to-one mappings in either what they do or how they do it.

In the end, working within one model is the easiest and most likely way to
achieve good results.


--
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Microsoft Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.


[quoted text, click to view]

Ben Foster
2/14/2005 4:57:04 PM
The System.Windows.Forms.Form.RightToLeft property doesn't respect
GetProcessDefaultLayout. (I say this because calling SetProcessDefaultLayout
before the form is created has no effect on the form yet
GetProcessDefaultLayout reports that the default layout has been set). Why
doesn't it respect this useful setting ?

Ben

Mihai N.
2/14/2005 10:34:58 PM
[quoted text, click to view]

This may offer a hint (SetProcessDefaultLayout doc):

"If using this function with a mirrored window, note that the
SetProcessDefaultLayout function does not mirror the whole process and all
the device context (DC)s created in it. It mirrors only the mirrored window's
DCs. To mirror any DC, use the SetLayout function."

Also, part of the GetProcessDefaultLayout doc:
"GetProcessDefaultLayout function gets the default layout that is used when
windows are created with no parent or owner"
So if the window has an owner or parent is not working, and only if
SetProcessDefaultLayout is called before the creation of the window.

This may be an explanation on not :-)

--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Ben Foster
2/15/2005 9:02:05 AM
Mihai,

It seems from what Michael is saying that these functions are for
GDI/Uniscribe applications which .NET applications are not. Thanks anyway.

Ben

[quoted text, click to view]

AddThis Social Bookmark Button