mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Import a very basic version of wordpad from Wine.
svn path=/trunk/; revision=21404
This commit is contained in:
parent
1cd2317a7f
commit
6fe727f643
14 changed files with 1167 additions and 0 deletions
|
@ -55,4 +55,7 @@
|
|||
<directory name="winefile">
|
||||
<xi:include href="winefile/winefile.rbuild" />
|
||||
</directory>
|
||||
<directory name="wordpad">
|
||||
<xi:include href="wordpad/wordpad.rbuild" />
|
||||
</directory>
|
||||
</group>
|
||||
|
|
66
reactos/base/applications/wordpad/De.rc
Normal file
66
reactos/base/applications/wordpad/De.rc
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2006 by Henning Gerhardt
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Datei"
|
||||
BEGIN
|
||||
MENUITEM "&Neu", ID_FILE_NEW
|
||||
MENUITEM "&Öffnen", ID_FILE_OPEN
|
||||
MENUITEM "&Speichern", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Beenden", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Bearbeiten"
|
||||
BEGIN
|
||||
MENUITEM "&Rückgängig\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "&Wiederholen\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "&Alles markieren\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Aus&schneiden\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "&Kopieren\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Schreibgeschü&tzt", ID_EDIT_READONLY
|
||||
MENUITEM "&Geändert", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Extras"
|
||||
BEGIN
|
||||
MENUITEM "Markierungs&information", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "Zeichen&format", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "&Standardzeichenformat", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "&Absatzformat", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "&Get text", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "F&ormat"
|
||||
BEGIN
|
||||
POPUP "&Hintergrund"
|
||||
BEGIN
|
||||
MENUITEM "&System\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "&PostIt-Notiz\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Ausrichtung"
|
||||
BEGIN
|
||||
MENUITEM "&Links\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "&Zentriert\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "&Rechts\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
66
reactos/base/applications/wordpad/En.rc
Normal file
66
reactos/base/applications/wordpad/En.rc
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2004 by Krzysztof Foltman
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "&New", ID_FILE_NEW
|
||||
MENUITEM "&Open", ID_FILE_OPEN
|
||||
MENUITEM "&Save", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Exit", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Edit"
|
||||
BEGIN
|
||||
MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "&Redo\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "&Select all\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Cu&t\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Read-&only", ID_EDIT_READONLY
|
||||
MENUITEM "&Modified", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Extras"
|
||||
BEGIN
|
||||
MENUITEM "Selection &info", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "Character &format", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "&Def. char format", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "Paragrap&h format", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "&Get text", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "F&ormat"
|
||||
BEGIN
|
||||
POPUP "&Background"
|
||||
BEGIN
|
||||
MENUITEM "&System\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "&PostThat yellowish\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Alignment"
|
||||
BEGIN
|
||||
MENUITEM "&Left\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "&Center\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "&Right\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
66
reactos/base/applications/wordpad/Fr.rc
Normal file
66
reactos/base/applications/wordpad/Fr.rc
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2006 by Jonathan Ernst
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Fichier"
|
||||
BEGIN
|
||||
MENUITEM "&Nouveau", ID_FILE_NEW
|
||||
MENUITEM "&Ouvrir", ID_FILE_OPEN
|
||||
MENUITEM "&Sauver", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Quitter", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Edition"
|
||||
BEGIN
|
||||
MENUITEM "&Annuler\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "&Répéter\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "&Sélectionner tout\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Couper\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "Co&pier\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Lecture-&seule", ID_EDIT_READONLY
|
||||
MENUITEM "&Modifié", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Avancés"
|
||||
BEGIN
|
||||
MENUITEM "&Information sélection", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "&Format caractÚres", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "&Déf. format car.", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "Format paragrap&he", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "&Recevoir texte", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "F&ormat"
|
||||
BEGIN
|
||||
POPUP "&Fond"
|
||||
BEGIN
|
||||
MENUITEM "&SystÚme\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "&PostThat yellowish\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Alignement"
|
||||
BEGIN
|
||||
MENUITEM "Aligné à &gauche\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "&Centré\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "Aligné à &droite\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
67
reactos/base/applications/wordpad/Ko.rc
Normal file
67
reactos/base/applications/wordpad/Ko.rc
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright 2004 by Krzysztof Foltman
|
||||
* Copyright 2006 by YunSong Hwang
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "파일(&F)"
|
||||
BEGIN
|
||||
MENUITEM "새 파일(&N)", ID_FILE_NEW
|
||||
MENUITEM "열기(&O)", ID_FILE_OPEN
|
||||
MENUITEM "저장(&S)", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "나가기(&E)", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "편집(&E)"
|
||||
BEGIN
|
||||
MENUITEM "되돌리기(&U)\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "다시 실행(&R)\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "모두 선택(&S)\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "잘라내기(&T)\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "복사(&C)\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "읽기 전용(&O)", ID_EDIT_READONLY
|
||||
MENUITEM "수정 가능(&M)", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "기타(&E)"
|
||||
BEGIN
|
||||
MENUITEM "선택 영역 정보(&I)", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "문자 형식(&F)", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "정의된 문자열 형식(&D)", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "단락 형식(&H)", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "텍스트 얻기(&G)", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "형식(&O)"
|
||||
BEGIN
|
||||
POPUP "배경(&B)"
|
||||
BEGIN
|
||||
MENUITEM "시스템(&S)\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "노랑색으로(&P)\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "정렬(&A)"
|
||||
BEGIN
|
||||
MENUITEM "왼쪽(&L)\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "가운데(&C)\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "오른쪽(&R)\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
66
reactos/base/applications/wordpad/Nl.rc
Normal file
66
reactos/base/applications/wordpad/Nl.rc
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2006 by Hans Leidekker
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Bestand"
|
||||
BEGIN
|
||||
MENUITEM "&Nieuw" ID_FILE_NEW
|
||||
MENUITEM "&Openen", ID_FILE_OPEN
|
||||
MENUITEM "O&pslaan", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Afsluiten", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "Be&werken"
|
||||
BEGIN
|
||||
MENUITEM "&Ongedaan maken\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "O&pnieuw\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "&Alles selecteren\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "K&nippen\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "&Kopieren\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Alleen &lezen", ID_EDIT_READONLY
|
||||
MENUITEM "&Gewijzigd", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Extra's"
|
||||
BEGIN
|
||||
MENUITEM "Selectie&informatie", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "&Karakterformaat", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "&Standaard karakterformaat", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "&Paragraafformaat", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "&Haal tekst", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "&Opmaak"
|
||||
BEGIN
|
||||
POPUP "&Achtergrond"
|
||||
BEGIN
|
||||
MENUITEM "&Systeem\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "&Geeltje\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Uitlijning"
|
||||
BEGIN
|
||||
MENUITEM "&Links\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "&Gecentreerd\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "&Rechts\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
66
reactos/base/applications/wordpad/No.rc
Normal file
66
reactos/base/applications/wordpad/No.rc
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2006 by Alexander N. Sørnes <alex@thehandofagony.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Fil"
|
||||
BEGIN
|
||||
MENUITEM "&Ny", ID_FILE_NEW
|
||||
MENUITEM "&Åpne", ID_FILE_OPEN
|
||||
MENUITEM "&Lagre", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Avslutt", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "R&ediger"
|
||||
BEGIN
|
||||
MENUITEM "&Angre\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "&Gjenta\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "&Merk alt\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Klipp u&t\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "&Kopier\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Skrivebeskyttet", ID_EDIT_READONLY
|
||||
MENUITEM "E&ndret", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Ekstra"
|
||||
BEGIN
|
||||
MENUITEM "&Info om merket område", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "Tegn&format", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "Stan&dard tegnformat", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "&Avsnittformat", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "&Hent tekst", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "F&ormat"
|
||||
BEGIN
|
||||
POPUP "&Bakgrunn"
|
||||
BEGIN
|
||||
MENUITEM "&System\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "Merkela&pp-gult\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Justering"
|
||||
BEGIN
|
||||
MENUITEM "&Venstrestilt\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "&Midtstilt\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "Høy&restilt\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
66
reactos/base/applications/wordpad/Ru.rc
Normal file
66
reactos/base/applications/wordpad/Ru.rc
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2006 by Phil Krylov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Ôàéë"
|
||||
BEGIN
|
||||
MENUITEM "Ñîçä&àòü", ID_FILE_NEW
|
||||
MENUITEM "&Îòêðûòü", ID_FILE_OPEN
|
||||
MENUITEM "&Ñîõðàíèòü", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Â&ûõîä", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Ïðàâêà"
|
||||
BEGIN
|
||||
MENUITEM "&Îòìåíèòü\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "&Ïîâòîðèòü\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "Âûäåëèòü â&ñå\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Âûðåçàòü\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "&Êîïèðîâàòü\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Òîëüêî äëÿ ÷òåíèÿ", ID_EDIT_READONLY
|
||||
MENUITEM "&Èçìåíåí", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Äîïîëíèòåëüíî"
|
||||
BEGIN
|
||||
MENUITEM "&Èíôîðìàöèÿ î âûäåëåíèè", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "&Ôîðìàò ñèìâîëîâ", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "Ôîðìàò ñèìâîëîâ &ïî óìîë÷àíèþ", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "Ôîðìàò &àáçàöà", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "Ï&îëó÷èòü òåêñò", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "Ôîð&ìàò"
|
||||
BEGIN
|
||||
POPUP "&Ôîí"
|
||||
BEGIN
|
||||
MENUITEM "&Ñèñòåìíûé\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "&Æåëòîâàòûé PostThat\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Âûðàâíèâàíèå"
|
||||
BEGIN
|
||||
MENUITEM "Â&ëåâî\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "Ïî &öåíòðó\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "Â&ïðàâî\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
68
reactos/base/applications/wordpad/Tr.rc
Normal file
68
reactos/base/applications/wordpad/Tr.rc
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Turkish Resources for Wordpad
|
||||
*
|
||||
* Copyright 2006 Fatih Aþýcý <fasici@linux-sevenler.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
MAINMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Dosya"
|
||||
BEGIN
|
||||
MENUITEM "&Yeni", ID_FILE_NEW
|
||||
MENUITEM "&Aç", ID_FILE_OPEN
|
||||
MENUITEM "&Kaydet", ID_FILE_SAVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çýk", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Düzen"
|
||||
BEGIN
|
||||
MENUITEM "&Geri Al\tCtrl+Z", ID_EDIT_UNDO
|
||||
MENUITEM "&Yinele\tCtrl+Y", ID_EDIT_REDO
|
||||
MENUITEM "&Tümünü seç\tCtrl+A", ID_EDIT_SELECTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Ke&s\tCtrl+X", ID_EDIT_CUT
|
||||
MENUITEM "&Kopyala\tCtrl+C", ID_EDIT_COPY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Salt-&okunur", ID_EDIT_READONLY
|
||||
MENUITEM "&Deðiþmiþ", ID_EDIT_MODIFIED
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "D&iðerleri"
|
||||
BEGIN
|
||||
MENUITEM "Seçim &bilgisi", ID_EDIT_SELECTIONINFO
|
||||
MENUITEM "Karakter bi&çimi", ID_EDIT_CHARFORMAT
|
||||
MENUITEM "&Öntanýmlý kar. biçimi", ID_EDIT_DEFCHARFORMAT
|
||||
MENUITEM "Paragra&f biçimi", ID_EDIT_PARAFORMAT
|
||||
MENUITEM "&Metni al", ID_EDIT_GETTEXT
|
||||
END
|
||||
END
|
||||
POPUP "&Biçim"
|
||||
BEGIN
|
||||
POPUP "&Arkaplan"
|
||||
BEGIN
|
||||
MENUITEM "S&istem\tCtrl+1", ID_BACK_1
|
||||
MENUITEM "&Sarýmtýrak\tCtrl+2", ID_BACK_2
|
||||
END
|
||||
POPUP "&Hizalama"
|
||||
BEGIN
|
||||
MENUITEM "S&ol\tCtrl+L", ID_ALIGN_LEFT
|
||||
MENUITEM "O&rta\tCtrl+E", ID_ALIGN_CENTER
|
||||
MENUITEM "S&að\tCtrl+R", ID_ALIGN_RIGHT
|
||||
END
|
||||
END
|
||||
END
|
54
reactos/base/applications/wordpad/resource.h
Normal file
54
reactos/base/applications/wordpad/resource.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2004 by Krzysztof Foltman
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define ID_FILE_EXIT 1000
|
||||
#define ID_FILE_OPEN 1001
|
||||
#define ID_FILE_SAVE 1002
|
||||
#define ID_FILE_NEW 1003
|
||||
|
||||
#define ID_ALIGN_LEFT 1100
|
||||
#define ID_ALIGN_CENTER 1101
|
||||
#define ID_ALIGN_RIGHT 1102
|
||||
|
||||
#define ID_BACK_1 1200
|
||||
#define ID_BACK_2 1201
|
||||
|
||||
#define ID_EDIT_SELECTALL 1300
|
||||
#define ID_EDIT_SELECTIONINFO 1301
|
||||
#define ID_EDIT_READONLY 1302
|
||||
#define ID_EDIT_MODIFIED 1303
|
||||
#define ID_EDIT_CHARFORMAT 1304
|
||||
#define ID_EDIT_PARAFORMAT 1305
|
||||
#define ID_EDIT_DEFCHARFORMAT 1306
|
||||
#define ID_EDIT_UNDO 1307
|
||||
#define ID_EDIT_REDO 1308
|
||||
#define ID_EDIT_GETTEXT 1309
|
||||
#define ID_EDIT_COPY 1310
|
||||
#define ID_EDIT_CUT 1311
|
||||
|
||||
#define ID_FORMAT_BOLD 1400
|
||||
#define ID_FORMAT_ITALIC 1401
|
||||
#define ID_FORMAT_UNDERLINE 1402
|
||||
|
||||
#define IDC_STATUSBAR 2000
|
||||
#define IDC_EDITOR 2001
|
||||
#define IDC_TOOLBAR 2002
|
||||
#define IDC_REBAR 2003
|
||||
#define IDC_COMBO 2004
|
||||
|
||||
#define IDB_TOOLBAR 100
|
52
reactos/base/applications/wordpad/rsrc.rc
Normal file
52
reactos/base/applications/wordpad/rsrc.rc
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2004 by Krzysztof Foltman
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
|
||||
MAINACCELTABLE ACCELERATORS
|
||||
BEGIN
|
||||
"1", ID_BACK_1, VIRTKEY, CONTROL
|
||||
"2", ID_BACK_2, VIRTKEY, CONTROL
|
||||
"L", ID_ALIGN_LEFT, VIRTKEY, CONTROL
|
||||
"E", ID_ALIGN_CENTER, VIRTKEY, CONTROL
|
||||
"R", ID_ALIGN_RIGHT, VIRTKEY, CONTROL
|
||||
"A", ID_EDIT_SELECTALL, VIRTKEY, CONTROL
|
||||
"X", ID_EDIT_CUT, VIRTKEY, CONTROL
|
||||
"C", ID_EDIT_COPY, VIRTKEY, CONTROL
|
||||
"Z", ID_EDIT_UNDO, VIRTKEY, CONTROL
|
||||
"Y", ID_EDIT_REDO, VIRTKEY, CONTROL
|
||||
"B", ID_FORMAT_BOLD, VIRTKEY, CONTROL
|
||||
"I", ID_FORMAT_ITALIC, VIRTKEY, CONTROL
|
||||
"U", ID_FORMAT_UNDERLINE,VIRTKEY, CONTROL
|
||||
"N", ID_FILE_NEW, VIRTKEY, CONTROL
|
||||
"O", ID_FILE_OPEN, VIRTKEY, CONTROL
|
||||
"S", ID_FILE_SAVE, VIRTKEY, CONTROL
|
||||
END
|
||||
|
||||
/* toolbar.bmp */
|
||||
IDB_TOOLBAR BITMAP toolbar.bmp
|
||||
|
||||
#include "De.rc"
|
||||
#include "En.rc"
|
||||
#include "Fr.rc"
|
||||
#include "Ko.rc"
|
||||
#include "Nl.rc"
|
||||
#include "No.rc"
|
||||
#include "Ru.rc"
|
||||
#include "Tr.rc"
|
BIN
reactos/base/applications/wordpad/toolbar.bmp
Normal file
BIN
reactos/base/applications/wordpad/toolbar.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 502 B |
513
reactos/base/applications/wordpad/wordpad.c
Normal file
513
reactos/base/applications/wordpad/wordpad.c
Normal file
|
@ -0,0 +1,513 @@
|
|||
/*
|
||||
* Wordpad implementation
|
||||
*
|
||||
* Copyright 2004 by Krzysztof Foltman
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <richedit.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
/* use LoadString */
|
||||
static const WCHAR xszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0};
|
||||
static const WCHAR xszMainMenu[] = {'M','A','I','N','M','E','N','U',0};
|
||||
|
||||
static const WCHAR wszRichEditClass[] = {'R','I','C','H','E','D','I','T','2','0','W',0};
|
||||
static const WCHAR wszMainWndClass[] = {'W','O','R','D','P','A','D','T','O','P',0};
|
||||
static const WCHAR wszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0};
|
||||
|
||||
static HWND hMainWnd = NULL;
|
||||
|
||||
void AddButton(HWND hwndToolBar, int nImage, int nCommand)
|
||||
{
|
||||
TBBUTTON button;
|
||||
|
||||
ZeroMemory(&button, sizeof(button));
|
||||
button.iBitmap = nImage;
|
||||
button.idCommand = nCommand;
|
||||
button.fsState = TBSTATE_ENABLED;
|
||||
button.fsStyle = TBSTYLE_BUTTON;
|
||||
button.dwData = 0;
|
||||
button.iString = -1;
|
||||
SendMessage(hwndToolBar, TB_ADDBUTTONS, 1, (LPARAM)&button);
|
||||
}
|
||||
|
||||
void AddSeparator(HWND hwndToolBar)
|
||||
{
|
||||
TBBUTTON button;
|
||||
|
||||
ZeroMemory(&button, sizeof(button));
|
||||
button.iBitmap = -1;
|
||||
button.idCommand = 0;
|
||||
button.fsState = 0;
|
||||
button.fsStyle = TBSTYLE_SEP;
|
||||
button.dwData = 0;
|
||||
button.iString = -1;
|
||||
SendMessage(hwndToolBar, TB_ADDBUTTONS, 1, (LPARAM)&button);
|
||||
}
|
||||
|
||||
static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hEditorWnd, hToolBarWnd, hReBarWnd;
|
||||
HINSTANCE hInstance = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);
|
||||
HANDLE hDLL;
|
||||
TBADDBITMAP ab;
|
||||
int nStdBitmaps = 0;
|
||||
REBARINFO rbi;
|
||||
REBARBANDINFO rbb;
|
||||
|
||||
CreateStatusWindow(CCS_NODIVIDER|WS_CHILD|WS_VISIBLE, "RichEdit text", hWnd, IDC_STATUSBAR);
|
||||
|
||||
hReBarWnd = CreateWindowEx(WS_EX_TOOLWINDOW, REBARCLASSNAME, NULL,
|
||||
CCS_NODIVIDER|WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|RBS_VARHEIGHT|CCS_TOP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, hWnd, (HMENU)IDC_REBAR, hInstance, NULL);
|
||||
|
||||
rbi.cbSize = sizeof(rbi);
|
||||
rbi.fMask = 0;
|
||||
rbi.himl = NULL;
|
||||
if(!SendMessage(hReBarWnd, RB_SETBARINFO, 0, (LPARAM)&rbi))
|
||||
return -1;
|
||||
|
||||
hToolBarWnd = CreateToolbarEx(hReBarWnd, CCS_NOPARENTALIGN|CCS_NODIVIDER|CCS_NOMOVEY|WS_VISIBLE|WS_CHILD|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT,
|
||||
IDC_TOOLBAR,
|
||||
3, hInstance, IDB_TOOLBAR,
|
||||
NULL, 0,
|
||||
24, 24, 16, 16, sizeof(TBBUTTON));
|
||||
|
||||
ab.hInst = HINST_COMMCTRL;
|
||||
ab.nID = IDB_STD_SMALL_COLOR;
|
||||
nStdBitmaps = SendMessage(hToolBarWnd, TB_ADDBITMAP, 3, (LPARAM)&ab);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_FILENEW, ID_FILE_NEW);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_FILEOPEN, ID_FILE_OPEN);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_FILESAVE, ID_FILE_SAVE);
|
||||
AddSeparator(hToolBarWnd);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_CUT, ID_EDIT_CUT);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_COPY, ID_EDIT_COPY);
|
||||
AddSeparator(hToolBarWnd);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_UNDO, ID_EDIT_UNDO);
|
||||
AddButton(hToolBarWnd, nStdBitmaps+STD_REDOW, ID_EDIT_REDO);
|
||||
AddSeparator(hToolBarWnd);
|
||||
AddButton(hToolBarWnd, 0, ID_FORMAT_BOLD);
|
||||
AddButton(hToolBarWnd, 1, ID_FORMAT_ITALIC);
|
||||
AddButton(hToolBarWnd, 2, ID_FORMAT_UNDERLINE);
|
||||
|
||||
SendMessage(hToolBarWnd, TB_ADDSTRING, 0, (LPARAM)"Exit\0");
|
||||
SendMessage(hToolBarWnd, TB_AUTOSIZE, 0, 0);
|
||||
|
||||
rbb.cbSize = sizeof(rbb);
|
||||
rbb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD | RBBIM_STYLE;
|
||||
rbb.fStyle = RBBS_CHILDEDGE;
|
||||
rbb.cx = 500;
|
||||
rbb.hwndChild = hToolBarWnd;
|
||||
rbb.cxMinChild = 0;
|
||||
rbb.cyChild = rbb.cyMinChild = HIWORD(SendMessage(hToolBarWnd, TB_GETBUTTONSIZE, 0, 0));
|
||||
|
||||
SendMessage(hReBarWnd, RB_INSERTBAND, -1, (LPARAM)&rbb);
|
||||
|
||||
hDLL = LoadLibrary("RICHED20.DLL");
|
||||
assert(hDLL);
|
||||
|
||||
hEditorWnd = CreateWindowExW(WS_EX_CLIENTEDGE, wszRichEditClass, NULL,
|
||||
WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOVSCROLL|ES_WANTRETURN,
|
||||
0, 0, 1000, 100, hWnd, (HMENU)IDC_EDITOR, hInstance, NULL);
|
||||
if (!hEditorWnd)
|
||||
{
|
||||
fprintf(stderr, "Error code %lu\n", GetLastError());
|
||||
return -1;
|
||||
}
|
||||
assert(hEditorWnd);
|
||||
|
||||
SetFocus(hEditorWnd);
|
||||
SendMessage(hEditorWnd, EM_SETEVENTMASK, 0, ENM_SELCHANGE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT OnUser( HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hwndEditor = GetDlgItem(hWnd, IDC_EDITOR);
|
||||
HWND hwndReBar = GetDlgItem(hWnd, IDC_REBAR);
|
||||
HWND hwndToolBar = GetDlgItem(hwndReBar, IDC_TOOLBAR);
|
||||
int from, to;
|
||||
CHARFORMAT2W fmt;
|
||||
|
||||
ZeroMemory(&fmt, sizeof(fmt));
|
||||
fmt.cbSize = sizeof(fmt);
|
||||
|
||||
SendMessage(hwndEditor, EM_GETCHARFORMAT, TRUE, (LPARAM)&fmt);
|
||||
|
||||
SendMessage(hwndEditor, EM_GETSEL, (WPARAM)&from, (LPARAM)&to);
|
||||
SendMessage(hwndToolBar, TB_ENABLEBUTTON, ID_EDIT_UNDO,
|
||||
SendMessage(hwndEditor, EM_CANUNDO, 0, 0));
|
||||
SendMessage(hwndToolBar, TB_ENABLEBUTTON, ID_EDIT_REDO,
|
||||
SendMessage(hwndEditor, EM_CANREDO, 0, 0));
|
||||
SendMessage(hwndToolBar, TB_ENABLEBUTTON, ID_EDIT_CUT, from == to ? 0 : 1);
|
||||
SendMessage(hwndToolBar, TB_ENABLEBUTTON, ID_EDIT_COPY, from == to ? 0 : 1);
|
||||
SendMessage(hwndToolBar, TB_CHECKBUTTON, ID_FORMAT_BOLD, (fmt.dwMask & CFM_BOLD) && (fmt.dwEffects & CFE_BOLD));
|
||||
SendMessage(hwndToolBar, TB_INDETERMINATE, ID_FORMAT_BOLD, !(fmt.dwMask & CFM_BOLD));
|
||||
SendMessage(hwndToolBar, TB_CHECKBUTTON, ID_FORMAT_ITALIC, (fmt.dwMask & CFM_ITALIC) && (fmt.dwEffects & CFE_ITALIC));
|
||||
SendMessage(hwndToolBar, TB_INDETERMINATE, ID_FORMAT_ITALIC, !(fmt.dwMask & CFM_ITALIC));
|
||||
SendMessage(hwndToolBar, TB_CHECKBUTTON, ID_FORMAT_UNDERLINE, (fmt.dwMask & CFM_UNDERLINE) && (fmt.dwEffects & CFE_UNDERLINE));
|
||||
SendMessage(hwndToolBar, TB_INDETERMINATE, ID_FORMAT_UNDERLINE, !(fmt.dwMask & CFM_UNDERLINE));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT OnNotify( HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hwndEditor = GetDlgItem(hWnd, IDC_EDITOR);
|
||||
NMHDR *pHdr = (NMHDR *)lParam;
|
||||
|
||||
if (pHdr->hwndFrom != hwndEditor)
|
||||
return 0;
|
||||
|
||||
if (pHdr->code == EN_SELCHANGE)
|
||||
{
|
||||
SELCHANGE *pSC = (SELCHANGE *)lParam;
|
||||
char buf[128];
|
||||
|
||||
sprintf( buf,"selection = %ld..%ld, line count=%ld\n",
|
||||
pSC->chrg.cpMin, pSC->chrg.cpMax,
|
||||
SendMessage(hwndEditor, EM_GETLINECOUNT, 0, 0));
|
||||
SetWindowText(GetDlgItem(hWnd, IDC_STATUSBAR), buf);
|
||||
SendMessage(hWnd, WM_USER, 0, 0);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hwndEditor = GetDlgItem(hWnd, IDC_EDITOR);
|
||||
|
||||
if ((HWND)lParam == hwndEditor)
|
||||
return 0;
|
||||
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case ID_FILE_EXIT:
|
||||
PostMessage(hWnd, WM_CLOSE, 0, 0);
|
||||
break;
|
||||
|
||||
case ID_FILE_NEW:
|
||||
SetWindowTextA(hwndEditor, "");
|
||||
/* FIXME: set default format too */
|
||||
break;
|
||||
|
||||
case ID_FILE_OPEN:
|
||||
case ID_FILE_SAVE:
|
||||
MessageBox(hWnd, "Open/Save not implemented", "WordPad", MB_OK);
|
||||
break;
|
||||
|
||||
case ID_FORMAT_BOLD:
|
||||
case ID_FORMAT_ITALIC:
|
||||
case ID_FORMAT_UNDERLINE:
|
||||
{
|
||||
CHARFORMAT2W fmt;
|
||||
int mask = CFM_BOLD;
|
||||
if (LOWORD(wParam) == ID_FORMAT_ITALIC) mask = CFM_ITALIC;
|
||||
if (LOWORD(wParam) == ID_FORMAT_UNDERLINE) mask = CFM_UNDERLINE;
|
||||
|
||||
ZeroMemory(&fmt, sizeof(fmt));
|
||||
fmt.cbSize = sizeof(fmt);
|
||||
SendMessage(hwndEditor, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&fmt);
|
||||
if (!(fmt.dwMask&mask))
|
||||
fmt.dwEffects |= mask;
|
||||
else
|
||||
fmt.dwEffects ^= mask;
|
||||
fmt.dwMask = mask;
|
||||
SendMessage(hwndEditor, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&fmt);
|
||||
break;
|
||||
}
|
||||
|
||||
case ID_EDIT_CUT:
|
||||
PostMessage(hwndEditor, WM_CUT, 0, 0);
|
||||
break;
|
||||
|
||||
case ID_EDIT_COPY:
|
||||
PostMessage(hwndEditor, WM_COPY, 0, 0);
|
||||
break;
|
||||
|
||||
case ID_EDIT_SELECTALL:
|
||||
{
|
||||
CHARRANGE range = {0, -1};
|
||||
SendMessage(hwndEditor, EM_EXSETSEL, 0, (LPARAM)&range);
|
||||
/* SendMessage(hwndEditor, EM_SETSEL, 0, -1); */
|
||||
return 0;
|
||||
}
|
||||
|
||||
case ID_EDIT_GETTEXT:
|
||||
{
|
||||
int nLen = GetWindowTextLengthW(hwndEditor);
|
||||
LPWSTR data = HeapAlloc( GetProcessHeap(), 0, (nLen+1)*sizeof(WCHAR) );
|
||||
TEXTRANGEW tr;
|
||||
|
||||
GetWindowTextW(hwndEditor, data, nLen+1);
|
||||
MessageBoxW(NULL, data, xszAppTitle, MB_OK);
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, data);
|
||||
data = HeapAlloc(GetProcessHeap(), 0, (nLen+1)*sizeof(WCHAR));
|
||||
tr.chrg.cpMin = 0;
|
||||
tr.chrg.cpMax = nLen;
|
||||
tr.lpstrText = data;
|
||||
SendMessage (hwndEditor, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
|
||||
MessageBoxW(NULL, data, xszAppTitle, MB_OK);
|
||||
HeapFree( GetProcessHeap(), 0, data );
|
||||
|
||||
/* SendMessage(hwndEditor, EM_SETSEL, 0, -1); */
|
||||
return 0;
|
||||
}
|
||||
|
||||
case ID_EDIT_CHARFORMAT:
|
||||
case ID_EDIT_DEFCHARFORMAT:
|
||||
{
|
||||
CHARFORMAT2W cf;
|
||||
LRESULT i;
|
||||
ZeroMemory(&cf, sizeof(cf));
|
||||
cf.cbSize = sizeof(cf);
|
||||
cf.dwMask = 0;
|
||||
i = SendMessage(hwndEditor, EM_GETCHARFORMAT,
|
||||
LOWORD(wParam) == ID_EDIT_CHARFORMAT, (LPARAM)&cf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
case ID_EDIT_PARAFORMAT:
|
||||
{
|
||||
PARAFORMAT2 pf;
|
||||
ZeroMemory(&pf, sizeof(pf));
|
||||
pf.cbSize = sizeof(pf);
|
||||
SendMessage(hwndEditor, EM_GETPARAFORMAT, 0, (LPARAM)&pf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
case ID_EDIT_SELECTIONINFO:
|
||||
{
|
||||
CHARRANGE range = {0, -1};
|
||||
char buf[128];
|
||||
WCHAR *data = NULL;
|
||||
|
||||
SendMessage(hwndEditor, EM_EXGETSEL, 0, (LPARAM)&range);
|
||||
data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data) * (range.cpMax-range.cpMin+1));
|
||||
SendMessage(hwndEditor, EM_GETSELTEXT, 0, (LPARAM)data);
|
||||
sprintf(buf, "Start = %ld, End = %ld", range.cpMin, range.cpMax);
|
||||
MessageBoxA(hWnd, buf, "Editor", MB_OK);
|
||||
MessageBoxW(hWnd, data, xszAppTitle, MB_OK);
|
||||
HeapFree( GetProcessHeap(), 0, data);
|
||||
/* SendMessage(hwndEditor, EM_SETSEL, 0, -1); */
|
||||
return 0;
|
||||
}
|
||||
|
||||
case ID_EDIT_READONLY:
|
||||
{
|
||||
long nStyle = GetWindowLong(hwndEditor, GWL_STYLE);
|
||||
if (nStyle & ES_READONLY)
|
||||
SendMessage(hwndEditor, EM_SETREADONLY, 0, 0);
|
||||
else
|
||||
SendMessage(hwndEditor, EM_SETREADONLY, 1, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
case ID_EDIT_MODIFIED:
|
||||
if (SendMessage(hwndEditor, EM_GETMODIFY, 0, 0))
|
||||
SendMessage(hwndEditor, EM_SETMODIFY, 0, 0);
|
||||
else
|
||||
SendMessage(hwndEditor, EM_SETMODIFY, 1, 0);
|
||||
return 0;
|
||||
|
||||
case ID_EDIT_UNDO:
|
||||
SendMessage(hwndEditor, EM_UNDO, 0, 0);
|
||||
return 0;
|
||||
|
||||
case ID_EDIT_REDO:
|
||||
SendMessage(hwndEditor, EM_REDO, 0, 0);
|
||||
return 0;
|
||||
|
||||
case ID_ALIGN_LEFT:
|
||||
case ID_ALIGN_CENTER:
|
||||
case ID_ALIGN_RIGHT:
|
||||
{
|
||||
PARAFORMAT2 pf;
|
||||
|
||||
pf.cbSize = sizeof(pf);
|
||||
pf.dwMask = PFM_ALIGNMENT;
|
||||
switch(LOWORD(wParam)) {
|
||||
case ID_ALIGN_LEFT: pf.wAlignment = PFA_LEFT; break;
|
||||
case ID_ALIGN_CENTER: pf.wAlignment = PFA_CENTER; break;
|
||||
case ID_ALIGN_RIGHT: pf.wAlignment = PFA_RIGHT; break;
|
||||
}
|
||||
SendMessage(hwndEditor, EM_SETPARAFORMAT, 0, (LPARAM)&pf);
|
||||
break;
|
||||
}
|
||||
|
||||
case ID_BACK_1:
|
||||
SendMessage(hwndEditor, EM_SETBKGNDCOLOR, 1, 0);
|
||||
break;
|
||||
|
||||
case ID_BACK_2:
|
||||
SendMessage(hwndEditor, EM_SETBKGNDCOLOR, 0, RGB(255,255,192));
|
||||
break;
|
||||
|
||||
default:
|
||||
SendMessage(hwndEditor, WM_COMMAND, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
HMENU hMenu = (HMENU)wParam;
|
||||
HWND hwndEditor = GetDlgItem(hWnd, IDC_EDITOR);
|
||||
PARAFORMAT pf;
|
||||
int nAlignment = -1;
|
||||
|
||||
pf.cbSize = sizeof(PARAFORMAT);
|
||||
SendMessage(hwndEditor, EM_GETPARAFORMAT, 0, (LPARAM)&pf);
|
||||
CheckMenuItem(hMenu, ID_EDIT_READONLY,
|
||||
MF_BYCOMMAND|(GetWindowLong(hwndEditor, GWL_STYLE)&ES_READONLY ? MF_CHECKED : MF_UNCHECKED));
|
||||
CheckMenuItem(hMenu, ID_EDIT_MODIFIED,
|
||||
MF_BYCOMMAND|(SendMessage(hwndEditor, EM_GETMODIFY, 0, 0) ? MF_CHECKED : MF_UNCHECKED));
|
||||
if (pf.dwMask & PFM_ALIGNMENT)
|
||||
nAlignment = pf.wAlignment;
|
||||
CheckMenuItem(hMenu, ID_ALIGN_LEFT, MF_BYCOMMAND|(nAlignment == PFA_LEFT) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, ID_ALIGN_CENTER, MF_BYCOMMAND|(nAlignment == PFA_CENTER) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, ID_ALIGN_RIGHT, MF_BYCOMMAND|(nAlignment == PFA_RIGHT) ? MF_CHECKED : MF_UNCHECKED);
|
||||
EnableMenuItem(hMenu, ID_EDIT_UNDO, MF_BYCOMMAND|(SendMessage(hwndEditor, EM_CANUNDO, 0, 0)) ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(hMenu, ID_EDIT_REDO, MF_BYCOMMAND|(SendMessage(hwndEditor, EM_CANREDO, 0, 0)) ? MF_ENABLED : MF_GRAYED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT OnSize( HWND hWnd, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
int nStatusSize = 0, nTBSize = 0;
|
||||
RECT rc;
|
||||
HWND hwndEditor = GetDlgItem(hWnd, IDC_EDITOR);
|
||||
HWND hwndStatusBar = GetDlgItem(hWnd, IDC_STATUSBAR);
|
||||
HWND hwndReBar = GetDlgItem(hWnd, IDC_REBAR);
|
||||
HWND hwndToolBar = GetDlgItem(hwndReBar, IDC_TOOLBAR);
|
||||
|
||||
if (hwndStatusBar)
|
||||
{
|
||||
SendMessage(hwndStatusBar, WM_SIZE, 0, 0);
|
||||
GetClientRect(hwndStatusBar, &rc);
|
||||
nStatusSize = rc.bottom - rc.top;
|
||||
}
|
||||
if (hwndToolBar)
|
||||
{
|
||||
rc.left = rc.top = 0;
|
||||
rc.right = LOWORD(lParam);
|
||||
rc.bottom = HIWORD(lParam);
|
||||
SendMessage(hwndToolBar, TB_AUTOSIZE, 0, 0);
|
||||
SendMessage(hwndReBar, RB_SIZETORECT, 0, (LPARAM)&rc);
|
||||
nTBSize = SendMessage(hwndReBar, RB_GETBARHEIGHT, 0, 0);
|
||||
GetClientRect(hwndReBar, &rc);
|
||||
MoveWindow(hwndReBar, 0, 0, LOWORD(lParam), rc.right, FALSE);
|
||||
}
|
||||
if (hwndEditor)
|
||||
{
|
||||
GetClientRect(hWnd, &rc);
|
||||
MoveWindow(hwndEditor, 0, nTBSize, rc.right, rc.bottom-nStatusSize-nTBSize, TRUE);
|
||||
}
|
||||
|
||||
return DefWindowProcW(hWnd, WM_SIZE, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(msg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
return OnCreate( hWnd, wParam, lParam );
|
||||
|
||||
case WM_USER:
|
||||
return OnUser( hWnd, wParam, lParam );
|
||||
|
||||
case WM_NOTIFY:
|
||||
return OnNotify( hWnd, wParam, lParam );
|
||||
|
||||
case WM_COMMAND:
|
||||
return OnCommand( hWnd, wParam, lParam );
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
if (LOWORD(wParam))
|
||||
SetFocus(GetDlgItem(hWnd, IDC_EDITOR));
|
||||
return 0;
|
||||
|
||||
case WM_INITMENUPOPUP:
|
||||
return OnInitPopupMenu( hWnd, wParam, lParam );
|
||||
|
||||
case WM_SIZE:
|
||||
return OnSize( hWnd, wParam, lParam );
|
||||
|
||||
default:
|
||||
return DefWindowProcW(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdParagraph, int res)
|
||||
{
|
||||
INITCOMMONCONTROLSEX classes = {8, ICC_BAR_CLASSES|ICC_COOL_CLASSES};
|
||||
HACCEL hAccel;
|
||||
WNDCLASSW wc;
|
||||
MSG msg;
|
||||
|
||||
InitCommonControlsEx(&classes);
|
||||
|
||||
hAccel = LoadAccelerators(hInstance, "MAINACCELTABLE");
|
||||
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wc.lpfnWndProc = WndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 4;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = NULL;
|
||||
wc.hCursor = LoadCursor(NULL, IDC_IBEAM);
|
||||
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
|
||||
wc.lpszMenuName = xszMainMenu;
|
||||
wc.lpszClassName = wszMainWndClass;
|
||||
RegisterClassW(&wc);
|
||||
|
||||
hMainWnd = CreateWindowExW(0, wszMainWndClass, wszAppTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, hInstance, NULL);
|
||||
ShowWindow(hMainWnd, SW_SHOWMAXIMIZED);
|
||||
|
||||
while(GetMessage(&msg,0,0,0))
|
||||
{
|
||||
if (TranslateAccelerator(hMainWnd, hAccel, &msg))
|
||||
continue;
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
if (!PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE))
|
||||
SendMessage(hMainWnd, WM_USER, 0, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
14
reactos/base/applications/wordpad/wordpad.rbuild
Normal file
14
reactos/base/applications/wordpad/wordpad.rbuild
Normal file
|
@ -0,0 +1,14 @@
|
|||
<module name="wordpad" type="win32gui" installbase="system32" installname="wordpad.exe">
|
||||
<include base="wordpad">.</include>
|
||||
<define name="__USE_W32API" />
|
||||
<define name="_WIN32_IE">0x0501</define>
|
||||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
<library>comdlg32</library>
|
||||
<library>advapi32</library>
|
||||
<library>shell32</library>
|
||||
<library>comctl32</library>
|
||||
<file>wordpad.c</file>
|
||||
<file>rsrc.rc</file>
|
||||
</module>
|
Loading…
Reference in a new issue