Ctrl+S = save

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lumpybanana247
    New Member
    • Apr 2007
    • 134

    Ctrl+S = save

    in my program, i wanted to make it so when i press ctrl and s at the same time, my program would run the save function.
    its obviously c++ and im using Dev-C++ Bloodshed (with MinGW)

    thanks in advance
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Just check for a character of 19.

    Comment

    • lumpybanana247
      New Member
      • Apr 2007
      • 134

      #3
      Originally posted by weaknessforcats
      Just check for a character of 19.
      i dont understand how to do that, i imagine whatever i do, it goes in the form procedure and would looks somthing like

      if(message==19) {stuff}

      could you tell me more?

      Comment

      • Cucumber
        New Member
        • Sep 2007
        • 90

        #4
        Originally posted by lumpybanana247
        i dont understand how to do that, i imagine whatever i do, it goes in the form procedure and would looks somthing like

        if(message==19) {stuff}

        could you tell me more?
        If you are programming a Win32 application, you need an Accelerator.

        Comment

        • lumpybanana247
          New Member
          • Apr 2007
          • 134

          #5
          Originally posted by Cucumber
          If you are programming a Win32 application, you need an Accelerator.
          yeah, I'm using Win32.

          I have looked up accelerators for quite a while and none of them seem to work. :-( can somebody give me an example of what they used that worked please?

          Comment

          • Cucumber
            New Member
            • Sep 2007
            • 90

            #6
            Originally posted by lumpybanana247
            yeah, I'm using Win32.

            I have looked up accelerators for quite a while and none of them seem to work. :-( can somebody give me an example of what they used that worked please?
            Try the following APIs

            LoadAccelerator s()
            TranslateAccele rator()

            And you need a resources file like this
            Code:
            MyAccel ACCELERATORS
            {
               "^S", 100
            }

            Comment

            Working...