|
Just a guess, but you could try the IWebBrowser2::Quit method.
Steve
|
|
|
|
|
ayol12122 wrote:
And I destroy it with this:
pWebBrowser->Release();pWebBrowser = NULL;CoUninitialize ();
This is not destroying web browser. There are other methods.
you can use ,
long hWnd;
pWebBrowser->get_HWND(&hWnd);
SendMessage(hWnd,WM_CLOSE,0,0);
or
pWebBrowser->Quit();
|
|
|
|
|
really really thanx!!
i used quit and everything is ok.
Thanx to both you answered to my question
|
|
|
|
|
Hi,
I've created an ActiveX control. The Control class (***Ctl) in it should be derived from a class in another dll (which is also created by me). I want to load the ActiveX control dynamically in a container exe and check if the Ctl class is derived from the base class in the dll (This container is also created by me).
The base class in the dll is called TusMacroOcxBase and it is derived from COleControl.
The Ctl class in the ActiveX control which is derived from TusMacroOcxBase is called CTusSampleOcxCtrl.
I decided to make use of CRuntime class's methods to check the class type information (Since COleControl is already derived from CObject). So I proceeded by using the DECLARE_DYNAMIC/DECLARE_DYNCREATE and IMPLEMENT_DYNAMIC/IMPLEMENT_DYNCREATE macros. I also enabled RTTI in the container exe.
My problem is that when I write IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, TusMacroOcxBase) in CTusSampleOcxCtrl class's .cpp file, it gives error LNK2001.
The error message is given below.
TusSampleOcxCtl.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const TusMacroOcxBase::classTusMacroOcxBase" (?classTusMacroOcxBase@TusMacroOcxBase@@2UCRuntimeClass@@B)
Here is the code snippet:
Base class - .h
class _declspec(dllexport) TusMacroOcxBase : public COleControl
{
public:
DECLARE_DYNAMIC(TusMacroOcxBase)
....
Base class - .cpp
IMPLEMENT_DYNAMIC( TusMacroOcxBase, COleControl )
Derived class - .h
class CTusSampleOcxCtrl : public TusMacroOcxBase
{
DECLARE_DYNCREATE(CTusSampleOcxCtrl)
....
Derived class - .cpp
IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, TusMacroOcxBase)
I can solve the error easily by replacing IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, TusMacroOcxBase) with IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, COleControl), but I cant do that since I need to get the exact base class of CTusSampleOcxCtrl in the container exe. If I give COleControl there, I will get the base class as COleControl only.
Is there any other way? I've tried different combinations of DECLARE_DYNAMIC/DECLARE_DYNCREATE and IMPLEMENT_DYNAMIC/IMPLEMENT_DYNCREATE also.
Any help will be greatly appreciated.
Thanks in advance,
Rems.
|
|
|
|
|
Please check whether you hav added lib path Project|Properties|Linker|Input|Addition
al Dependencies.
Rinu Raj
|
|
|
|
|
Thanks for your response.
I've already added the lib.
|
|
|
|
|
is that lib available in path ? if not please add the path
what about the header file associated is that compatible with the lib ?
Rinu Raj
|
|
|
|
|
Yes.lib is available..Header everything is ok..
|
|
|
|
|
HI ALL,
I have an HTML File. I have to extract all text strings from that html file.
I am using MSHTML.But I dont know where can i find that exact function to get all text strings from a html file.
How can i do this ?
Kindly help me on this issue. Most Urgent !.
|
|
|
|
|
Hope I understood your question
See here[^]
|
|
|
|
|
Dear this is not sufficient.
Can you do more ?
|
|
|
|
|
Give him a day or two and I'm sure he will code a library for you.
You can try parsing the document retrieving text from the HTML tags, for that you will find many examples on CP for parsing a document.
|
|
|
|
|
No ...
I want to take all text strings (each and every line) (not tags) in a html file separatly.
|
|
|
|
|
What exactly do you want?
1. All the text strings, excluding the HTML tags.
2. All the HTML tags, excluding any other string.
3. Everything in the file.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
The first one ..
All the text Strings, excluding the HTML tags .
|
|
|
|
|
There are many good articles on CP for that. This article may be of your interest.
http://www.codeproject.com/cpp/krhtmlviewer.asp
"Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein
|
|
|
|
|
No. that is not useful thing.
Do you konw any interface that have some function which can do this ? .
|
|
|
|
|
Please don't tell me that is not useful. It pretty well says how to parse a HTML file. There is a huge list of articles with regard to your concern if you search "HTML" in articles, enabling only the "Visual C++/MFC" checkbox. And you have your piece of cake in it.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
You have been given answers and you have been given links. If you are unwilling to listen to advice then please stop wasting our time asking. If you want to fix your problem, read the articles provided to you and modify them to suit your needs. Nobody here is going to give you the code.
|
|
|
|
|
In order to find a string in a HTML file, you will first need to find the relevent tags. This will then give you an idea about where the string is, where it ends, and what type of string it is.
|
|
|
|
|
Sakthiu wrote: ...(each and every line)...
HTML files are not confined to lines (e.g., you could have all of them on a single 'line'). Assuming so is just asking for trouble.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
its someone who have an ideea how to limit the upload speed from my computer ?
Bravoone
|
|
|
|
|
I have created a structure as
typedef struct __test{
char buf[10];
}TEST,*PTEST;
then i created a CList object as
CList<PTEST ,PTEST>my_firststruct;
then i am using to store linklist
if( my_firststruct.IsEmpty())
my_firststruct.Addhead(pTest);
else
my_firststruct.AddTail(pTest);
It is working fine. But problem start when i am using as
typedef struct __Second{
char buf[10];
}SECOND,*PSECOND;
typedef struct __test{
CList<PSECOND,PSECOND>my_secondstruct;
char buf[10];
}TEST,*PTEST;
if(pTest->my_secondstruct.IsEmpty())
when i am trying to call this is giving me error error code is
C0000005: This error is with memory. So how i will resolve this error.
Can any one help me on this...?
-- modified at 9:41 Wednesday 27th September, 2006
|
|
|
|
|
What is the error you are facing with
struct XXXX{
CList<ppp,ppp&>my_second_Struct;
char buff[10];
char buff1[10];
}YYY;
??
Rinu Raj
|
|
|
|
|
I have created a structure as
typedef struct __test{
char buf[10];
}TEST,*PTEST;
then i created a CList object as
CList<PTEST ,PTEST>my_firststruct;
then i am using to store linklist
if( my_firststruct.IsEmpty())
my_firststruct.Addhead(pTest);
else
my_firststruct.AddTail(pTest);
It is working fine. But problem start when i am using as
typedef struct __Second{
char buf[10];
}SECOND,*PSECOND;
typedef struct __test{
CList<PSECOND,PSECOND>my_secondstruct;
char buf[10];
}TEST,*PTEST;
if(pTest->my_secondstruct.IsEmpty())
when i am trying to call this is giving me error error code is
C0000005: This error is with memory. So how i will resolve this error.
Can any one help me on this...?
|
|
|
|