]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/caret.cpp
fatal bug in wxSplitPath fixed
[wxWidgets.git] / src / msw / caret.cpp
index e35dc6da09e01c757d9935c89b2887a5ed26097a..cacc6801f5128bac973e5c83bb454e2b05f7a1a4 100644 (file)
@@ -153,10 +153,26 @@ void wxCaret::DoMove()
 {
     if ( m_hasCaret )
     {
-        wxWindow *winFocus = wxWindow::FindFocus();
-        wxASSERT_MSG( winFocus == GetWindow(), wxT("how did we lose focus?") );
+        wxASSERT_MSG( wxWindow::FindFocus() == GetWindow(),
+                      wxT("how did we lose focus?") );
 
         CALL_CARET_API(SetCaretPos, (m_x, m_y));
     }
     //else: we don't have caret right now, nothing to do (this does happen)
 }
+
+
+// ---------------------------------------------------------------------------
+// resizing the caret
+// ---------------------------------------------------------------------------
+
+void wxCaret::DoSize()
+{
+    if ( m_hasCaret )
+    {
+        m_hasCaret = FALSE;
+        CALL_CARET_API(DestroyCaret, ());
+        MSWCreateCaret();
+        DoMove();
+    }
+}