|
Hi everybody!
Situation: using a browser control to display html-pages hosting activeX controls.
Problem: tooltips doesn't work for all controls hosted in the html page.
Does anybody know how to enable/display tooltips for activeX - controls inside the html?
What I know is that every object inside the html has the IHTMLElement interface which has the property "title". This works fine for windowless controls but it seems to fail for "windowed" controls.
Any idea?
Thanks in advance!
Michael
|
|
|
|
|
Hi,
Check this article in MSDN: "HOWTO: Add Tooltips to ActiveX Controls" Article ID: Q141871.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Can I get the VersionIndependent ProgID from the CLSID? I tried ProgIdFromCLSID but it only returns the progId with the version number and that is not what I want.
|
|
|
|
|
Hi,
That's the only way the ProgIdFromCLSID function should work... You can find the version independent ProgID in the registry by object's CLSID.
\\HKEY_CLASSES_ROOT\CLSID\{51DBD0C1-77D7-11d2-94A2-006008939020}\VersionIndependentProgId
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Can't initialise a COM with regsvr32 on the machine without VC++ 6.0 installed ! But with V-studio there is no problems. Anyone knows why ?
|
|
|
|
|
Hi,
Probably your control links dynamically to one of the DLLs from VC++ (like MFC libraries)... You have to distribute all the DLLs you are using in your control or use static linking.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Thanks, I think I've found a problem. It's quite tricky if you don't know indeed.
The standard Windows NT configuration doesn't include an Atl.dll in system32 dir. Neither you can see it in "Dependency walker" when checking your COM deps., so to enable registration of ATL COM on the fresh installed NT, you must copy that dll and register it as well as it needs to have an Ole32aut.dll but proper version (NT, or 95). Unfortunately this small tip is not noticed anywhere you can see straight away and for new COM developers can be a time consuming.
Thanks again,
Dimitri.
|
|
|
|
|
|
If you build your project with /D "_ATL_STATIC_REGISTRY" compiler option you do not need atl.dll to register/unregister you component.
|
|
|
|
|
Hi.
I've made an ActiveX exe in VC++. How do I put it in a web page?
(I'm new at ActiveX EXE's. So maybe i'm going at this the wrong way.)
Thanks
Chris
|
|
|
|
|
Hi Chris,
There is a very nive article in MSDN called "Internet First Steps: Upgrading an Existing ActiveX Control". I think it exactly what you are looking for...
Regards,
Alex Gorev,
Dundas Software
|
|
|
|
|
Hi!
I have developed a simple COM object using ATL 3.0. I intend to use this object in a web page. Everything works nice except for the event firing. These events are being fired from a second thread via a PostMessage mechanism, so that no apartment issues arise. The strange thing is that my ProxyGenerator wizard generated code has the connections variable (int nConnections = m_vec.GetSize();) set to zero (watched this behaviour while debugging) so that the firing doesn't take place.
The same thing happens if i package my component has a Lite control. But it all works perfectly fine with a Full control. The problem is that i don't need a UI, consequently, i don't need a Full control's overhead. Is it possible for a simple Com object to Fire Events to the IE? How?
Please help me!
Thanks in advance.
Luís Teixeira
|
|
|
|
|
How can a COM server detect his clients ?
Best regards
|
|
|
|
|
Hi.
I'm Soohyun Bae.
Now I'd like to hook some messages invoked by IE document, for example, mousemove, mouse click, key down...
Now, I could receive these messages by connecting my class derived from IDispatch to IE document.
CImpDispatch* m_pEvents;
m_pEvents = new CImpDispatch((IOleInPlaceFrame *)this);
hr = pCPC->FindConnectionPoint( DIID_HTMLDocumentEvents, &m_pConnectionPoint );
hr = m_pConnectionPoint->Advise(m_pEvents, m_dwConnectCookie );
...
and CImpDispatch...
STDMETHODIMP CImpIDispatch::Invoke(
DISPID dispIdMember, REFIID riid,
LCID lcid, WORD wFlags,
DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
IHTMLEventObj *pEvtObj = NULL;
long x;
HRESULT hr;
if (dispIdMember == DISPID_HTMLDOCUMENTEVENTS_ONKEYDOWN )
{
hr = m_pWindow->get_event(&pEvtObj);
if (hr == S_OK)
{
pEvtObj->get_keyCode(&x);
// A key hook
if (x==65)
{
Trace("_HOOK: A key pressed");
x=0; // Point 1
hr = pEvtObj->put_keyCode(x); // Point 2
if (hr==S_OK)
{
pEvtObj->get_keyCode(&x);
}
}
}
}
return S_OK;
}
I could take reference code in www.microsoft.com/Mind/1297/hookIE.htm (really good...)
-----------------------------------------------------------
My Point is :
I hope to prevent resending specified message to IE.
I have thought that two points 1 and 2 could make so. But, ... couldn't...
How can I prevent resending ?
|
|
|
|
|
A server knows the client is present or not by using reference counting. But how knows the server when a client crashes. In that case the client is not able to call Release.
|
|
|
|
|
Does anyone how to import "tlbinf32.dll" ? When i tried like following:
#import "tlbinf32.dll" no_namespace named_guids
I got a bunch of compiler error.
Andy
|
|
|
|
|
import "tlbinf32.dll" exclude("ParamFlags", "IDLFlags", "ImplTypeFlags","_DirectCalls")
|
|
|
|
|
I am trying to write a DCOM server application. Some of the interface functions have paramaters that are user defined data types (structs). I have the header files where these type definitions are included in the server .h file included in the .h file of the server .cpp file. When I try to build, I receive the following error that points back to the .idl file:
"Expecting type specification near "data_type".
Any advice on how to remedy this. I am fairly new to DCOM/COM programming.
|
|
|
|
|
Hi,
(1) Your interfaces which uses structs or other defined types must me custom defined.
(2) The only place where you must define your structs is the .idl file (see below).
(3) Don't forget to compile your <yourserver>PS.mk (Visual Studio generatied make file)
(4) Use CoTaskMemAlloc() and CoTaskMemFree() to transfer the struct data (example shows an array of structs)
Success Aat
EXAMPLE
// YourServer.idl : IDL source for YourServer.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (YourServer.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
typedef struct
{
int iType;
int iValue;
// E.t.c.
} YOURSTRUCT;
// ....
[
object,
uuid(BECF60B9-2741-11D4-A05E-00B0D0201DD6),
helpstring("IYourObject Interface"),
pointer_default(unique)
]
interface IYourObject : IUnknown
{
[helpstring("method Read")] HRESULT Read([out,size_is(,*plNumStructs)] YOURSTRUCT** ppYourStructs, [in, out] long* plNumStructs);
[helpstring("method Write")] HRESULT Write([in,size_is(lNumStructs)] YOURSTRUCT* pYourStructs, [in] long lNumStructs);
};
|
|
|
|
|
Hi,
what is UI element in controlpanel / display properties.
there four tabs back ground, screen saver etc. what is that
UI element?
Thanks,
Koteswara
|
|
|
|
|
HELP !
I am VERY new to COM (3 days experience) and I want to do something which may sound a bit odd.
I wish to take a pointer to a C++ object from one application and pass it via COM to another C++ application.
The only stuff I have found on doing this involves serializing the objet to a CMemFile and passing it as a string.
The Object I wish to pass is a container and I do not wish to make everything it holds serializable, problem.
If anybody can help me it would be nice.
Thanks
|
|
|
|
|
You can try to get pointer to your object and then pass it to your COM object as LONG. That way your COM object will know the memory location of the object you are passing.
Peter
|
|
|
|
|
I have tried passing the pointer to the object as long.
When I do this it does not appear (when debugging the COM)to have the same value it had in the app which created it.
Also I could not get the long value back into the second app, it had a different value.
Puzzled !
|
|
|
|
|
If your com is an exe the passing a pointer as long will not work since the com is in a diferent process and therefore the address in the long is not valid. Passing pointers as long will work only if your COM is a dll.
(Don't forget to cast the pointer in both sides back to the structure it points to, before using it).
|
|
|
|
|
On the other hand it would be better to create a COM wraper for the object that you are passing. And than just pass the interface pointer.
|
|
|
|