+ m_windowId = vId;
+
+ int nX = rPos.x;
+ int nY = rPos.y;
+ int nWidth = rSize.x;
+ int nHeight = rSize.y;
+
+ m_windowStyle = lStyle;
+
+ long lSstyle = 0L;
+
+ // Used to have DT_VCENTER but that doesn't work correctly with
+ // multiline strings and DT_WORDBREAK. Accept a reasonable
+ // compromise for now
+ lSstyle = WS_VISIBLE | SS_TEXT | DT_WORDBREAK | DT_MNEMONIC;
+ if (m_windowStyle & wxALIGN_CENTRE)
+ lSstyle |= DT_CENTER;
+ else if (m_windowStyle & wxALIGN_RIGHT)
+ lSstyle |= DT_RIGHT;
+ else
+ lSstyle |= DT_LEFT;
+
+ m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
+ ,WC_STATIC // Window class
+ ,NULL // Initial Text
+ ,(ULONG)lSstyle // Style flags
+ ,0L, 0L, 0L, 0L // Origin -- 0 size
+ ,(HWND)GetHwndOf(pParent) // owner window handle (same as parent
+ ,HWND_TOP // initial z position
+ ,(ULONG)m_windowId // Window identifier
+ ,NULL // no control data
+ ,NULL // no Presentation parameters
+ );
+
+ wxCHECK_MSG(m_hWnd, false, wxT("Failed to create static ctrl"));