I have the following code,but when the user clicks on the undo menu item - nothing happens.
Is there anything obvious I should or shouldn't be doing?
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const WM_USER = &H400 Private Const EM_UNDO = &HC7 Private Sub mnuUndo_Click() UndoTextBox rtb1 End Sub Private Sub UndoTextBox(Txtbx As RichTextBox) Dim X As Long X = SendMessage(Txtbx.hwnd, EM_UNDO, 0, 0) End Sub
I am fairly new to API's so is this correct?




Reply With Quote