trichview.com

trichview.support




Sending Keyboard message to RichViewEdit.


Return to index


Author

Message

Jaepil

Posted: 03/04/2004 0:57:46


Hello.


I have a dialog which appears over a RcihViewEdit control. When the control

receives navigational key messages i close the dialog then pass the message

onto the RichViewEdit.


I have the function ready. But i dont see the expected changes in the RichViewEdit

control. Any suggestions?


//---------------------------------------------------


void __fastcall TMyDialog::WMDialogKey(TWMKey& Msg)

{

  switch (Msg.CharCode) {

    case VK_PRIOR:

    case VK_NEXT:

    case VK_END:

    case VK_HOME:

    case VK_LEFT:

    case VK_UP:

    case VK_RIGHT:

    case VK_DOWN:

      // First try

      PostMessage(MyRVEdit->Handle, Msg.Msg,

        Msg.CharCode, Msg.KeyData);


      // Second try

      MyRVEdit->Perform(Msg.Msg, Msg.CharCode, Msg.KeyData);

      

      // Third try

      MyRVEdit->WindowProc(*(TMessage*)&Msg);

      

      // Fourth try

      MyRVEdit->Dispatch(&Msg);

 

      Close();

      break;

  }

}

//---------------------------------------------------





Powered by ABC Amber Outlook Express Converter