Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I implement menu functions such as Cut, Copy, Find, Replace, Paste, Undo or Redo?

0
Posted

How do I implement menu functions such as Cut, Copy, Find, Replace, Paste, Undo or Redo?

0

You can invoke any of the following commands: Delete, Copy, Cut, Find, FindNext, FindPrev, Paste, Select All, Undo and Redo. Each command has an unique identifier like follows: #define ID_EDIT_REPLACE 0xE129 #define ID_EDIT_DELETE 0xE120 #define ID_EDIT_COPY 0xE122 #define ID_EDIT_CUT 0xE123 #define ID_EDIT_FIND 0xE124 #define ID_EDIT_PASTE 0xE125 #define ID_EDIT_SELECT_ALL 0xE12A #define ID_EDIT_UNDO 0xE12B #define ID_EDIT_REDO 0xE12C #define ID_EDIT_FINDNEXT 0xE12D #define ID_EDIT_FINDPREV 0xE12E The sample requires the definition for SendMessage API function. For instance, the following VB sample shows how to call Undo command when user clicks a button. 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_COMMAND = &H111 Private Sub Command1_Click() SendMessage Edit1.hwnd, WM_COMMAND, &HE12B * 65536, 0 End Sub The wParam parameter of SendMessage API function needs

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.