CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2000
    Location
    NJ
    Posts
    640

    Detect a Control-Break from Keyboard

    I need for my program to detect a Control-Break when done from the Keyboard.

    Thanks..

  2. #2
    Join Date
    Jun 2002
    Location
    Sacramento, CA
    Posts
    124

    Win32 hook

    Never tried before, but I'm assuming you can't just handle the keydown message.

    Maybe a Win32 hook will do the job.



    -- Alex
    http://www.lowesoftware.com - a resource for software development with business needs in mind. The site is geared at entreprenurial software developers and managers looking to improve the quality of their software. On the site find open source projects, insightful articles, and other resources for advancing software development.

  3. #3
    Join Date
    Sep 2003
    Location
    Forever Gone... For Now...
    Posts
    1,515

    Re: Detect a Control-Break from Keyboard

    Originally posted by Jim Mcpherson
    I need for my program to detect a Control-Break when done from the Keyboard.

    Thanks..
    If it's a console project, perhaps SetConsoleCtrlHandler could work...
    Thought for the day/week/month/year:
    Windows System Error 4006:
    Replication with a nonconfigured partner is not allowed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured