Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to enable...

how to enable...

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Natural_Demon
    wrote on last edited by
    #1

    how to enable a system menu again from another class this part works fine ... void Cfirstw32mfcDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout; dlgAbout.DoModal(); } else { CDHtmlDialog::OnSysCommand(nID, lParam); } if ((nID & 102) == IDS_ZONENAME) { CAddzonename* pDialog; pDialog = NULL; pDialog = new CAddzonename(this); if(pDialog != NULL) { BOOL ret = pDialog->Create(); if (ret) { EDIT2 =("done"); UpdateData(FALSE); CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(IDS_ZONENAME,MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); } if(!ret) //Create failed. AfxMessageBox("Error creating Dialog"); pDialog->ShowWindow(SW_SHOW); } else AfxMessageBox("Error Creating Dialog Object"); //CAddzonename dlgAbout; //dlgAbout.DoModal(); } else { CDHtmlDialog::OnSysCommand(nID, lParam); } } .......................................................... doesn't work, but doesn't return errors either void CAddzonename::OnBnClickedOk() { /*Cfirstw32mfcDlg**/ CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(IDS_ZONENAME,MF_ENABLED); DestroyWindow(); } how do i enable the the menu item again, witch got disabled by pressing on it kind regards, marco

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups