thank you, barneyman!
I have found a resolution. the cusory step is following:
1. establish a new project based dialog, checking the "automation" option.
2. add a new class derived from CHtmlView, checking the "automation" option too.
3. add a new method for the interface(the wizard will create for you when checking the automation). eg.void myfunction1(void);
4.override the "OnGetExternal" virtual function of your derived class, fill the function body with following code
*lppDispatch = GetIDispatch(TRUE);
return S_OK;
then, you can fire the function in html, just like this:
window.external.myfunction();
my os is win7 ultimate, and the IDE is VS2008!