]> git.sesse.net Git - vlc/blobdiff - activex/dataobject.cpp
Disable update checker in Win32 until it's fixed
[vlc] / activex / dataobject.cpp
index 49bf8122ddd6b0259c4638021840b4a9347653d4..33ecde8e0d4e29b654723364e56f5df6a75b9e25 100644 (file)
@@ -17,7 +17,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "plugin.h"
@@ -192,18 +192,16 @@ HRESULT VLCDataObject::getMetaFileData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedi
             SIZEL size = _p_instance->getExtent();
             RECTL wBounds = { 0L, 0L, size.cx, size.cy };
 
-            LONG width = size.cx*GetDeviceCaps(hicTargetDev, LOGPIXELSX)/2540L;
-            LONG height = size.cy*GetDeviceCaps(hicTargetDev, LOGPIXELSY)/2540L;
-
             pMetaFilePict->mm   = MM_ANISOTROPIC;
             pMetaFilePict->xExt = size.cx;
             pMetaFilePict->yExt = size.cy;
 
+            DPFromHimetric(hicTargetDev, (LPPOINT)&size, 1);
+
             SetMapMode(hdcMeta, MM_ANISOTROPIC);
-            SetWindowOrgEx(hdcMeta, 0, 0, NULL);
-            SetWindowExtEx(hdcMeta, width, height, NULL);
+            SetWindowExtEx(hdcMeta, size.cx, size.cy, NULL);
 
-            RECTL bounds = { 0L, 0L, width, height };
+            RECTL bounds = { 0L, 0L, size.cx, size.cy };
 
             _p_instance->onDraw(pFormatEtc->ptd, hicTargetDev, hdcMeta, &bounds, &wBounds);
             pMetaFilePict->hMF = CloseMetaFile(hdcMeta);
@@ -230,10 +228,9 @@ HRESULT VLCDataObject::getEnhMetaFileData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pM
     {
         RECTL wBounds = { 0L, 0L, size.cx, size.cy };
 
-        LONG width = size.cx*GetDeviceCaps(hicTargetDev, LOGPIXELSX)/2540L;
-        LONG height = size.cy*GetDeviceCaps(hicTargetDev, LOGPIXELSY)/2540L;
+        DPFromHimetric(hicTargetDev, (LPPOINT)&size, 1);
 
-        RECTL bounds = { 0L, 0L, width, height };
+        RECTL bounds = { 0L, 0L, size.cx, size.cy };
 
         _p_instance->onDraw(pFormatEtc->ptd, hicTargetDev, hdcMeta, &bounds, &wBounds);
         pMedium->hEnhMetaFile = CloseEnhMetaFile(hdcMeta);
@@ -279,6 +276,11 @@ STDMETHODIMP VLCDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium,
     return E_NOTIMPL;
 };
 
+/*void VLCDataObject::onDataChange(void)
+{
+    _p_adviseHolder->SendOnDataChange(this, 0, 0);
+};*/
+
 void VLCDataObject::onClose(void)
 {
     _p_adviseHolder->SendOnDataChange(this, 0, ADVF_DATAONSTOP);