Click here to Skip to main content
16,006,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalm_viewList variable Pin
microsoftcertificate4-May-05 17:07
sussmicrosoftcertificate4-May-05 17:07 
GeneralRe: m_viewList variable Pin
Priyank Bolia5-May-05 0:09
Priyank Bolia5-May-05 0:09 
GeneralMSDN example chatsrvr Pin
microsoftcertificate4-May-05 13:52
sussmicrosoftcertificate4-May-05 13:52 
GeneralRe: MSDN example chatsrvr Pin
Michael Dunn4-May-05 16:33
sitebuilderMichael Dunn4-May-05 16:33 
GeneralA question on switching compilers... Pin
Brian R4-May-05 12:55
Brian R4-May-05 12:55 
GeneralRe: A question on switching compilers... Pin
David Crow5-May-05 3:08
David Crow5-May-05 3:08 
GeneralAuto-Completing CDataCombo Pin
Roshprog4-May-05 12:20
Roshprog4-May-05 12:20 
GeneralMenu reappears after being deleted Pin
elephantstar4-May-05 11:50
elephantstar4-May-05 11:50 
If the constant MECHANICAL was defined in the main class, I remove a menu item in InitInstance(). Now at the start of the application, the menu does get deleted. But when I go to File->New, the deleted menu reappears. How do I stop it from re-appearing? Thanks!

//MainApp
#define MECHANICAL

//In main app in function InitInstance()
#ifdef MECHANICAL
pMainFrame->OnChangeFileMenu();
#endif

void CMainFrame::OnChangeFileMenu()
{
CWnd* pMain = AfxGetMainWnd();

// Get the menu from the application window.
CMenu* mmenu = pMain->GetMenu();

// Look for "Tools" menu.
int pos = FindMenuItem(mmenu, &Tools");
if (pos > -1)
mmenu->DeleteMenu(pos, MF_BYPOSITION);

pMain->DrawMenuBar();

}

int CMainFrame::FindMenuItem(CMenu *menu, LPCTSTR menustr)
{
ASSERT(menu);
ASSERT(::IsMenu(menu->GetSafeHmenu()));

int count = menu->GetMenuItemCount();
for (int i = 0; i < count; i++)
{
CString str;
if (menu->GetMenuString(i, str, MF_BYPOSITION) &&
(strcmp(str, menustr) == 0))
return i;
}

return -1;
}
QuestionHow do I add text to a list control inside a property sheet? Pin
realius4-May-05 10:45
realius4-May-05 10:45 
AnswerRe: How do I add text to a list control inside a property sheet? Pin
David Crow5-May-05 3:20
David Crow5-May-05 3:20 
GeneralResizing comboboxes Pin
Jörgen Sigvardsson4-May-05 9:33
Jörgen Sigvardsson4-May-05 9:33 
GeneralRe: Resizing comboboxes Pin
toxcct5-May-05 1:06
toxcct5-May-05 1:06 
GeneralRe: Resizing comboboxes Pin
Jörgen Sigvardsson5-May-05 1:10
Jörgen Sigvardsson5-May-05 1:10 
GeneralInterop::Excel::Hell Pin
Delver4-May-05 9:24
Delver4-May-05 9:24 
QuestionHow to detect video card type? (PCI/AGP/PCI-E) Pin
umgoblue5254-May-05 8:56
umgoblue5254-May-05 8:56 
GeneralLinking errors with MFC Dialog Based application and Crypto++ Pin
Crocodilek4-May-05 8:45
Crocodilek4-May-05 8:45 
GeneralRe: Linking errors with MFC Dialog Based application and Crypto++ Pin
Crocodilek5-May-05 19:18
Crocodilek5-May-05 19:18 
GeneralRe: Linking errors with MFC Dialog Based application and Crypto++ Pin
Crocodilek5-May-05 19:19
Crocodilek5-May-05 19:19 
Generalsdk Pin
_tasleem4-May-05 6:57
_tasleem4-May-05 6:57 
GeneralRe: sdk Pin
David Crow4-May-05 7:25
David Crow4-May-05 7:25 
GeneralRe: sdk Pin
_tasleem4-May-05 8:04
_tasleem4-May-05 8:04 
GeneralRe: sdk Pin
David Crow4-May-05 8:53
David Crow4-May-05 8:53 
Generalapi in vc Pin
4-May-05 6:27
suss4-May-05 6:27 
GeneralRe: api in vc Pin
Maximilien4-May-05 6:43
Maximilien4-May-05 6:43 
GeneralRe: api in vc Pin
4-May-05 7:07
suss4-May-05 7:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.