笔下有余

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

转载请注明出处http://www.cnblogs.com/missu/

HWND TForm_main::IEWEB()
{
   HWND hwndChild,hwndTmp;
 TOleControl * oleCtrl;
 char szClass[20];
 AnsiString aaaaa;
  oleCtrl=WB;
  hwndTmp=oleCtrl->Handle;
  while (true)
  {
    hwndChild=GetWindow(hwndTmp,GW_CHILD);
    GetClassName(hwndChild,szClass,256);
    aaaaa=szClass;
    if (aaaaa=="Shell DocObject View")
   {
      return hwndChild;
      //Exit;
   }
    hwndTmp=hwndChild;

  }
}

 

 

void __fastcall TForm_main::N48Click(TObject *Sender)
{
 SendMessage(IEWEB(),WM_COMMAND,284,0);
}

 

Command IDs handled by the "Internet Explorer_Server" window:

#define ID_IE_CONTEXTMENU_ADDFAV        2261
#define ID_IE_CONTEXTMENU_VIEWSOURCE    2139
#define ID_IE_CONTEXTMENU_REFRESH       6042

 

 

Command IDs handled by the "Shell DocObject View" window:

#define ID_IE_FILE_SAVEAS               258
#define ID_IE_FILE_PAGESETUP            259
#define ID_IE_FILE_PRINT                260
#define ID_IE_FILE_NEWWINDOW            275
#define ID_IE_FILE_PRINTPREVIEW         277
#define ID_IE_FILE_NEWMAIL              279
#define ID_IE_FILE_SENDDESKTOPSHORTCUT  284
#define ID_IE_HELP_ABOUTIE              336
#define ID_IE_HELP_HELPINDEX            337
#define ID_IE_HELP_WEBTUTORIAL          338
#define ID_IE_HELP_FREESTUFF            341
#define ID_IE_HELP_PRODUCTUPDATE        342
#define ID_IE_HELP_FAQ                  343
#define ID_IE_HELP_ONLINESUPPORT        344
#define ID_IE_HELP_FEEDBACK             345
#define ID_IE_HELP_BESTPAGE             346
#define ID_IE_HELP_SEARCHWEB            347
#define ID_IE_HELP_MSHOME               348
#define ID_IE_HELP_VISITINTERNET        349
#define ID_IE_HELP_STARTPAGE            350
#define ID_IE_FILE_IMPORTEXPORT         374
#define ID_IE_FILE_ADDTRUST             376
#define ID_IE_FILE_ADDLOCAL             377
#define ID_IE_FILE_NEWPUBLISHINFO       387
#define ID_IE_FILE_NEWCORRESPONDENT     390
#define ID_IE_FILE_NEWCALL              395
#define ID_IE_HELP_NETSCAPEUSER         351
#define ID_IE_HELP_ENHANCEDSECURITY     375

posted on 2010-04-08 17:23  笔下有余  阅读(2671)  评论(0)    收藏  举报