CMyComPtrpWebBrowser; // Initialize pWebBrowser object VARIANT_BOOL bFullScreen = VARIANT_FALSE; pWebBrowser->GetProperty(DISPID_FULLSCREEN, &bFullScreen); if (bFullScreen == VARIANT_TRUE) { // Do something }
CMyComPtrIn this example, a CMyComPtr object of type IOleObject is initialized and the value of the Title property is retrieved using the GetProperty method. The property value is returned as a BSTR (Basic String) data type.pOleObject; // Initialize pOleObject object BSTR bstrTitle = NULL; pOleObject->GetProperty(DISPID_TITLE, &bstrTitle); if (bstrTitle != NULL) { // Do something }