]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/statbox.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        src/os2/statbox.cpp 
   3 // Purpose:     wxStaticBox 
   4 // Author:      David Webster 
   8 // Copyright:   (c) David Webster 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 // For compilers that support precompilation, includes "wx.h". 
  13 #include "wx/wxprec.h" 
  15 #include "wx/statbox.h" 
  19     #include "wx/dcclient.h" 
  20     #include "wx/window.h" 
  23 #include "wx/os2/private.h" 
  25 bool wxStaticBox::Create( wxWindow
*       pParent
, 
  27                           const wxString
& rsLabel
, 
  31                           const wxString
& rsName 
) 
  33     if(!CreateControl( pParent
 
  48     if (!OS2CreateControl( wxT("STATIC") 
  59     // To be transparent we should have the same colour as the parent as well 
  61     SetBackgroundColour(GetParent()->GetBackgroundColour()); 
  63     LONG lColor 
= (LONG
)wxBLACK
->GetPixel(); 
  64     ::WinSetPresParam( m_hWnd
 
  70     lColor 
= (LONG
)m_backgroundColour
.GetPixel(); 
  71     ::WinSetPresParam( m_hWnd
 
  82 } // end of wxStaticBox::Create 
  84 wxSize 
wxStaticBox::DoGetBestSize() const 
  91     nCy 
= GetCharHeight(); 
  92     GetTextExtent( wxGetWindowText(m_hWnd
) 
  98     int                             hBox 
= EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy
); 
 103 } // end of wxStaticBox::DoGetBestSize 
 105 MRESULT 
wxStaticBox::OS2WindowProc( WXUINT    nMsg
, 
 109     return wxControl::OS2WindowProc(nMsg
, wParam
, lParam
); 
 110 } // end of wxStaticBox::OS2WindowProc