![]() |
How to make two "Recent file" menu? |
Post Reply
|
| Author | ||
freehawk
Groupie
Joined: 22 April 2004 Status: Offline Points: 95 |
Post Options
Thanks(0)
Quote Reply
Topic: How to make two "Recent file" menu?Posted: 30 September 2004 at 10:58pm |
|
|
Hello . I want to make two "Recent file" menu as "Recent project file" and "Rcent source file", Please help me how to do? Thank you . |
||
![]() |
||
Boyd
Senior Member
Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 October 2004 at 8:00am |
|
|
The approach I took in the ActiveX version will probably apply to MFC as well. I created a toolbar control for 'Open File' that was of type xtpSplitButtonPopup. This allows the user to click on the control OR have it also display a popup. If they click on the control, the 'Execute' event of CommandBars handles that control to open the standard file open dialog. I also used the 'InitCommandsPopup' event of the of CommandBars to detect when the popup portion of the control was about to be displayed. At that point, I would remove all the previous child controls from the 'Open File' menu and add my current recent files controls. Each 'Open Recent' control had the same control ID, and the caption was used to determine which recent file the user wanted to open. I don't know the exact MFC approach for this, but this technique should be applicable to MFC as well. |
||
![]() |
||
freehawk
Groupie
Joined: 22 April 2004 Status: Offline Points: 95 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 October 2004 at 11:47pm |
|
|
Thank you very much. I will try it, BTW, could you have some sample for it?
|
||
![]() |
||
freehawk
Groupie
Joined: 22 April 2004 Status: Offline Points: 95 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 October 2004 at 4:42am |
|
|
I finished it. Thanks everyone.
|
||
![]() |
||
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 |