]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/stattext.cpp
don't assign string literals to a char * variable
[wxWidgets.git] / src / os2 / stattext.cpp
index fbeefc707fe1a3ab8f959c3dd274c5ee962b49ec..5b214b098733d69fb65e94d114d3ddd10298f114 100644 (file)
@@ -66,6 +66,15 @@ bool wxStaticText::Create(
         lSstyle |= DT_RIGHT;
     else
         lSstyle |= DT_LEFT;
+    //
+    // If the parent is a scrolled window the controls must
+    // have this style or they will overlap the scrollbars
+    //
+    if (pParent)
+        if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) ||
+            pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)))
+            lSstyle |= WS_CLIPSIBLINGS;
+
     m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
                                        ,WC_STATIC                // Window class
                                        ,(PSZ)rsLabel.c_str()     // Initial Text