diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-26 19:16:12 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-26 19:16:12 +0300 |
commit | c5dc28ec2272a865ef2f28fd7ab151b55517fedf (patch) | |
tree | d751f3e869c66371b8f1d65480b39c2997ba6e62 /plugins/SecureIM/src | |
parent | dc2a4dc50d6cc3e7bd513122756dd39141d7887e (diff) |
more clipboard shit removed
Diffstat (limited to 'plugins/SecureIM/src')
-rw-r--r-- | plugins/SecureIM/src/commonheaders.cpp | 14 | ||||
-rw-r--r-- | plugins/SecureIM/src/commonheaders.h | 1 | ||||
-rw-r--r-- | plugins/SecureIM/src/options.cpp | 6 |
3 files changed, 3 insertions, 18 deletions
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index 8355b59a75..db6b01fe01 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -80,20 +80,6 @@ int msgbox(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType) return r;
}
-void CopyToClipboard(HWND hwnd, LPSTR msg)
-{
- HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, mir_strlen(msg) + 1);
- LPSTR lpstrCopy = (LPSTR)GlobalLock(hglbCopy);
- mir_strcpy(lpstrCopy, msg);
- GlobalUnlock(hglbCopy);
-
- if(OpenClipboard(nullptr)) {
- EmptyClipboard();
- SetClipboardData(CF_TEXT, hglbCopy);
- CloseClipboard();
- }
-}
-
HNETLIBUSER hNetlibUser;
void InitNetlib()
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index 50c84cf18b..60839f80b7 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -103,7 +103,6 @@ void GetFlags(); void SetFlags();
int msgbox(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
-void CopyToClipboard(HWND hwnd,LPSTR msg);
#endif
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index f2917aeeb3..a04e991ea7 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1041,9 +1041,9 @@ static INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_RSA_COPY:
- char txt[128];
- GetDlgItemText(hDlg, IDC_RSA_SHA, txt, _countof(txt));
- CopyToClipboard(hDlg, txt);
+ wchar_t txt[128];
+ GetDlgItemTextW(hDlg, IDC_RSA_SHA, txt, _countof(txt));
+ Utils_ClipboardCopy(txt);
return TRUE;
case IDC_RSA_EXP:
|