AddSwapoutCommand |
Post Reply |
Author | |
dehilster
Groupie Joined: 16 October 2005 Status: Offline Points: 16 |
Post Options
Thanks(0)
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
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |