@@ -19,14 +19,21 @@ public enum WindowMessage : int
1919    [ Flags ] 
2020    public  enum  WindowStyle  :  uint 
2121    { 
22-         WS_SYSMENU  =  0x80000 
22+         WS_SYSMENU  =  0x80000 , 
23+     } 
24+ 
25+     [ Flags ] 
26+     public  enum  WindowStyleExtended  :  ulong 
27+     { 
28+         WS_EX_LAYOUTRTL =  0x00400000L , 
2329    } 
2430
2531    [ Flags ] 
2632    public  enum  WindowLongIndexFlags  :  int 
2733    { 
2834        GWL_WNDPROC  =  - 4 , 
29-         GWL_STYLE  =  - 16 
35+         GWL_STYLE  =  - 16 , 
36+         GWL_EXSTYLE  =  - 20 , 
3037    } 
3138
3239    [ Flags ] 
@@ -44,43 +51,50 @@ public enum SystemCommand
4451        SC_KEYMENU  =  0xF100 
4552    } 
4653
54+     // TODO: Check for typing online. IntPtr, int, or long? 
55+ 
4756    [ DllImport ( "user32.dll" ,  EntryPoint  =  "GetWindowLongW" ,  SetLastError  =  false ) ] 
48-     public  static   extern   int  GetWindowLong ( IntPtr  hWnd ,  int  nIndex ) ; 
57+     public  static   extern   int  GetWindowLongW ( IntPtr  hWnd ,  int  nIndex ) ; 
58+ 
59+     [ DllImport ( "user32.dll" ,  EntryPoint  =  "GetWindowLongPtr" ,  SetLastError  =  false ) ] 
60+     public  static   extern   IntPtr  GetWindowLongPtr ( IntPtr  hWnd ,  int  nIndex ) ; 
4961
5062    [ DllImport ( "user32.dll" ,  EntryPoint  =  "GetWindowLongPtrW" ,  SetLastError  =  false ) ] 
51-     public  static   extern   int  GetWindowLongPtr ( IntPtr  hWnd ,  int  nIndex ) ; 
63+     public  static   extern   int  GetWindowLongPtrW ( IntPtr  hWnd ,  int  nIndex ) ; 
5264
5365    public  static   int  GetWindowLongAuto ( IntPtr  hWnd ,  int  nIndex ) 
5466    { 
5567        if  ( IntPtr . Size  is  8 ) 
5668        { 
57-             return  GetWindowLongPtr ( hWnd ,  nIndex ) ; 
69+             return  GetWindowLongPtrW ( hWnd ,  nIndex ) ; 
5870        } 
5971        else 
6072        { 
61-             return  GetWindowLong ( hWnd ,  nIndex ) ; 
73+             return  GetWindowLongW ( hWnd ,  nIndex ) ; 
6274        } 
6375    } 
6476
6577    [ DllImport ( "user32.dll" ,  EntryPoint  =  "FindWindowExW" ,  SetLastError  =  true ,  CharSet  =  CharSet . Unicode ) ] 
6678    public  static   extern   IntPtr  FindWindowEx ( IntPtr  hWndParent ,  IntPtr  hWndChildAfter ,  string  lpszClass ,  string  lpszWindow ) ; 
6779
68- 
6980    [ DllImport ( "user32.dll" ,  EntryPoint  =  "SetWindowLongW" ,  SetLastError  =  false ) ] 
70-     public  static   extern   IntPtr  SetWindowLong ( IntPtr  hWnd ,  int  nIndex ,  IntPtr  dwNewLong ) ; 
81+     public  static   extern   IntPtr  SetWindowLongW ( IntPtr  hWnd ,  int  nIndex ,  IntPtr  dwNewLong ) ; 
7182
72-     [ DllImport ( "user32.dll" ,  EntryPoint  =  "SetWindowLongPtrW " ,  SetLastError  =  false ) ] 
83+     [ DllImport ( "user32.dll" ,  EntryPoint  =  "SetWindowLongPtr " ,  SetLastError  =  false ) ] 
7384    public  static   extern   IntPtr  SetWindowLongPtr ( IntPtr  hWnd ,  int  nIndex ,  IntPtr  dwNewLong ) ; 
7485
86+     [ DllImport ( "user32.dll" ,  EntryPoint  =  "SetWindowLongPtrW" ,  SetLastError  =  false ) ] 
87+     public  static   extern   IntPtr  SetWindowLongPtrW ( IntPtr  hWnd ,  int  nIndex ,  IntPtr  dwNewLong ) ; 
88+ 
7589    public  static   IntPtr  SetWindowLongAuto ( IntPtr  hWnd ,  int  nIndex ,  IntPtr  dwNewLong ) 
7690    { 
7791        if  ( IntPtr . Size  is  8 ) 
7892        { 
79-             return  SetWindowLongPtr ( hWnd ,  nIndex ,  dwNewLong ) ; 
93+             return  SetWindowLongPtrW ( hWnd ,  nIndex ,  dwNewLong ) ; 
8094        } 
8195        else 
8296        { 
83-             return  SetWindowLong ( hWnd ,  nIndex ,  dwNewLong ) ; 
97+             return  SetWindowLongW ( hWnd ,  nIndex ,  dwNewLong ) ; 
8498        } 
8599    } 
86100
0 commit comments