資源簡介
用c++實現利用Google地圖API實現的定位查找,可以和IP數據庫一起做定位查找程序,很好用。也可以用來調用任意網頁里的Javascript函數。
--忘了地圖文件了,不好意思,是用GoogleAPI寫的Map.html文件。單獨上傳,供免費下載。

代碼片段和文件信息
//?DlgProxy.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“PreViewDocument.h“
#include?“DlgProxy.h“
#include?“PreViewDocumentDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CPreViewDocumentDlgAutoProxy
IMPLEMENT_DYNCREATE(CPreViewDocumentDlgAutoProxy?CCmdTarget)
CPreViewDocumentDlgAutoProxy::CPreViewDocumentDlgAutoProxy()
{
EnableAutomation();
//?To?keep?the?application?running?as?long?as?an?automation?
// object?is?active?the?constructor?calls?AfxOleLockApp.
AfxOleLockApp();
//?Get?access?to?the?dialog?through?the?application‘s
//??main?window?pointer.??Set?the?proxy‘s?internal?pointer
//??to?point?to?the?dialog?and?set?the?dialog‘s?back?pointer?to
//??this?proxy.
ASSERT?(AfxGetApp()->m_pMainWnd?!=?NULL);
ASSERT_VALID?(AfxGetApp()->m_pMainWnd);
ASSERT_KINDOF(CPreViewDocumentDlg?AfxGetApp()->m_pMainWnd);
m_pDialog?=?(CPreViewDocumentDlg*)?AfxGetApp()->m_pMainWnd;
m_pDialog->m_pAutoProxy?=?this;
}
CPreViewDocumentDlgAutoProxy::~CPreViewDocumentDlgAutoProxy()
{
//?To?terminate?the?application?when?all?objects?created?with
//? with?automation?the?destructor?calls?AfxOleUnlockApp.
//??Among?other?things?this?will?destroy?the?main?dialog
if?(m_pDialog?!=?NULL)
m_pDialog->m_pAutoProxy?=?NULL;
AfxOleUnlockApp();
}
void?CPreViewDocumentDlgAutoProxy::OnFinalRelease()
{
//?When?the?last?reference?for?an?automation?object?is?released
//?OnFinalRelease?is?called.??The?base?class?will?automatically
//?deletes?the?object.??Add?additional?cleanup?required?for?your
//?object?before?calling?the?base?class.
CCmdTarget::OnFinalRelease();
}
BEGIN_MESSAGE_MAP(CPreViewDocumentDlgAutoProxy?CCmdTarget)
//{{AFX_MSG_MAP(CPreViewDocumentDlgAutoProxy)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CPreViewDocumentDlgAutoProxy?CCmdTarget)
//{{AFX_DISPATCH_MAP(CPreViewDocumentDlgAutoProxy)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
//?Note:?we?add?support?for?IID_IPreViewDocument?to?support?typesafe?binding
//??from?VBA.??This?IID?must?match?the?GUID?that?is?attached?to?the?
//??dispinterface?in?the?.ODL?file.
//?{3E5DD88C-8A3B-497C-BF83-3FB3A4B481EE}
static?const?IID?IID_IPreViewDocument?=
{?0x3e5dd88c?0x8a3b?0x497c?{?0xbf?0x83?0x3f?0xb3?0xa4?0xb4?0x81?0xee?}?};
BEGIN_INTERFACE_MAP(CPreViewDocumentDlgAutoProxy?CCmdTarget)
INTERFACE_PART(CPreViewDocumentDlgAutoProxy?IID_IPreViewDocument?Dispatch)
END_INTERFACE_MAP()
//?The?IMPLEMENT_OLECREATE2?macro?is?defined?in?StdAfx.h?of?this?project
//?{A4F8F880-E787-4541-8BEF-7D93F25D71B1}
IMPLEMENT_OLECREATE2(CPreViewDocumentDlgAutoProxy?“PreViewDocument.Application“?0xa4f8f880?0xe787?0x4541?0x8b?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-01-09?13:01??PreViewDocument\
?????目錄???????????0??2011-01-09?13:01??PreViewDocument\Debug\
?????文件???????21553??2011-03-13?00:27??PreViewDocument\Debug\DlgProxy.obj
?????文件???????????0??2011-03-13?00:27??PreViewDocument\Debug\DlgProxy.sbr
?????文件?????4318208??2011-03-13?00:34??PreViewDocument\Debug\PreViewDocument.bsc
?????文件??????139336??2011-03-17?15:21??PreViewDocument\Debug\PreViewDocument.exe
?????文件??????360164??2011-03-17?15:21??PreViewDocument\Debug\PreViewDocument.ilk
?????文件???????13603??2011-03-13?00:27??PreViewDocument\Debug\PreViewDocument.obj
?????文件?????6877264??2011-03-13?00:18??PreViewDocument\Debug\PreViewDocument.pch
?????文件??????508928??2011-03-17?15:21??PreViewDocument\Debug\PreViewDocument.pdb
?????文件????????3120??2011-03-17?15:21??PreViewDocument\Debug\PreViewDocument.res
?????文件???????????0??2011-03-13?00:27??PreViewDocument\Debug\PreViewDocument.sbr
?????文件????????1492??2011-03-13?00:26??PreViewDocument\Debug\PreViewDocument.tlb
?????文件???????66216??2011-03-13?00:34??PreViewDocument\Debug\PreViewDocumentDlg.obj
?????文件???????????0??2011-03-13?00:34??PreViewDocument\Debug\PreViewDocumentDlg.sbr
?????文件??????105858??2011-03-13?00:18??PreViewDocument\Debug\StdAfx.obj
?????文件?????1374990??2011-03-13?00:18??PreViewDocument\Debug\StdAfx.sbr
?????文件??????246784??2011-03-18?12:59??PreViewDocument\Debug\vc60.idb
?????文件??????446464??2011-03-13?00:34??PreViewDocument\Debug\vc60.pdb
?????文件???????63967??2011-03-13?00:18??PreViewDocument\Debug\webbrowser3.obj
?????文件???????????0??2011-03-13?00:18??PreViewDocument\Debug\webbrowser3.sbr
?????文件???????66439??2011-03-13?00:18??PreViewDocument\Debug\WebPage.obj
?????文件???????????0??2011-03-13?00:18??PreViewDocument\Debug\WebPage.sbr
?????文件????????3174??2010-11-24?16:23??PreViewDocument\DlgProxy.cpp
?????文件????????1738??2010-11-24?16:23??PreViewDocument\DlgProxy.h
?????文件???????36708??2011-03-18?12:59??PreViewDocument\PreViewDocument.aps
?????文件????????1611??2011-03-18?12:59??PreViewDocument\PreViewDocument.clw
?????文件????????2789??2010-11-24?16:23??PreViewDocument\PreViewDocument.cpp
?????文件????????5198??2011-03-13?00:19??PreViewDocument\PreViewDocument.dsp
?????文件?????????597??2011-03-13?00:19??PreViewDocument\PreViewDocument.dsw
?????文件????????1423??2010-11-24?16:23??PreViewDocument\PreViewDocument.h
............此處省略41個文件信息
- 上一篇:FTP客戶端與服務器的MFC實現
- 下一篇:c++實現局域網文件傳送基于socket
評論
共有 條評論