}
static UINT
-msi_seltree_popup_menu( HWND hwnd, INT x, INT y )
+msi_seltree_popup_menu( HWND hwnd, INT x, INT y, INT Attributes )
{
HMENU hMenu;
INT r;
/* FIXME: load strings from resources */
AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_LOCAL, "Install feature locally");
AppendMenuA( hMenu, MF_GRAYED, 0x1000, "Install entire feature");
- AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_ADVERTISED, "Install on demand");
- AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_ABSENT, "Don't install");
+ if (!(Attributes & msidbFeatureAttributesDisallowAdvertise))
+ AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_ADVERTISED, "Install on demand");
+ if (!(Attributes & msidbFeatureAttributesUIDisallowAbsent))
+ AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_ABSENT, "Don't install");
r = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
x, y, 0, hwnd, NULL );
DestroyMenu( hMenu );
SendMessageW( hwnd, TVM_GETITEMRECT, 0, (LPARAM) &u.rc );
MapWindowPoints( hwnd, NULL, u.pt, 2 );
- r = msi_seltree_popup_menu( hwnd, u.rc.left, u.rc.top );
+ r = msi_seltree_popup_menu( hwnd, u.rc.left, u.rc.top, feature->Attributes );
switch (r)
{