I am writing a BHO for customizing IE7. For zooming facility, since I couldn't find any Zoom API I am trying to achieve this with IHTMLStyle3::Zoom. To get the pointer to IHTMLStyle3 interface I called IHTMLElement::get_style method but the problem is that "get_style" method returns pointer to IHTMLStyle interface whereas I need IHTMLStyle3 interface pointer because this has the "Zoom" method. Can any one suggest me a solution ? or any other better approach for zooming? any ideas/snippets on this will be helpful Other details: Language: C++, visual studio 2005 IE : IE7
"Yogesh Kumar" <Yogesh Kumar@discussions.microsoft.com> wrote in message news:805D1DEB-3832-4647-8022-66D30D8E9AC0@microsoft.com... > I am writing a BHO for customizing IE7. For zooming facility, since I > couldn't find any Zoom API I am trying to achieve this with > IHTMLStyle3::Zoom. To get the pointer to IHTMLStyle3 interface I called > IHTMLElement::get_style method but the problem is that "get_style" method > returns pointer to IHTMLStyle interface whereas I need IHTMLStyle3 interface > pointer because this has the "Zoom" method. > > Can any one suggest me a solution ? > or any other better approach for zooming? any ideas/snippets on this will > be helpful > > Other details: > Language: C++, visual studio 2005 > IE : IE7 Have you tried to queryinterface on the returned IHTMLStyle interface to get IHTMLStyle3? -- Anthony Jones - MVP ASP/ASP.NET
Yogesh Kumar <Yogesh Kumar@discussions.microsoft.com> wrote: > I am writing a BHO for customizing IE7. For zooming facility, since I > couldn't find any Zoom API http://msdn2.microsoft.com/en-us/library/ms691264.aspx See OLECMDID_OPTICAL_ZOOM, OLECMDID_OPTICAL_GETZOOMRANGE -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
@Anthony Yes I tried queryinterface earlier but it didn't work.Now its working :). Actually earlier I was using IID_IHTMLSTYLE3 instead of IID_IHTMLStyle3 . But the bad news is I am still unable to zoom my IE :( Anyway thanks for your help. @Igor Yes I have tried OLECMDID_OPTICAL_ZOOM, OLECMDID_OPTICAL_GETZOOMRANGE but I am getting a compilation error " OLECMDID_OPTICAL_ZOOM : undeclared identifier". I couldn't find which header file to include for this. Thanks, Yogesh. "Igor Tandetnik" wrote: > Yogesh Kumar <Yogesh Kumar@discussions.microsoft.com> wrote: > > I am writing a BHO for customizing IE7. For zooming facility, since I > > couldn't find any Zoom API > > http://msdn2.microsoft.com/en-us/library/ms691264.aspx > > See OLECMDID_OPTICAL_ZOOM, OLECMDID_OPTICAL_GETZOOMRANGE > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 > > >
"Yogesh Kumar" wrote in message news:8FFBEC6F-11FA-4AA9-AD55-0D8A77861062@microsoft.com > Yes I have tried OLECMDID_OPTICAL_ZOOM, OLECMDID_OPTICAL_GETZOOMRANGE > but I am getting a compilation error " OLECMDID_OPTICAL_ZOOM : > undeclared identifier". You need to download and install the latest Platform SDK. Or define your own constants: OLECMDID_OPTICAL_ZOOM has a numeric value 63, OLECMDID_OPTICAL_GETZOOMRANGE is 64. -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
Hi Igor, Its working now :). Thank you very very much!!! Yogesh. "Igor Tandetnik" wrote: > "Yogesh Kumar" wrote in message > news:8FFBEC6F-11FA-4AA9-AD55-0D8A77861062@microsoft.com > > Yes I have tried OLECMDID_OPTICAL_ZOOM, OLECMDID_OPTICAL_GETZOOMRANGE > > but I am getting a compilation error " OLECMDID_OPTICAL_ZOOM : > > undeclared identifier". > > You need to download and install the latest Platform SDK. Or define your > own constants: OLECMDID_OPTICAL_ZOOM has a numeric value 63, > OLECMDID_OPTICAL_GETZOOMRANGE is 64. > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 > > >