-
August 24th, 2013, 01:39 AM
#1
Menubar / Toolbar problem
Hi .. I need to activate and deactivate Menubar and Toolbar time to time.
I have written code :
CWnd * pFrame = (CWnd *)AfxGetMainWnd();
CMenu * menu = pFrame->GetMenu();
for (int mq = 0;mq < menu->GetMenuItemCount();mq++)
menu->EnableMenuItem(mq,MF_BYPOSITION|MF_GRAYED);
pFrame->DrawMenuBar();
I just change attibute MF_GRAYED to MF_ENABLED as required.
This works fine with MenuBar but there is a problem with ToolBar .
Toolbar Enable/Disable doesnot happen properly.
PL Guide
Thanking you ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|