Hi,
I have added a button to IE backed by a COM object using C#. Iam
able to achieve the required functionality on the click of the button.
However, I am unable to click the button again, i.e., my toolbar button
gets disabled and grayed out. I have implemented
IOleCommandTarget::QueryStatus implementation method as follows:
public int QueryStatus(ref Guid pguidCmdGroup, int cCmds, IntPtr
prgCmds, IntPtr pCmdText)
{
OLECMD ocmd;
bool temp= true;
ocmd.cmdf=
(UInt32)OLECMDF.OLECMDF_ENABLED|(UInt32)OLECMDF.OL ECMDF_SUPPORTED;
Marshal.StructureToPtr(ocmd.cmdf,prgCmds,temp);
return 0;
}
public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdExecOpt,
object[] pvaIn, object[] pvaOut)
{
Speak();//This function works fine;actually the text on the web page
is read out here!
return 0;
}
Since the button is disabled after first use, iam not able to use it
for any other links from this page.Please somebody giude me where iam
wrong.
Thanks and Regards,
Sujoan.