Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Empty "AddItem" view after calling 'AddProjectItemDlg(...)' with my own Project Template and GUID

$
0
0

Hello anyone,

I am developing a VS extension which has to provide individual project wizards as well.

I have the following code which is used for calling a dialog to allow me to add new project items, e.g. a individual C++ class or specialized  project items. The dialog opens but no items are listed.

if ( pPrjDef )
{
pPrjDef->InsertItemInTree( m_pDoc->m_pTreeCtrl, GetTreeHandle(), TVI_LAST );

if ( FAILED(spAddItem->AddProjectItemDlg(
   pPrjDef->GetVsItemID()
 , GUID_TcHmiProject
 , spProj
 , VSADDITEM_ShowProjectTypesOnly
  | VSADDITEM_AddNewItems
  | VSADDITEM_NewDirectoryForItem
  | VSADDITEM_ShowLocationField
 , L""
 , L""
 , &bstr1
 , &bstr2
 , &bBool))
) {
  pPrjDef->SetSaveInOwnFile(false);
  m_pDoc->m_pTreeCtrl->DeleteItem(pPrjDef->GetTreeHandle());
  delete pPrjDef;
  }
}


In the Windows registry I have added parts for mapping a project GUID to my project template:

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config\Projects\{AAF27D8F-F49B-460C-8388-908D2E177F7D}]
@="My HMI Project""DisplayName"="HMI Project""Package"="{16a09aeb-7616-4147-ab22-721f8fb090fc}""ProjectTemplatesDir"="$=HKEY_CURRENT_USER\\Software\\Something\\InstallDir$Components\\Base\\HmiTemplate""DisplayProjectFileExtensions"="""PossibleProjectExtensions"="""DefaultProjectExtension"=""

[HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config\Projects\{AAF27D8F-F49B-460C-8388-908D2E177F7D}\AddItemTemplates]

[HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config\Projects\{AAF27D8F-F49B-460C-8388-908D2E177F7D}\AddItemTemplates\TemplateDirs]

[HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config\Projects\{AAF27D8F-F49B-460C-8388-908D2E177F7D}\AddItemTemplates\TemplateDirs\{16a09aeb-7616-4147-ab22-721f8fb090fc}]

[HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config\Projects\{AAF27D8F-F49B-460C-8388-908D2E177F7D}\AddItemTemplates\TemplateDirs\{16a09aeb-7616-4147-ab22-721f8fb090fc}\/1]
@="#806""TemplatesDir"="$=HKEY_CURRENT_USER\\Software\\Something\\InstallDir$Components\\Base\\HmiTemplate\\Default""SortPriority"=dword:00000064


In the referenced directory following files are added:

-> HmiWizard.ico
-> HmiWizard.vsdir
-> HmiWizard.vsz

The HmiWizard.vsz has the following content:

VSWIZARD 7.0
Wizard={E8C53FCE-85FC-4BB4-A62A-B04C4F2F78D9}
Param="%COOLTOOLDIR%Components\Base\HmiTemplate\Default\HmiWizard\HmiProjectConfig.xml"
Param="TriggerAddHmi=true"

For sure, the Wizard is implemented and registered within the Registry.

GUID_TcHmiProject

is set to the relevant GUID:

AAF27D8F-F49B-460C-8388-908D2E177F7D

of the Registry entry.

Calling AddItemProjectDlg() does not show anything, no items, no information, ...

Is there a way to verify what the dialog is doing behind the scenes? How can someone check the installation?

Does someone know the trick for deploying everything "correctly"?

The MS documentation lacks absolutally on this issue.

All the best




Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>