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

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
LVL 1
nv3prasadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZoppoCommented:
Thank's a lot        :)

have a nice weekend,

ZOPPO
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nv3prasadAuthor Commented:
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
ZoppoCommented:
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
nv3prasadAuthor Commented:
Thank you for posting the answer I appreciate it!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.