MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




MapPointUtilities

This is a discussion on MapPointUtilities within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; The MapPointUtilities::GetPictureFromObject method returns an IPicture object. I try to save this picture to a stream, unfortunately unsuccessfull... Any sugestions ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-24-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
MapPointUtilities

The MapPointUtilities::GetPictureFromObject method returns an IPicture object. I try to save this picture to a stream, unfortunately unsuccessfull...

Any sugestions are welcome!

my code looks like this:

Code:
CComPtr<MapPoint::_MapPointUtilities>	pUtils(NULL);
hr = pUtils.CoCreateInstance(__uuidof(MapPoint::MapPointUtilities));
if(SUCCEEDED(hr))
{
    LPDISPATCH pPictureDisp(NULL);
    hr = pUtils->GetPictureFromObject(m_pMappointMap, 640, 480, &pPictureDisp);
    if(SUCCEEDED(hr))
    {
        long cbSize(0);
        IPicture*	pPicture(NULL);

        hr = pPictureDisp->QueryInterface(__uuidof(IPicture), (void**)&pPicture);
        if(SUCCEEDED(hr))
        {
            SHORT sType(0);
            hr = pPicture->get_Type(&sType);
            hr = pPicture->SaveAsFile(pStream, TRUE, &cbSize);
        }
        pPicture->Release();
    }
}
pUtils.Release();
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-11-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Re: MapPointUtilities

Hi there,

The problem with GetPictureFromObject is that the Height and Withd of this function is in HiMetrics. Regarding msdn.com, visual basic references for MapPoint the minimal value must be 1100 for both ot them.


Quote:
Originally Posted by Ikke
The MapPointUtilities::GetPictureFromObject method returns an IPicture object. I try to save this picture to a stream, unfortunately unsuccessfull...

Any sugestions are welcome!

my code looks like this:

Code:
CComPtr<MapPoint::_MapPointUtilities>	pUtils(NULL);
hr = pUtils.CoCreateInstance(__uuidof(MapPoint::MapPointUtilities));
if(SUCCEEDED(hr))
{
    LPDISPATCH pPictureDisp(NULL);
    hr = pUtils->GetPictureFromObject(m_pMappointMap, 640, 480, &pPictureDisp);
    if(SUCCEEDED(hr))
    {
        long cbSize(0);
        IPicture*	pPicture(NULL);

        hr = pPictureDisp->QueryInterface(__uuidof(IPicture), (void**)&pPicture);
        if(SUCCEEDED(hr))
        {
            SHORT sType(0);
            hr = pPicture->get_Type(&sType);
            hr = pPicture->SaveAsFile(pStream, TRUE, &cbSize);
        }
        pPicture->Release();
    }
}
pUtils.Release();
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
mappointutilities


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:40 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Hurghada Holiday
Enjoy sunny Egypt when you book a Hurghada holiday through UlookUbook at a good price!



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59