wpFilterMenu - Example Code

In this example, the Tree view option is removed from the Open popup menu and the Delete option is added.

 SOM_Scope BOOL SOMLINK TextFolderwps_wpFilterMenu(TextFolder *somSelf,
                        PFILTERFLAGS pFlags,
                        HWND hwndCnr,
                        BOOL32 fMultiSelect,
                        ULONG ulMenuType,
                        ULONG ulView,
                        ULONG ulReserved)

 {
     BOOL     bParentResult;

     /* TextFolderData *somThis = TextFolderGetData(somSelf); */
     TextFolderMethodDebug("TextFolder","TextFolderwps_wpFilterMenu");

     bParentResult = parent_wpFilterMenu(somSelf,
                                         pFlags,
                                         hwndCnr,
                                         fMultiSelect,
                                         ulMenuType,
                                         ulView,
                                         ulReserved);

     if (ulMenuType == MENU_OPENVIEWPOPUP)
     {

        /* This is a pop-up menu - remove the Tree view menu option and
         * make sure the Delete option is available
         */
        pFlags->Flags[0] |= CTXT_DELETE;
        pFlags->Flags[0] &= ~CTXT_TREE;
     }

     return bParentResult;
 }


[Back: wpFilterMenu - Related Methods]
[Next: wpFilterMenu - Topics]