]> 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 a204d577f420076e53a0d574f3d0bce600448b07..eb53b98d0d9785322f306d69613a343c4f570223 100644 (file)
@@ -311,7 +311,7 @@ bool wxTextEntry::AutoCompleteFileNames()
     static wxDynamicLibrary s_dllShlwapi;
     if ( s_pfnSHAutoComplete == (SHAutoComplete_t)-1 )
     {
-        if ( !s_dllShlwapi.Load(_T("shlwapi.dll"), wxDL_VERBATIM | wxDL_QUIET) )
+        if ( !s_dllShlwapi.Load(wxT("shlwapi.dll"), wxDL_VERBATIM | wxDL_QUIET) )
         {
             s_pfnSHAutoComplete = NULL;
         }
@@ -327,7 +327,7 @@ bool wxTextEntry::AutoCompleteFileNames()
     HRESULT hr = (*s_pfnSHAutoComplete)(GetEditHwnd(), SHACF_FILESYS_ONLY);
     if ( FAILED(hr) )
     {
-        wxLogApiError(_T("SHAutoComplete()"), hr);
+        wxLogApiError(wxT("SHAutoComplete()"), hr);
 
         return false;
     }
@@ -363,7 +363,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices)
                  );
     if ( FAILED(hr) )
     {
-        wxLogApiError(_T("CoCreateInstance(CLSID_AutoComplete)"), hr);
+        wxLogApiError(wxT("CoCreateInstance(CLSID_AutoComplete)"), hr);
         return false;
     }
 
@@ -374,7 +374,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices)
     m_enumStrings->Release();
     if ( FAILED(hr) )
     {
-        wxLogApiError(_T("IAutoComplete::Init"), hr);
+        wxLogApiError(wxT("IAutoComplete::Init"), hr);
         return false;
     }
 
@@ -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