1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to disable specific keys ?

Discussion in 'C' started by SaswatPadhi, Sep 8, 2009.

  1. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    Hi all members :)

    I want to disable some specific keys (like F2, F5) / key-sets (like CTRL+ALT+DEL, CTRL+ESC), while user is running my program (if I want the user to be unable to abnormally terminate the program through Task Manager or other process terminators .. :devil:).

    Any ideas, how I can implement that in my C++ code ?

    Thanx in advance :)
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    You cannot do that actually because you do not get the message before windows and they relay the event to your program
     
  3. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    But I have seen some games, where you cannot escape from the game by pressing CTRL+ALT+DEL or CTRL+ESC. :confused:

    And, I have seen "many" VB codes with that feature.
     
  4. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    in VB that is possible, I was going to post about this, but again Shabbir will give infraction mentioning out of topic reply.

    In VB, it's possible to achiieve the same.
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    If it's possible in VB then it'll be possible in C++ as well.
    How would you do it in VB; that might indicate how it can be done in C++.
     
  6. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    Making use of Key Value ;)
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    The way the game do it very low level programming may be but I would love to see if its possible to block CAD
     
  8. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:

Share This Page