]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Fixed compilation problem.
[wxWidgets.git] / src / msw / textctrl.cpp
index 6a3af8adab6b4235ecdb8d94cabad21aa0000ebe..e96a9b03e3c3dcb8c4f0bbafc5c4f03f769f7837 100644 (file)
@@ -125,14 +125,14 @@ wxBEGIN_FLAGS( wxTextCtrlStyle )
     wxFLAGS_MEMBER(wxDOUBLE_BORDER)
     wxFLAGS_MEMBER(wxRAISED_BORDER)
     wxFLAGS_MEMBER(wxSTATIC_BORDER)
-    wxFLAGS_MEMBER(wxNO_BORDER)
+    wxFLAGS_MEMBER(wxBORDER)
 
     // standard window styles
     wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
     wxFLAGS_MEMBER(wxCLIP_CHILDREN)
     wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
     wxFLAGS_MEMBER(wxWANTS_CHARS)
-    wxFLAGS_MEMBER(wxNO_FULL_REPAINT_ON_RESIZE)
+    wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
     wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
     wxFLAGS_MEMBER(wxVSCROLL)
     wxFLAGS_MEMBER(wxHSCROLL)
@@ -530,6 +530,7 @@ wxString wxTextCtrl::GetRange(long from, long to) const
             if ( to == -1 )
                 to = len;
 
+#if !wxUSE_UNICODE
             // we must use EM_STREAMOUT if we don't want to lose all characters
             // not representable in the current character set (EM_GETTEXTRANGE
             // simply replaces them with question marks...)
@@ -556,6 +557,7 @@ wxString wxTextCtrl::GetRange(long from, long to) const
 
             // StreamOut() wasn't used or failed, try to do it in normal way
             if ( str.empty() )
+#endif // !wxUSE_UNICODE
             {
                 // alloc one extra WORD as needed by the control
                 wxStringBuffer tmp(str, ++len);
@@ -563,7 +565,7 @@ wxString wxTextCtrl::GetRange(long from, long to) const
 
                 TEXTRANGE textRange;
                 textRange.chrg.cpMin = from;
-                textRange.chrg.cpMax = to == -1 ? len : to;
+                textRange.chrg.cpMax = to;
                 textRange.lpstrText = p;
 
                 (void)SendMessage(GetHwnd(), EM_GETTEXTRANGE,
@@ -1259,7 +1261,11 @@ bool wxTextCtrl::IsModified() const
     return SendMessage(GetHwnd(), EM_GETMODIFY, 0, 0) != 0;
 }
 
-// Makes 'unmodified'
+void wxTextCtrl::MarkDirty()
+{
+    SendMessage(GetHwnd(), EM_SETMODIFY, TRUE, 0L);
+}
+
 void wxTextCtrl::DiscardEdits()
 {
     SendMessage(GetHwnd(), EM_SETMODIFY, FALSE, 0L);