[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Points for Zoppo's - nLevel deep recursive menu...

Posted on 2000-02-11
4
Medium Priority
?
235 Views
Last Modified: 2013-11-20
This is bascically a dummy question to award poits to  Zoppo, who had given the right solution to my question regarding n-level deep sub menu recursive function.

So guys do not try to answer anything here.

Zoppo, I appreciate your answer.

nv3prasad
0
Comment
Question by:nv3prasad
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 400 total points
ID: 2513972
Thank's a lot        :)

have a nice weekend,

ZOPPO
0
 
LVL 1

Author Comment

by:nv3prasad
ID: 2518696
Thanks for your comment, may be you can copy your answer to this question since people who are searching will get something for their points!

Thank you again, Have a wonderful time.

Bye
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2518720
No problem ...

Answer for question Q.10292165...

void
CMainFrame::ReadMenus()
{
 CMenu* pMenu = GetMenu();
 ReadMenu( pMenu );
}

void
CMainFrame::ReadMenu( CMenu* pMenu )
{
 static int deep = 1; // just a counter to make the TRACE look fine
 deep++;
 UINT i, num = pMenu->GetMenuItemCount();
 CMenu* pSubMenu;
 CString item;
 for ( i = 0; i < num; i++ )
 {
  pSubMenu = pMenu->GetSubMenu( i );
  if ( pMenu->GetMenuItemID( i ) == 0 )
   item = "------------------------";// Seperator
  else
   pMenu->GetMenuString( i, item, MF_BYPOSITION);
  TRACE( "%*s%s\n", deep, "|-", item );
  if ( pSubMenu )
   ReadMenu( pSubMenu ); // recurse into popup menu
 }
 deep--;
}

thanks nv3prasad,

ZOPPO
0
 
LVL 1

Author Comment

by:nv3prasad
ID: 2520985
Thank you for posting the answer I appreciate it!
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question