笔下有余

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

2010年1月11日

摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--void__fastcallTForm1::CppWebBrowser1DocumentComplete(TObject*Sender,LPDISPATCHpDisp,Variant*URL){if(... 阅读全文
posted @ 2010-01-11 15:47 笔下有余 阅读(784) 评论(0) 推荐(0)

2009年12月25日

摘要: if(PostData!=NULL&&PostData->vt==(VT_VARIANT|VT_BYREF)&&PostData->pvarVal->vt!=VT_EMPTY) { *Cancel=VARIANT_TRUE; char *szTemp=NULL, *szPostData=NULL; long plLbound,plUbound; S... 阅读全文
posted @ 2009-12-25 11:31 笔下有余 阅读(940) 评论(0) 推荐(0)

2009年12月15日

摘要: void __fastcall TForm1::tmr1Timer(TObject *Sender){ HWND a,b; a=FindWindow("TXGuiFoundation","QQ2009"); b=FindWindowEx(a,0,"ATL:30A410F8",NULL); if(!b==NULL) { SendMessage(b,WM_SETFOCUS,0,0); ShowWind... 阅读全文
posted @ 2009-12-15 15:03 笔下有余 阅读(452) 评论(0) 推荐(0)

摘要: API的英文全称(Application Programming Interface),WIN32 API也就是MicrosoftWindows 32位平台的应用程序编程接口。自己写点经常用的一些函数。//打开网页ShellExecute(NULL,NULL,"http://www.cnblogs.com/missu", NULL,NULL,SW_SHOW);//打开文件ShellExecute(... 阅读全文
posted @ 2009-12-15 14:55 笔下有余 阅读(193) 评论(0) 推荐(0)

摘要: //在Form的OnCreate事件中注册 WM_TASKBARCREATED 消息,并在托盘区添加图标 WM_TASKBARCREATED=RegisterWindowMessage("TaskbarCreated"); lIconMessage=RegisterWindowMessage("IconNotify");//添加图标void TForm2::AddTrayIcon(){ NOTIF... 阅读全文
posted @ 2009-12-15 14:40 笔下有余 阅读(859) 评论(0) 推荐(1)

摘要: ScrWidth=GetSystemMetrics(SM_CXSCREEN); ScrHeight=GetSystemMetrics(SM_CYSCREEN); 阅读全文
posted @ 2009-12-15 14:30 笔下有余 阅读(156) 评论(0) 推荐(0)

摘要: void TForm1::Login(){ CppWebBrowser1->Quit(); IHTMLDocument2 *Htmldoc = NULL ; CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument2, (LPVOID*)&Htmldoc) ; IHTMLElementCollection *el... 阅读全文
posted @ 2009-12-15 14:20 笔下有余 阅读(4949) 评论(0) 推荐(0)

摘要: AnsiString TForm1::WEB2HTMLCode(){ extern AnsiString str_CurrPath; AnsiString strCode; IHTMLDocument2 *HTMLDocument = NULL; if(SUCCEEDED(CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocumen... 阅读全文
posted @ 2009-12-15 14:17 笔下有余 阅读(758) 评论(0) 推荐(0)

摘要: IHTMLDocument2 *spDoc = NULL; bool __stdcall CrnRunJavaScript(IHTMLDocument2 *spDoc, LPSTR lpScript, LPSTR lpLang = "JScript");bool __stdcall CrnRunJavaScript(IHTMLDocument2 *spDoc, LPSTR lpScript, LP... 阅读全文
posted @ 2009-12-15 14:15 笔下有余 阅读(1513) 评论(0) 推荐(0)

摘要: void TForm1::ClickURL(AnsiString strURL) //登陆时{Variant disp,alllinks,eachlink;int linkcount;disp = CppWebBrowser1->Document;alllinks = disp.OlePropertyGet("links"); //取得所有的链接linkcount = alllinks.Ol... 阅读全文
posted @ 2009-12-15 14:11 笔下有余 阅读(1258) 评论(0) 推荐(0)