From 5ae5da912f5c0ac54eab34d1c42cbe1726f60ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Wed, 18 Jul 2007 15:50:43 +0200 Subject: [PATCH] wordpad: Add date/time toolbar button. --- .gitignore | 1 + programs/wordpad/Makefile.in | 1 + programs/wordpad/resource.h | 5 +++-- programs/wordpad/rsrc.rc | 21 +++++++++++++++++++++ programs/wordpad/wordpad.c | 4 +++- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index df94f78b6b9..c9f97b90827 100644 --- a/.gitignore +++ b/.gitignore @@ -927,6 +927,7 @@ programs/winhelp/winhelp programs/winver/winver programs/wordpad/formatbar.bmp programs/wordpad/rsrc.res +programs/wordpad/toolbar.bmp programs/wordpad/wordpad programs/wordpad/wordpad.ico programs/xcopy/rsrc.res diff --git a/programs/wordpad/Makefile.in b/programs/wordpad/Makefile.in index 2192db8b92a..017bb193458 100644 --- a/programs/wordpad/Makefile.in +++ b/programs/wordpad/Makefile.in @@ -16,6 +16,7 @@ RC_SRCS = rsrc.rc RC_BINSRC = rsrc.rc RC_BINARIES = \ formatbar.bmp \ + toolbar.bmp \ wordpad.ico @MAKE_PROG_RULES@ diff --git a/programs/wordpad/resource.h b/programs/wordpad/resource.h index c058e17c219..eb329e35ebc 100644 --- a/programs/wordpad/resource.h +++ b/programs/wordpad/resource.h @@ -72,9 +72,10 @@ #define IDD_DATETIME 2100 -#define IDB_FORMATBAR 100 +#define IDB_TOOLBAR 100 +#define IDB_FORMATBAR 101 -#define IDI_WORDPAD 101 +#define IDI_WORDPAD 102 #define STRING_ALL_FILES 1400 #define STRING_TEXT_FILES_TXT 1401 diff --git a/programs/wordpad/rsrc.rc b/programs/wordpad/rsrc.rc index 3410d511d3a..0ef3ff5292a 100644 --- a/programs/wordpad/rsrc.rc +++ b/programs/wordpad/rsrc.rc @@ -39,6 +39,27 @@ BEGIN "S", ID_FILE_SAVE, VIRTKEY, CONTROL END +/* BINRES toolbar.bmp */ +IDB_TOOLBAR BITMAP "toolbar.bmp" +/* { + '42 4d f6 00 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 10 00 00 00 10 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 12 0b 00 00 12 0b 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 80 80 80 00 c0 c0 c0 00 00 00 ff 00 00 ff' + '00 00 00 ff ff 00 ff 00 00 00 ff 00 ff 00 ff ff' + '00 00 ff ff ff 00 88 88 88 88 88 33 33 88 88 88' + '88 88 83 33 33 38 88 88 88 88 33 33 33 33 88 88' + '88 88 33 30 00 03 8f ff ff ff 33 30 33 33 8f 0f' + 'f0 0f 33 30 33 33 8f 0f 0f f0 f3 30 33 38 8f 0f' + 'ff f0 f8 33 33 88 8f 0f f0 0f f8 88 88 88 8f 0f' + 'ff f0 f8 88 88 88 8f 0f 0f f0 f8 88 88 88 8f 0f' + 'f0 0f f8 88 88 88 8f ff ff ff f8 88 88 88 84 44' + '44 44 48 88 88 88 84 44 44 44 48 88 88 88 88 88' + '88 88 88 88 88 88' + } */ + /* BINRES formatbar.bmp */ IDB_FORMATBAR BITMAP "formatbar.bmp" /* { diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 6cae4a50a13..14f82f42b56 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -511,7 +511,7 @@ static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam) hToolBarWnd = CreateToolbarEx(hReBarWnd, CCS_NOPARENTALIGN|CCS_NOMOVEY|WS_VISIBLE|WS_CHILD|TBSTYLE_TOOLTIPS|TBSTYLE_BUTTON, IDC_TOOLBAR, - 0, hInstance, 0, + 1, hInstance, IDB_TOOLBAR, NULL, 0, 24, 24, 16, 16, sizeof(TBBUTTON)); @@ -533,6 +533,8 @@ static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam) 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); + AddButton(hToolBarWnd, 0, ID_DATETIME); SendMessageW(hToolBarWnd, TB_AUTOSIZE, 0, 0);