]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/private.h
disable wxUSE_MEDIACTRL when wxUSE_ALL_FEATURES==no (closes #10415)
[wxWidgets.git] / include / wx / msw / private.h
index ce738893b12e8e9bf739b0e3fe3488be656d003c..462bf91ec74a028d33f776f1e3928d4afbb2334f 100644 (file)
@@ -605,14 +605,25 @@ private:
 class GlobalPtr
 {
 public:
+    // default ctor, call Init() later
+    GlobalPtr()
+    {
+        m_hGlobal = NULL;
+    }
+
     // allocates a block of given size
-    GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE)
+    void Init(size_t size, unsigned flags = GMEM_MOVEABLE)
     {
         m_hGlobal = ::GlobalAlloc(flags, size);
         if ( !m_hGlobal )
             wxLogLastError(_T("GlobalAlloc"));
     }
 
+    GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE)
+    {
+        Init(size, flags);
+    }
+
     ~GlobalPtr()
     {
         if ( m_hGlobal && ::GlobalFree(m_hGlobal) )
@@ -930,7 +941,7 @@ extern WXDLLIMPEXP_CORE wxWindow* wxFindWinFromHandle(HWND hwnd);
 // without STRICT WXHWND is the same as HWND anyhow
 inline wxWindow* wxFindWinFromHandle(WXHWND hWnd)
 {
-    return wxFindWinFromHandle(wx_static_cast(HWND, hWnd));
+    return wxFindWinFromHandle(static_cast<HWND>(hWnd));
 }
 
 // find the window for HWND which is part of some wxWindow, i.e. unlike