wordpad: [1/3] Add paste support
Alexander Nicolaysen Sørnes
alex at thehandofagony.com
Sun Feb 25 07:38:50 CST 2007
wordpad: Add paste support
Regards,
Alexander N. Sørnes
-------------- next part --------------
From 8a592f8d655cafe7bf29461ef8609bf903108545 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Alexander_Nicolaysen_S=C3=B8rnes?= <alex at thehandofagony.com>
Date: Sat, 24 Feb 2007 21:20:02 +0100
Subject: [PATCH] wordpad: Add paste support
---
programs/wordpad/resource.h | 1 +
programs/wordpad/wordpad.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/programs/wordpad/resource.h b/programs/wordpad/resource.h
index fc1ddf0..a103744 100644
--- a/programs/wordpad/resource.h
+++ b/programs/wordpad/resource.h
@@ -45,6 +45,7 @@
#define ID_EDIT_GETTEXT 1309
#define ID_EDIT_COPY 1310
#define ID_EDIT_CUT 1311
+#define ID_EDIT_PASTE 1312
#define ID_FORMAT_BOLD 1400
#define ID_FORMAT_ITALIC 1401
diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c
index 667e51d..4334ed2 100644
--- a/programs/wordpad/wordpad.c
+++ b/programs/wordpad/wordpad.c
@@ -227,6 +227,7 @@ static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam)
AddSeparator(hToolBarWnd);
AddButton(hToolBarWnd, nStdBitmaps+STD_CUT, ID_EDIT_CUT);
AddButton(hToolBarWnd, nStdBitmaps+STD_COPY, ID_EDIT_COPY);
+ AddButton(hToolBarWnd, nStdBitmaps+STD_PASTE, ID_EDIT_PASTE);
AddButton(hToolBarWnd, nStdBitmaps+STD_UNDO, ID_EDIT_UNDO);
AddButton(hToolBarWnd, nStdBitmaps+STD_REDOW, ID_EDIT_REDO);
AddSeparator(hToolBarWnd);
@@ -372,6 +373,10 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
PostMessage(hwndEditor, WM_COPY, 0, 0);
break;
+ case ID_EDIT_PASTE:
+ PostMessage(hwndEditor, WM_PASTE, 0, 0);
+ break;
+
case ID_EDIT_SELECTALL:
{
CHARRANGE range = {0, -1};
--
1.4.4.4
More information about the wine-patches
mailing list