HighTechTalks DotNet Forums  

Form.RightToLeft doesn't respect GetProcessDefaultLayout

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss Form.RightToLeft doesn't respect GetProcessDefaultLayout in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ben Foster
 
Posts: n/a

Default Form.RightToLeft doesn't respect GetProcessDefaultLayout - 02-14-2005 , 11:57 AM






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



Reply With Quote
  #2  
Old   
Michael \(michka\) Kaplan [MS]
 
Posts: n/a

Default Re: Form.RightToLeft doesn't respect GetProcessDefaultLayout - 02-14-2005 , 04:46 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.


"Ben Foster" <ben.foster (AT) nospam (DOT) com> wrote

Quote:
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





Reply With Quote
  #3  
Old   
Mihai N.
 
Posts: n/a

Default Re: Form.RightToLeft doesn't respect GetProcessDefaultLayout - 02-15-2005 , 01:34 AM



Quote:
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 ?
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]
------------------------------------------
Replace _year_ with _ to get the real email


Reply With Quote
  #4  
Old   
Ben Foster
 
Posts: n/a

Default Re: Form.RightToLeft doesn't respect GetProcessDefaultLayout - 02-15-2005 , 04:02 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

"Mihai N." <nmihai_year_2000 (AT) yahoo (DOT) com> wrote

Quote:
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 ?

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]
------------------------------------------
Replace _year_ with _ to get the real email



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.