Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - AddSwapoutCommand
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AddSwapoutCommand

 Post Reply Post Reply
Author
Message
dehilster View Drop Down
Groupie
Groupie


Joined: 16 October 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote dehilster Quote  Post ReplyReply Direct Link To This Post Topic: AddSwapoutCommand
    Posted: 27 November 2011 at 12:49pm
// Input: nSwapOutID - The command ID of the menu item, defined in the menu resource,
// that should be replaced.
// nCommandID - The command ID to add to the menu.
// szName - The menu string to add.
// Summary: Call this method to set one or more swapout IDs, in the case where
// there is a dynamic menu item. An example of where this can be used is
// the MRU in a standard doc/view application. Add a single command
// to the menu resource that can be swapped out with the commands you
// set here. Call this method once for each command you want to replace.
// For example, if you had a command ID called IDC_MRUPLACEHOLDER, and
// you wanted to add four new items in place of this which are IDC_MRUFILE1,
// IDC_MRUFILE2, IDC_MRUFILE3, IDC_MRUFILE4 you should do the following: -
    //          <pre>
// kbsm.AddSwapoutCommand(IDC_MRUPLACEHOLDER, IDC_MRUFILE1, "File 1");
    //          kbsm.AddSwapoutCommand(IDC_MRUPLACEHOLDER, IDC_MRUFILE2, "File 2");
    //          kbsm.AddSwapoutCommand(IDC_MRUPLACEHOLDER, IDC_MRUFILE3, "File 3");
    //          kbsm.AddSwapoutCommand(IDC_MRUPLACEHOLDER, IDC_MRUFILE4, "File 4");</pre>
void AddSwapoutCommand(UINT nSwapOutID, UINT nCommandID, LPCTSTR szName);

I read the above but cannot see how to use it.

David de Hilster
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.154 seconds.