|
: [C++ Error] Unit1.cpp(41): E2352 Cannot create instance of abstract class 'IHTMLDocument2'
: [C++ Error] Unit1.cpp(41): E2353 Class 'IHTMLDocument2' is abstract because of '__stdcall IHTMLDocument2::get_all(IHTMLElementCollection * *) = 0'
:
IHTMLDocument2란 클래스를 안써봐서 잘은 모르고요.
에러 메시지를 보면 이 클래스가 추상 클래스라서 그냥 인스턴스를 만들면 안된다고하네요.
이런 경우는 이 클래스의 객체를 만들어서는안되고
이 클래에서 상속받는 새로운 클래스를 정의한뒤에 사용해야 할겁니다.
class MyHtmlDoc : public ITHMLDocument2
{
};
void __fastcall TForm1::Button3Click(TObject *Sender)
{
MyHtmlDoc Document = WebBrowser1->Document;
IHTMLElementCollection **HCol;
Document.get_all(HCol);
}
|