Print Page | Close Window

AddSwapoutCommand

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=19230
Printed Date: 21 November 2024 at 1:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: AddSwapoutCommand
Posted By: dehilster
Subject: AddSwapoutCommand
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net