]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textentry.cpp
Define wxUSE_CAIRO in wx/chkconf.h to ensure that it's always defined.
[wxWidgets.git] / src / msw / textentry.cpp
index 672058b8fd306d4db2797f909bff61c4be599869..eb53b98d0d9785322f306d69613a343c4f570223 100644 (file)
@@ -474,4 +474,44 @@ wxString wxTextEntry::GetHint() const
 
 #endif // wxUSE_UXTHEME
 
+// ----------------------------------------------------------------------------
+// margins support
+// ----------------------------------------------------------------------------
+
+bool wxTextEntry::DoSetMargins(const wxPoint& margins)
+{
+#if !defined(__WXWINCE__)
+    bool res = true;
+
+    if ( margins.x != -1 )
+    {
+        // left margin
+        ::SendMessage(GetEditHwnd(), EM_SETMARGINS,
+                      EC_LEFTMARGIN, MAKELONG(margins.x, 0));
+    }
+
+    if ( margins.y != -1 )
+    {
+        res = false;
+    }
+
+    return res;
+#else
+    return false;
+#endif
+}
+
+wxPoint wxTextEntry::DoGetMargins() const
+{
+#if !defined(__WXWINCE__)
+    LRESULT lResult = ::SendMessage(GetEditHwnd(), EM_GETMARGINS,
+                                    0, 0);
+    int left = LOWORD(lResult);
+    int top = -1;
+    return wxPoint(left, top);
+#else
+    return wxPoint(-1, -1);
+#endif
+}
+
 #endif // wxUSE_TEXTCTRL || wxUSE_COMBOBOX