Files belonging to patch from, thannoy: Allow future control toolbar to be hidden...
[vlc.git] / projects / activex / persistpropbag.cpp
index b53c511..85a31be 100644 (file)
@@ -101,6 +101,13 @@ STDMETHODIMP VLCPersistPropertyBag::Load(LPPROPERTYBAG pPropBag, LPERRORLOG pErr
         }
     }
 
+    V_VT(&value) = VT_BOOL;
+    if( S_OK == pPropBag->Read(OLESTR("toolbar"), &value, pErrorLog) )
+    {
+        _p_instance->setShowToolbar(V_BOOL(&value) != VARIANT_FALSE);
+        VariantClear(&value);
+    }
+
     SIZEL size = _p_instance->getExtent();
     V_VT(&value) = VT_I4;
     if( S_OK == pPropBag->Read(OLESTR("extentwidth"), &value, pErrorLog) )
@@ -227,6 +234,11 @@ STDMETHODIMP VLCPersistPropertyBag::Save(LPPROPERTYBAG pPropBag, BOOL fClearDirt
     pPropBag->Write(OLESTR("AutoPlay"), &value);
     VariantClear(&value);
 
+    V_VT(&value) = VT_BOOL;
+    V_BOOL(&value) = _p_instance->getShowToolbar()? VARIANT_TRUE : VARIANT_FALSE;
+    pPropBag->Write(OLESTR("Toolbar"), &value);
+    VariantClear(&value);
+
     SIZEL size = _p_instance->getExtent();
     V_VT(&value) = VT_I4;
     V_I4(&value) = size.cx;