Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / August 2005

Tip: Looking for answers? Try searching our database.

IVsPropertyPage, get_CategoryTitle() not called

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don B. - 05 Aug 2005 18:16 GMT
I'm working on a project system derived from the MyC sample in the VSIP
EnvSDK.  I'd like to add IVsPropertyPage functionality to the Build property
page, to place it under a category.  I've done this successfully with the
Debug property page, which has a different implementation.   I tried adding
the IVsPropertyPage interface to CBuildPPG, but get_CategoryTitle() is never
called.   Is there something else I need to do in order to trigger this call
from the framework?
"Gary Chang[MSFT]" - 06 Aug 2005 10:16 GMT
Hi Don,

>......  I'd like to add IVsPropertyPage functionality to the Build
>property page, to place it under a category.  I've done this
>successfully with the Debug property page, which has a different
>implementation.   I tried adding the IVsPropertyPage interface to
>CBuildPPG, but get_CategoryTitle() is never called.  
>...

Just as you figured out, the CBuildPPG has a different implementation from
the CDebugPPG(which derived from a CSettingsPage templete class), so we
would like to know how do you add the IVsPropertyPage interface to the
CBuildPPG class?

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
Don B. - 08 Aug 2005 17:52 GMT
Basically I just added IVsPropertyPage as one of the interfaces implemented
by  the CBuildPPG class:

class ATL_NO_VTABLE CBuildPPG :
   public CComObjectRootEx<CComSingleThreadModel>,
   public CComCoClass<CBuildPPG, &CLSID_BuildPPG>,
   public IPVFPrjPropertyPageImpl<CBuildPPG>,
   public IVsPropertyPage,  //  XXX === Added This One === XXX
   public CVsBaseDialogImpl<CBuildPPG>
{

and implemented get_CategoryTitle() in the CBuildPPG class pretty much the
same as in CSettingsPage for the Debug property page.  The only difference
was in how to set the category title for the page, but since this instance of
get_CategoryTitle() was never called, that didn't really matter much.

Thanks
--Don

> Hi Don,
>
[quoted text clipped - 23 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Don B. - 09 Aug 2005 23:06 GMT
I should probably clarify my problem statement.  What I want to accomplish is
implementation of a property page like the "Command Line" page in VC++ that
can be found under the project property categories C/C++, Linker, Resources,
etc.  The approach described previously was the one I used, but if there is a
better/easier way I'm all for it.

thanks
--Don

> Basically I just added IVsPropertyPage as one of the interfaces implemented
> by  the CBuildPPG class:
[quoted text clipped - 42 lines]
> >
> > This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Chang[MSFT]" - 11 Aug 2005 10:48 GMT
Hi Don,

I got it, would you please send me a self alone sample project(zipped) for
test, we need perform some further research on this issue.(please remove
the "online" of my email address)

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Chang[MSFT]" - 15 Aug 2005 10:03 GMT
Hi Joseph,

I have already received your sample project, I will contact our VSIP
support engineers to help you on this issue. We will update you as soon as
we get anything out.

Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
"Ed Dore [MSFT]" - 17 Aug 2005 23:25 GMT
Hi Don,

I'm guessing that you may not have an entry in that COM map for
IVsPropertyPage. I tried exactly what you described and I get the Build
page listed under the category string I supplied in my get_CategoryTitle
implementation. Below are the modifications I made to the MyC sample
package targeting Whidbey Beta 2. Given you are not seeing this method even
getting called, I suspect you might be missing that
COM_INTERFACE_ENTRY(IVsPropertyPage) entry in the COM map below.

// BuildPPG.h

class ATL_NO_VTABLE CBuildPPG :
   public CComObjectRootEx<CComSingleThreadModel>,
   public CComCoClass<CBuildPPG, &CLSID_BuildPPG>,
   public IMyCPrjPropertyPageImpl<CBuildPPG>,
    public IVsPropertyPage,
   public CVsBaseDialogImpl<CBuildPPG>
{
public:

  enum {IDD = IDD_PP_BUILD};

  CBuildPPG();
  ~CBuildPPG();

  static HRESULT WINAPI UpdateRegistry( /* [in] */ BOOL bRegister);

BEGIN_COM_MAP(CBuildPPG)
  COM_INTERFACE_ENTRY(IPropertyPage)
  COM_INTERFACE_ENTRY(IVsPropertyPage)
END_COM_MAP()

  ........

public:
  STDMETHOD(get_CategoryTitle)(UINT iLevel, BSTR* pbstrCategory);

  ..........

};

// BuildPPG.cpp

HRESULT CBuildPPG::get_CategoryTitle(UINT iLevel, BSTR* pbstrCategory)
{
    if (iLevel==0)
    {
        CComBSTR bstrMyCategory(_T("My Category"));
        *pbstrCategory = bstrMyCategory.Detach();
    }
    return S_FALSE;
}

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
Don B. - 19 Aug 2005 22:28 GMT
Of course this solved my problem.  Sheesh.  Thank you for helping this old
Unix programmer migrate to Windows.

--Don

> Hi Don,
>
[quoted text clipped - 54 lines]
>
> This post is 'AS IS' with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.