|
Since you're using MFC, maybe worthy a look at http://msdn2.microsoft.com/en-us/library/95357zak(VS.80).aspx[^]
Bottom line, if it is useful, send the beer to Mummy Microsoft!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
If your "getValue" method has [retval] attribute, you can write:
DIM myInteger<br />
myInteger = myCtrl.getValue<br />
With best wishes,
Vita
|
|
|
|
|
Vita,
Yes, thank you, I know this. But what I want to know is how to do this (example):
DIM nStatus
DIM nWhatever
nStatus = myCtrl.DoSomething(nWhatever)
and .DoSomething returns a value in nWhatever....
chg
Charlie Gilley
Will program for food...
|
|
|
|
|
It's possible for VBScript, for example, but is never possible for JScript.
1) [out] parameter should be VARIANT*.
2) else there should be the Invoke handler be able to convert VARIANT with VT_VARIANT|VT_BYREF to obtain any type. I didn't met such default handlers.
With best wishes,
Vita
|
|
|
|
|
Hello,
I developed a simple browser helper object in VC++ as an ATL project which listens for the DocumentComplete event of the DWebBrowserEvents2 interface.
When testing it I discovered that this event is not fired if the user presses the reload button.
Why is that? And what is the proper event which is fired, when the document is loaded and is fired again, when the document is reloaded?
Thanks for your attention.
Constantin
|
|
|
|
|
|
I found article is using CCmdTarget for finding sink.
I am actually in similar problem,where I am trying to monitor IE with help of
toolbar, so I am using pure atl,com and not mfc.So what is alternative way to monitor events.Or I have to in similar way.
I have IWebBrowser2 object in my hand.
|| ART OF LIVING ||
|
|
|
|
|
I included the technique described in this article and found out that it works under most circumstances but not all:
The event pair DownloadBegin/DownloadComplete which is used to detect the refresh of the page
gets also trigged if the page uses a remote scripting technique. So we would get a false alarm each time the page appends a script node to the DOM.
I played around with another Add-on (the Snap Shot Add-On from www.snap.com) and found out, that it somehow gets DocumentComplete to be triggered if the user presses the pages refresh button.
But how do they do that? And is there maybe a reason that DocumentComplete isn't called when the page reloads?
Best regards
Constantin
|
|
|
|
|
I created a dialog-based MFC applicatioon using wizard and then I added a ActiveX composite control implemented in CMyControl class by adding ATL support to my MFC application. and it added a IDD_MyCOntrol dialog to application.
I want to display this composite control dialog. By default, MFC creates an instance of dialog class and use DoModal on that dialog. I removed that part from InitInstance() and wants to add
something like CComCompositeControl::Create or CreateWindow.. etc which can display that composite control dialog box.
How can I do that as I am not able to get the instance of CMyControl class since simply using new is not allowed as compiler gives an abstarct class error etc
I tried to get the instance of CMyControl class using CComObject but then could not get the pointer to CComCompositeCOntrol class so that I could use create function.
Any idea how to display that composite control dialog box??? it looked easy to me. anny suggestions? links? sample code?
PS: really dont expect any answer to such a badly written question. m just tired
|
|
|
|
|
lol! never mind. i was just tired that night. i was trying to badly mix the MFC and ATL and forgot where one ends and another begins. Composite Control is specifically in ATL and 'Create' should work for it for displaying it. In MFC, I just had to use my activeX control on the default dialog Box provided by MFC dialog based appln. I did not require to use composite control for hadnling that activeX control...i dont know from where i got the idea to use ATL.
anyway, thx all.
|
|
|
|
|
Hey
I have also same kind of the problem and i am not able to add variable for activex control(Shockwaveflash).
Any hint on how to add variable to this control?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Are you trying to add activeX control inside MFC application? I have not got any error while attaching a variable to shockwave activeX control. I simply added a shock wave flash object inside a MFC application and then using class wizard, attached a variable to it - a CShockwaveFlash object. Are you able to include the CShockwaveFlash class? If yes, then there should not be any problem in instantiating it. Please write the error you are getting in detail.
BTW my problem was different and not related to adding variable to activeX control.
Thanks.
|
|
|
|
|
Thanks for your kind reply.
I am adding ShockwaveFlash activex in ATL Dialog not in MFC dialog, because my applicaion is for Outlook Addin and it is unable to display MFC Dialog(It only Display ATL Dialog).
I am able to add ShockwaveFlash in Desin view but unable to asign variable to it.
Any Idea?
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
hi
I want to embed the Windows Media Player to my C# win app
I did it successfully.
and I know that for changing it's skin, have to use of 'IWMPRemoteMediaServices.GetCustomUIMode' method.
but I can not find this method at all.
I do not know how can select a desired skin for my WMP object in my application.
anybody help me ?!
H.R
|
|
|
|
|
Hello,
I wrote a simple Broser Helper Object as an ATL COM component which works just fine when running it from Visual Studio or registering it with regsvr32. Also I created a setup project for deployment of the BHO.
What I would like to know is what I need to do in my setup project so the DLL file is registered correctly and becomes executed when the Internet Explorer starts.
Does someone know which steps I must process exactly?
Thanks!!
Constantin
|
|
|
|
|
|
Hello Sohail,
it helped a little bit:
A BHO is a COM server and should be registered both as a COM server and as a BHO.
But how do I do this in with my setup project. I guess the second step is done by registering the COM as an BHO:
HKLM {
SOFTWARE {
Microsoft {
Windows {
CurrentVersion {
Explorer {
'Browser Helper Objects' {
ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F}
}}}}}}}
This code snippet is also from the link you provided, but shouldn't I change ForceRemove {...} to NoRemove {...} , because I want the key to be persistent after running the setup...
And how do I do the first step - registering my COM server - in the setup project?
Thanks in advance!
Constantin
|
|
|
|
|
conman110 wrote: HKLM { SOFTWARE { Microsoft { Windows { CurrentVersion { Explorer { 'Browser Helper Objects' { ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F} }}}}}}}
is code for RGS file if you are developing your component using ATL.
conman110 wrote: but shouldn't I change ForceRemove {...} to NoRemove {...}, because I want the key to be persistent after running the setup
ForceRemove clause that causes the key to be removed when you unregister the object.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Ok, but my question actually is, how I should adjust my setup project so the COM object is registered on the target machine (what steps have to be done in the registry) and what has to be done to register this COM object as an BHO (also which steps are required in the registry, but I guess it's the key you were refering to in your link)?
You see, it seems the COM object gets automatically registered by Visual Studio when building the project and this has to be done by the setup project when installing the BHO on another machine also.
Constantin
|
|
|
|
|
conman110 wrote: what steps have to be done in the registry) and what has to be done to register this COM object as an BHO (also which steps are required in the registry, but I guess it's the key you were refering to in your link)?
Since its a COM server, you have to register it in a way all other COM server are registered. Now this is a special server/component that is also a BHO, so for Explorer to recognize it as BHO some special registry key is required in the Registry. This special registry entry is to be made under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects
as shown in the link I gave you.
conman110 wrote: You see, it seems the COM object gets automatically registered by Visual Studio when building the project and this has to be done by the setup project when installing the BHO on another machine also.
Are you using ATL for building your COM server? If yes then there is a .RGS file in ATL projects that contains details of registration. ATL Registrar object takes care of registration. See DllRegisterServer and DllUnregisterServer function code in your ATL project. The code is autogenerated by wizard.
If you want to manually register COM DLL servers, we can use a Windows utility - regsvr32.exe
In the MSI package, if you open it in Orca tool for editing, you will find a table called SelfReg[^]. Any self registering component can have an entry in this table which results in auto-registration during intallation.
If you are using any other tool for creating the Installation setup then consult how it handle SelfRegistration of components.
Does following link help -
http://support.microsoft.com/?id=307367[^]
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Thank you Sohail,
you gave me the information I needed!
Best regards!
Constantin
|
|
|
|
|
Glad I could help
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
When i executed VC++6.0 project(MFC and ATL application) i encountered an error message "COM Error: 0x80040154" .
Q. What the error means and how it can be solved?
|
|
|
|
|
Catharin wrote: COM Error: 0x80040154
Corresponds to REGDB_E_CLASSNOTREG.
Quoting from MSDN,
REGDB_E_CLASSNOTREG
A specified class is not registered in the registration database. Also can indicate that the type of server you requested in the CLSCTX enumeration is not registered or the values for the server types in the registry are corrupt.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
What all steps are needed for solving the above scenario?
|
|
|
|