Dear All,
I am trying to use TWebBrowser with OpenCV (Open computer vision library).
Simply, I create the browser at runtime with no problem as in the following code:
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TWebBrowser* WebBrowser = new TWebBrowser(this);
Form1->InsertControl(WebBrowser);
TWinControl(WebBrowser).Parent = this;
WebBrowser->Align = alClient;
WebBrowser->Visible = true;
WebBrowser->Navigate("}
//---------------------------------------------------------------------------
Now, I added the following code which is related to OpenCV library to load image:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IplImage* img = cvLoadImage("MyImage.bmp");
}
//---------------------------------------------------------------------------
Now, I compiled the project successfully with no warnings or errors but when the Form is going to launch I get the following message box:
"Could not obtain OLE control window handle"
I think this is related to OLE and I don't have good knowledge in dealing with OLE error messages.
This is the following full code:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "cv.h"
#include "highgui.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TWebBrowser* WebBrowser = new TWebBrowser(this);
Form1->InsertControl(WebBrowser);
TWinControl(WebBrowser).Parent = this;
WebBrowser->Align = alClient;
WebBrowser->Visible = true;
WebBrowser->Navigate("}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IplImage* img = cvLoadImage("MyImage.bmp");
}
//---------------------------------------------------------------------------
My question is: What does this message tell exactly? and how to solve this problem?
Your answers will be highly appreciated.
Regards,
engmw
I am trying to use TWebBrowser with OpenCV (Open computer vision library).
Simply, I create the browser at runtime with no problem as in the following code:
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TWebBrowser* WebBrowser = new TWebBrowser(this);
Form1->InsertControl(WebBrowser);
TWinControl(WebBrowser).Parent = this;
WebBrowser->Align = alClient;
WebBrowser->Visible = true;
WebBrowser->Navigate("}
//---------------------------------------------------------------------------
Now, I added the following code which is related to OpenCV library to load image:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IplImage* img = cvLoadImage("MyImage.bmp");
}
//---------------------------------------------------------------------------
Now, I compiled the project successfully with no warnings or errors but when the Form is going to launch I get the following message box:
"Could not obtain OLE control window handle"
I think this is related to OLE and I don't have good knowledge in dealing with OLE error messages.
This is the following full code:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "cv.h"
#include "highgui.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TWebBrowser* WebBrowser = new TWebBrowser(this);
Form1->InsertControl(WebBrowser);
TWinControl(WebBrowser).Parent = this;
WebBrowser->Align = alClient;
WebBrowser->Visible = true;
WebBrowser->Navigate("}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IplImage* img = cvLoadImage("MyImage.bmp");
}
//---------------------------------------------------------------------------
My question is: What does this message tell exactly? and how to solve this problem?
Your answers will be highly appreciated.
Regards,
engmw