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;
}
HRESULT hr = (*s_pfnSHAutoComplete)(GetEditHwnd(), SHACF_FILESYS_ONLY);
if ( FAILED(hr) )
{
- wxLogApiError(_T("SHAutoComplete()"), hr);
+ wxLogApiError(wxT("SHAutoComplete()"), hr);
return false;
}
);
if ( FAILED(hr) )
{
- wxLogApiError(_T("CoCreateInstance(CLSID_AutoComplete)"), hr);
+ wxLogApiError(wxT("CoCreateInstance(CLSID_AutoComplete)"), hr);
return false;
}
m_enumStrings->Release();
if ( FAILED(hr) )
{
- wxLogApiError(_T("IAutoComplete::Init"), hr);
+ wxLogApiError(wxT("IAutoComplete::Init"), hr);
return false;
}
#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