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: Catch mappoint events using C++ (without MFC...)
But still have one problem and that is:
and the compilor-error is:Code: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 ;) } } }
In the forum I've read, they used Pushpin instead of CPushpin.Code:'CPushpin' : no GUID has been associated with this object 'CPushpin' : no GUID has been associated with this object
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.