감사합니다~^^
빌더초보 님이 쓰신 글 :
: 될겁니다 아마도(?)...
:
: TWebBrowser는 사용해본적이 없어서...
:
: 하얀화면이 찍히는건 확인했습니다.
:
:
: //---------------------------------------------------------------------------
: void __fastcall TForm1::Button1Click(TObject *Sender)
: {
: CaptureControl3(WebBrowser1, "z:\\cccc.bmp");
: }
: //---------------------------------------------------------------------------
: void __fastcall TForm1::CaptureControl3(TControl *ctrl, AnsiString filename)
: {
: Graphics::TBitmap *bmp=new Graphics::TBitmap;
: bmp->Width=ctrl->Width;
: bmp->Height=ctrl->Height;
: if(ctrl->InheritsFrom(__classid(TWinControl)))
: {
: TWinControl *wCtrl=(TWinControl *)ctrl;
: bmp->Canvas->Lock();
: if(GetWindowLong(wCtrl->Handle, GWL_STYLE) & WS_BORDER )
: wCtrl->PaintTo(bmp->Canvas->Handle, 1,1);
: else wCtrl->PaintTo(bmp->Canvas->Handle, 0,0);
: bmp->Canvas->Unlock();
: }
: else
: {
: ctrl->Perform(WM_PAINT,(int)bmp->Canvas->Handle,0);
: }
: bmp->SaveToFile(filename);
: delete bmp;
: }
: //---------------------------------------------------------------------------
:
:
: 출처
: http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=1010
:
: its 님이 쓰신 글 :
: : WebBrowser 컴포넌트의 웹화면을 캡쳐하는 방법좀 알려주십시오.
: : 좋은 고수님의 답변 부탁합니다.
: :
: : 욕설, 비방, 컴포넌트 설치요구 사절
|