Answered help with WM_KEYDOWN

  • Wednesday, June 13, 2007 7:53 AM
     
     

    need to save my output ( dataval10,dataval20,dataval30) in a file everytime

    i press a key. Right now they are being written in a file continuously.



    i thik i have to use the case WM_KEYDOWN ... but not sure how to fit it in my code

    & how to get the output written to a file when the button wa spressed...

    Help will be great!



    edit ... code deleted !






All Replies

  • Wednesday, June 13, 2007 8:28 AM
     
     Answered

    Write the code to MainMessageHandler:

     

    Code Snippet

    case WM_KEYDOWN:

      if (wParam == VK_DEL) {  // Or another of your key

      // execution of code

      }

      break;

     

    In lParam are additional params. For information about the parameters in lParam see http://msdn2.microsoft.com/en-us/library/ms646280.aspx.

     

    - Laco.