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

    Ctrl_V Hot key....

    I have one derived from CEditView class
    I want to block Ctrl_V in My class, and also I want to use other's Hot Keys.
    How can I implement that?

    Thank for your reading !!!


  2. #2
    Join Date
    May 1999
    Posts
    318

    Re: Ctrl_V Hot key....

    I think the simplest way is to override the PreTranslate of your CEditView class.

    An example for Ctrl+V :


    BOOL CMyClass::PreTranslateMessage(MSG* pMsg) {
    if ( (pMsg->message == WM_KEYDOWN &&
    (GetKeyState(VK_CONTROL) & ~1) &&
    pMsg->wParam == 'V' )
    {
    // Your code
    }
    }




    I hope this could help.


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