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. Database & SysAdmin
  3. System Admin
  4. System menu block

System menu block

Scheduled Pinned Locked Moved System Admin
tutorial
3 Posts 1 Posters 2 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    How to block access to system menu (WinKey, Control+Esc, eventually Control+Alt+Del) Emi

    L 2 Replies Last reply
    0
    • L Lost User

      How to block access to system menu (WinKey, Control+Esc, eventually Control+Alt+Del) Emi

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I made some progress, but this code is only for detect Control+Esc I think SendInput may be a solution. Any ideeas ? void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CFrameWnd::OnActivate(nState, pWndOther, bMinimized); if(nState==1) { m_nSysEnter=0; return; } BOOL bCtrlDown = (!(GetKeyState(VK_CONTROL)==0)); if(bCtrlDown) { m_nSysEnter++; if(m_nSysEnter > 1) return; ::MessageBox(0,"Use only interface programs.", "WARNING",MB_ICONWARNING | MB_OK | MB_TOPMOST); } } Emi

      1 Reply Last reply
      0
      • L Lost User

        How to block access to system menu (WinKey, Control+Esc, eventually Control+Alt+Del) Emi

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Finally, I found it !! This code detect and cancel user input: Control+Esc void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CFrameWnd::OnActivate(nState, pWndOther, bMinimized); if(nState==1) return; BOOL bCtrlDown = (!(GetKeyState(VK_CONTROL)==0)); if(bCtrlDown) { // Wait for init Sleep(300); // Send cancel keybd_event( VK_ESCAPE,0,0,0 ); keybd_event( VK_ESCAPE,0,KEYEVENTF_KEYUP,0); // Send task change keybd_event( VK_MENU,0,0,0 ); keybd_event( VK_ESCAPE,0,0,0 ); keybd_event( VK_ESCAPE,0,KEYEVENTF_KEYUP,0); keybd_event( VK_MENU,0,KEYEVENTF_KEYUP,0); } } Emi

        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