I need to cut copy and paste in my editor gadget by using the standard toolbar icons buttons. I know it involves sending messages to the editorgadget, but can anyone tell me how?
Any help is very much appreciated. Viva la PB!

Code: Select all
SendMessage_(hWnd, #EM_REPLACESEL, 1, ptrToString)Code: Select all
SendMessage_(hWnd, #EM_GETSELTEXT, 0, ptrToBuffer)
SetClipboardTextSomehowIDontKnowHow(ptrToBuffer)
Code: Select all
SendMessage_(GadgetID(Gadget),#WM_COPY,#Null,#Null)
SendMessage_(GadgetID(Gadget),#WM_CUT,#Null,#Null)
SendMessage_(GadgetID(Gadget),#WM_PASTE,#Null,#Null)

Code: Select all
SendMessage_(GadgetID(#Gadget_Main_report), #EM_REPLACESEL, #True, #Null)Code: Select all
SendMessage_(GadgetID(#Gadget_Main_report), #WM_CLEAR, #Null, #Null)