void OnPaint(wxPaintEvent& event);
 
 public:
-    // For implementation purposes - sometimes decorations make the client area
-    // smaller
-    virtual wxPoint GetClientAreaOrigin() const;
-
     // Windows subclassing
     void SubclassWin(WXHWND hWnd);
     void UnsubclassWin();
 
 // get the origin of the client area in the client coordinates
 wxPoint wxFrame::GetClientAreaOrigin() const
 {
-    Coord x, y;
-    WinWindowToDisplayPt(&x,&y);
-    wxPoint pt(x,y);
-    return pt;
+    // there is no API to get client area but we know
+    // it starts after titlebar and 1 pixel of form border
+    Coord maxY = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y),
+          X = 1,
+          Y = 0;
+    while ( Y < maxY )
+    {
+        if(!FrmPointInTitle(GetForm(),X,Y))
+            return wxPoint(X,Y+1);
+        Y++;
+    }
+
+    return wxPoint(X,0);
 }
 
 // Name:        src/palmos/settings.cpp
 // Purpose:     wxSystemSettingsNative implementation for Palm OS
 // Author:      William Osborne - minimal working wxPalmOS port
-// Modified by:
+// Modified by: Wlodzimierz ABX Skiba - native implementation
 // Created:     10/13/04
 // RCS-ID:      $Id$
-// Copyright:   (c) William Osborne
+// Copyright:   (c) William Osborne, Wlodzimierz Skiba
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Get a system metric, e.g. scrollbar size
 int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
 {
-    return -1;
+    int metric = -1;
+    uint32_t attrP;
+
+    switch( index )
+    {
+        case wxSYS_SCREEN_X:
+            WinScreenGetAttribute(winScreenWidth, &attrP);
+            metric = attrP;
+            break;
+
+        case wxSYS_SCREEN_Y:
+            WinScreenGetAttribute(winScreenHeight, &attrP);
+            metric = attrP;
+            break;
+    }
+
+    return metric;
 }
 
 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
 
 {
 }
 
-// For implementation purposes - sometimes decorations make the client area
-// smaller
-wxPoint wxWindowPalm::GetClientAreaOrigin() const
-{
-    return wxPoint(0, 0);
-}
-
 // ---------------------------------------------------------------------------
 // text metrics
 // ---------------------------------------------------------------------------