Browse Source

Logging copying message to the clipboard

Source commit: 4a090df405fad6dd77ac78a2137fab9147f0e92d
Martin Prikryl 3 years ago
parent
commit
2a76666746
2 changed files with 3 additions and 0 deletions
  1. 1 0
      source/forms/MessageDlg.cpp
  2. 2 0
      source/windows/Tools.cpp

+ 1 - 0
source/forms/MessageDlg.cpp

@@ -159,6 +159,7 @@ void __fastcall TMessageForm::KeyDown(Word & Key, TShiftState Shift)
 {
   if (Shift.Contains(ssCtrl) && (Key == L'C'))
   {
+    AppLog(L"Copying message to clipboard");
     TInstantOperationVisualizer Visualizer;
     CopyToClipboard(GetFormText());
   }

+ 2 - 0
source/windows/Tools.cpp

@@ -1132,6 +1132,7 @@ void __fastcall CopyToClipboard(UnicodeString Text)
   HANDLE Data;
   void * DataPtr;
 
+  AppLogFmt("Copying text to clipboard [%d]", (Text.Length()));
   if (OpenClipboard(0))
   {
     try
@@ -1162,6 +1163,7 @@ void __fastcall CopyToClipboard(UnicodeString Text)
     {
       CloseClipboard();
     }
+    AppLogFmt("Copied text to clipboard [%d]", (Text.Length()));
   }
   else
   {