Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repeat last computer operation
#1
I am trying to understand how I can make my rich edit dialog repeat the last keystroke/operation that was done like the edit menu in Microsoft word does. I have tried almost everything and I am starting to think that the computer is laughing at me. Can someone please help me?

Function DialogWithMenu
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str rea3
if(!ShowDialog("DialogWithMenu" &DialogWithMenu &controls 0 0 0 0 0 0 0 "dialog.ico" "DialogWithMenu")) ret

;BEGIN DIALOG
;0 "" 0x10CF0A44 0x100 0 0 294 190 "Dialog"
;3 RichEdit20A 0x54233044 0x101 0 0 294 190 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020009 "*" ""

ret
;messages
sel message
,case WM_INITDIALOG
,
,case WM_SIZE
,RECT r; GetClientRect(hDlg &r)
,siz r.right r.bottom id(3 hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,;menu items:
,case 101    ;; Menu File>>Open
,,str s fileTxt
,,if OpenSaveDialog(0 s "Text files[]*.txt[]Image files[]*.bmp;*.gif[]All Files[]*.*[]")
,,,fileTxt.getfile(s)
,,,fileTxt.setwintext(id(3 hDlg))
,case 103 out "&Repeat Past"
,case 104 out "Select All"
,case 105 out "Help"
,case 106 SendMessage(id(3 hDlg) WM_UNDO 0 0)

,case IDOK
,case IDCANCEL
ret 1

;BEGIN MENU
;>&File
,;&Open : 101 0 0 Co
,;-
,;>&Recent
,,;Empty : 102 0 3
,,;<
,;<
;>&Edit
,;&Undo : 106 0 0 Cz
,;&Repeat Past : 103 0 0 Cy
,;-
,;Select &All : 104 0 0 Ca
,;<
;&Help : 105 0
;END MENU
#2
Gintaras – is there a way to copy the undo information into a string. If so I could always undo the last thing and then copy it into a string then redo then paste the string. This is sloppy but it would be that same as repeat past or repeat typing.
#3
Don't know, look in rich edit control help in MSDN.


Forum Jump:


Users browsing this thread: 1 Guest(s)