VC_Man
01-03-2007, 09:41 AM
I thaught this thread wasn't necessary, but after reading some articles here, I finally decided to open a new thread anyway.
I've read this forum: http://www.mapforums.com/catch-mappoint-events-using-c-without-mfc-3866.html
But still have one problem and that is:
OnSelectionChangeControlMap(LPDISPATCH pNewSelection, LPDISPATCH pOldSelection)
{
//HRESULT hr = pNewSelection->QueryInterface(__uuidof(Pushpin),
// Get old selection - if it is a pushpin, hide the notes/caption
if (pOldSelection)
{
CPushpin *pOldPin;
HRESULT hr = pOldSelection->QueryInterface( __uuidof(CPushpin) , (void**)&pOldPin);
if (SUCCEEDED(hr))
{
//some codeprocessing
}
}
// Get new selection - if it is a pushpin, display notes/caption and modify it
if (pNewSelection)
{
CPushpin *pNewPin;
HRESULT hr = pNewSelection->QueryInterface( __uuidof(CPushpin) , (void**)&pNewPin);
if (SUCCEEDED(hr))
{
//some coding
//some coding agian ;)
}
}
}
and the compilor-error is:
'CPushpin' : no GUID has been associated with this object
'CPushpin' : no GUID has been associated with this object
In the forum I've read, they used Pushpin instead of CPushpin.
I also tried with 'Pushpin', but it didn't matter.
So does someone know how to get the right GUID of Pushpin?? I'm not a specialist in COM, only understand what's going on a little.
I've read this forum: http://www.mapforums.com/catch-mappoint-events-using-c-without-mfc-3866.html
But still have one problem and that is:
OnSelectionChangeControlMap(LPDISPATCH pNewSelection, LPDISPATCH pOldSelection)
{
//HRESULT hr = pNewSelection->QueryInterface(__uuidof(Pushpin),
// Get old selection - if it is a pushpin, hide the notes/caption
if (pOldSelection)
{
CPushpin *pOldPin;
HRESULT hr = pOldSelection->QueryInterface( __uuidof(CPushpin) , (void**)&pOldPin);
if (SUCCEEDED(hr))
{
//some codeprocessing
}
}
// Get new selection - if it is a pushpin, display notes/caption and modify it
if (pNewSelection)
{
CPushpin *pNewPin;
HRESULT hr = pNewSelection->QueryInterface( __uuidof(CPushpin) , (void**)&pNewPin);
if (SUCCEEDED(hr))
{
//some coding
//some coding agian ;)
}
}
}
and the compilor-error is:
'CPushpin' : no GUID has been associated with this object
'CPushpin' : no GUID has been associated with this object
In the forum I've read, they used Pushpin instead of CPushpin.
I also tried with 'Pushpin', but it didn't matter.
So does someone know how to get the right GUID of Pushpin?? I'm not a specialist in COM, only understand what's going on a little.