ReactOS 0.4.15-dev-7953-g1f49173
wordpad.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_STRING_LEN   255
 
#define TWIPS_PER_INCH   1440
 
#define CENTMM_PER_INCH   2540
 
#define ID_FILE_EXIT   1000
 
#define ID_FILE_OPEN   1001
 
#define ID_FILE_SAVE   1002
 
#define ID_FILE_NEW   1003
 
#define ID_FILE_SAVEAS   1004
 
#define ID_FILE_RECENT1   1005
 
#define ID_FILE_RECENT2   1006
 
#define ID_FILE_RECENT3   1007
 
#define ID_FILE_RECENT4   1008
 
#define ID_FILE_RECENT_SEPARATOR   1009
 
#define ID_PRINT   1010
 
#define ID_PREVIEW   1011
 
#define ID_PRINTSETUP   1012
 
#define ID_PRINT_QUICK   1013
 
#define ID_FIND   1014
 
#define ID_FIND_NEXT   1015
 
#define ID_REPLACE   1016
 
#define ID_PREVIEW_NEXTPAGE   1017
 
#define ID_PREVIEW_PREVPAGE   1018
 
#define ID_PREVIEW_NUMPAGES   1019
 
#define ID_PREVIEW_ZOOMIN   1020
 
#define ID_PREVIEW_ZOOMOUT   1021
 
#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_EDIT_PASTE   1312
 
#define ID_EDIT_CLEAR   1313
 
#define ID_BULLET   1314
 
#define ID_FONTSETTINGS   1315
 
#define ID_FORMAT_BOLD   1400
 
#define ID_FORMAT_ITALIC   1401
 
#define ID_FORMAT_UNDERLINE   1402
 
#define ID_FORMAT_COLOR   1403
 
#define ID_TOGGLE_TOOLBAR   1500
 
#define ID_TOGGLE_FORMATBAR   1501
 
#define ID_TOGGLE_STATUSBAR   1502
 
#define ID_TOGGLE_RULER   1503
 
#define PREVIEW_BUTTONS   7
 
#define FILELIST_ENTRIES   4
 
#define FILELIST_ENTRY_LENGTH   33
 
#define BANDID_TOOLBAR   2
 
#define BANDID_FORMATBAR   3
 
#define BANDID_RULER   0
 
#define BANDID_STATUSBAR   1
 
#define BANDID_FONTLIST   4
 
#define BANDID_SIZELIST   5
 
#define BANDID_PREVIEW_BTN1   6
 
#define BANDID_PREVIEW_BTN2   7
 
#define BANDID_PREVIEW_BTN3   8
 
#define BANDID_PREVIEW_BTN4   9
 
#define BANDID_PREVIEW_BTN5   10
 
#define BANDID_PREVIEW_BTN6   11
 
#define BANDID_PREVIEW_BTN7   12
 
#define BANDID_PREVIEW_BUFFER   13
 
#define ID_WORDWRAP_NONE   0
 
#define ID_WORDWRAP_WINDOW   1
 
#define ID_WORDWRAP_MARGIN   2
 
#define ID_NEWFILE_ABORT   100
 
#define ID_TAB_ADD   100
 
#define ID_TAB_DEL   101
 
#define ID_TAB_EMPTY   102
 
#define IDC_PAGEFMT_TB   100
 
#define IDC_PAGEFMT_FB   101
 
#define IDC_PAGEFMT_RU   102
 
#define IDC_PAGEFMT_SB   103
 
#define IDC_PAGEFMT_WN   104
 
#define IDC_PAGEFMT_WW   105
 
#define IDC_PAGEFMT_WM   106
 
#define IDC_PAGEFMT_ID   107
 
#define ID_DATETIME   1600
 
#define ID_PARAFORMAT   1601
 
#define ID_TABSTOPS   1602
 
#define ID_ABOUT   1603
 
#define ID_VIEWPROPERTIES   1604
 
#define ID_COLOR_FIRST   1800
 
#define ID_COLOR_BLACK   1800
 
#define ID_COLOR_MAROON   1801
 
#define ID_COLOR_GREEN   1802
 
#define ID_COLOR_OLIVE   1803
 
#define ID_COLOR_NAVY   1804
 
#define ID_COLOR_PURPLE   1805
 
#define ID_COLOR_TEAL   1806
 
#define ID_COLOR_GRAY   1807
 
#define ID_COLOR_SILVER   1808
 
#define ID_COLOR_RED   1809
 
#define ID_COLOR_LIME   1810
 
#define ID_COLOR_YELLOW   1811
 
#define ID_COLOR_BLUE   1812
 
#define ID_COLOR_FUCHSIA   1813
 
#define ID_COLOR_AQUA   1814
 
#define ID_COLOR_WHITE   1815
 
#define ID_COLOR_AUTOMATIC   1816
 
#define IDC_STATUSBAR   2000
 
#define IDC_EDITOR   2001
 
#define IDC_TOOLBAR   2002
 
#define IDC_FORMATBAR   2003
 
#define IDC_REBAR   2004
 
#define IDC_COMBO   2005
 
#define IDC_DATETIME   2006
 
#define IDC_NEWFILE   2007
 
#define IDC_PARA_LEFT   2008
 
#define IDC_PARA_RIGHT   2009
 
#define IDC_PARA_FIRST   2010
 
#define IDC_PARA_ALIGN   2011
 
#define IDC_TABSTOPS   2012
 
#define IDC_FONTLIST   2013
 
#define IDC_SIZELIST   2014
 
#define IDC_RULER   2015
 
#define IDC_PREVIEW   2016
 
#define IDD_DATETIME   2100
 
#define IDD_NEWFILE   2101
 
#define IDD_PARAFORMAT   2102
 
#define IDD_TABSTOPS   2103
 
#define IDD_FORMATOPTS   2104
 
#define IDM_MAINMENU   2200
 
#define IDM_POPUP   2201
 
#define IDM_COLOR_POPUP   2202
 
#define IDB_TOOLBAR   100
 
#define IDB_FORMATBAR   101
 
#define IDI_WORDPAD   102
 
#define IDC_ZOOM   103
 
#define STRING_ALL_FILES   1400
 
#define STRING_TEXT_FILES_TXT   1401
 
#define STRING_TEXT_FILES_UNICODE_TXT   1402
 
#define STRING_RICHTEXT_FILES_RTF   1403
 
#define STRING_NEWFILE_RICHTEXT   1404
 
#define STRING_NEWFILE_TXT   1405
 
#define STRING_NEWFILE_TXT_UNICODE   1406
 
#define STRING_PRINTER_FILES_PRN   1407
 
#define STRING_ALIGN_LEFT   1416
 
#define STRING_ALIGN_RIGHT   1417
 
#define STRING_ALIGN_CENTER   1418
 
#define STRING_VIEWPROPS_TITLE   1432
 
#define STRING_VIEWPROPS_TEXT   1433
 
#define STRING_VIEWPROPS_RICHTEXT   1434
 
#define STRING_PREVIEW_PRINT   1448
 
#define STRING_PREVIEW_NEXTPAGE   1449
 
#define STRING_PREVIEW_PREVPAGE   1450
 
#define STRING_PREVIEW_TWOPAGES   1451
 
#define STRING_PREVIEW_ONEPAGE   1452
 
#define STRING_PREVIEW_ZOOMIN   1453
 
#define STRING_PREVIEW_ZOOMOUT   1454
 
#define STRING_PREVIEW_CLOSE   1455
 
#define STRING_PREVIEW_PAGE   1456
 
#define STRING_PREVIEW_PAGES   1457
 
#define STRING_UNITS_CM   1458
 
#define STRING_UNITS_IN   1459
 
#define STRING_UNITS_INCH   1460
 
#define STRING_UNITS_PT   1461
 
#define STRING_DEFAULT_FILENAME   1700
 
#define STRING_PROMPT_SAVE_CHANGES   1701
 
#define STRING_SEARCH_FINISHED   1702
 
#define STRING_LOAD_RICHED_FAILED   1703
 
#define STRING_SAVE_LOSEFORMATTING   1704
 
#define STRING_INVALID_NUMBER   1705
 
#define STRING_OLE_STORAGE_NOT_SUPPORTED   1706
 
#define STRING_WRITE_FAILED   1707
 
#define STRING_WRITE_ACCESS_DENIED   1708
 
#define STRING_OPEN_FAILED   1709
 
#define STRING_OPEN_ACCESS_DENIED   1710
 
#define STRING_PRINTING_NOT_IMPLEMENTED   1711
 
#define STRING_MAX_TAB_STOPS   1712
 

Functions

LPWSTR file_basename (LPWSTR)
 
void dialog_printsetup (HWND)
 
void dialog_print (HWND, LPWSTR)
 
void target_device (HWND, DWORD)
 
void print_quick (HWND, LPWSTR)
 
LRESULT preview_command (HWND, WPARAM)
 
void init_preview (HWND, LPWSTR)
 
void close_preview (HWND)
 
BOOL preview_isactive (void)
 
void get_default_printer_opts (void)
 
void registry_set_pagemargins (HKEY)
 
void registry_read_pagemargins (HKEY)
 
void registry_set_previewpages (HKEY hKey)
 
void registry_read_previewpages (HKEY hKey)
 
LRESULT CALLBACK ruler_proc (HWND, UINT, WPARAM, LPARAM)
 
void redraw_ruler (HWND)
 
int reg_formatindex (WPARAM)
 
void registry_read_filelist (HWND)
 
void registry_read_options (void)
 
void registry_read_formatopts_all (DWORD[], DWORD[])
 
void registry_read_winrect (RECT *)
 
void registry_read_maximized (DWORD *)
 
void registry_set_filelist (LPCWSTR, HWND)
 
void registry_set_formatopts_all (DWORD[], DWORD[])
 
void registry_set_options (HWND)
 
HRESULT setup_richedit_olecallback (HWND hEditorWnd)
 

Macro Definition Documentation

◆ BANDID_FONTLIST

#define BANDID_FONTLIST   4

Definition at line 98 of file wordpad.h.

◆ BANDID_FORMATBAR

#define BANDID_FORMATBAR   3

Definition at line 95 of file wordpad.h.

◆ BANDID_PREVIEW_BTN1

#define BANDID_PREVIEW_BTN1   6

Definition at line 101 of file wordpad.h.

◆ BANDID_PREVIEW_BTN2

#define BANDID_PREVIEW_BTN2   7

Definition at line 102 of file wordpad.h.

◆ BANDID_PREVIEW_BTN3

#define BANDID_PREVIEW_BTN3   8

Definition at line 103 of file wordpad.h.

◆ BANDID_PREVIEW_BTN4

#define BANDID_PREVIEW_BTN4   9

Definition at line 104 of file wordpad.h.

◆ BANDID_PREVIEW_BTN5

#define BANDID_PREVIEW_BTN5   10

Definition at line 105 of file wordpad.h.

◆ BANDID_PREVIEW_BTN6

#define BANDID_PREVIEW_BTN6   11

Definition at line 106 of file wordpad.h.

◆ BANDID_PREVIEW_BTN7

#define BANDID_PREVIEW_BTN7   12

Definition at line 107 of file wordpad.h.

◆ BANDID_PREVIEW_BUFFER

#define BANDID_PREVIEW_BUFFER   13

Definition at line 108 of file wordpad.h.

◆ BANDID_RULER

#define BANDID_RULER   0

Definition at line 96 of file wordpad.h.

◆ BANDID_SIZELIST

#define BANDID_SIZELIST   5

Definition at line 99 of file wordpad.h.

◆ BANDID_STATUSBAR

#define BANDID_STATUSBAR   1

Definition at line 97 of file wordpad.h.

◆ BANDID_TOOLBAR

#define BANDID_TOOLBAR   2

Definition at line 94 of file wordpad.h.

◆ CENTMM_PER_INCH

#define CENTMM_PER_INCH   2540

Definition at line 25 of file wordpad.h.

◆ FILELIST_ENTRIES

#define FILELIST_ENTRIES   4

Definition at line 91 of file wordpad.h.

◆ FILELIST_ENTRY_LENGTH

#define FILELIST_ENTRY_LENGTH   33

Definition at line 92 of file wordpad.h.

◆ ID_ABOUT

#define ID_ABOUT   1603

Definition at line 133 of file wordpad.h.

◆ ID_ALIGN_CENTER

#define ID_ALIGN_CENTER   1101

Definition at line 55 of file wordpad.h.

◆ ID_ALIGN_LEFT

#define ID_ALIGN_LEFT   1100

Definition at line 54 of file wordpad.h.

◆ ID_ALIGN_RIGHT

#define ID_ALIGN_RIGHT   1102

Definition at line 56 of file wordpad.h.

◆ ID_BACK_1

#define ID_BACK_1   1200

Definition at line 58 of file wordpad.h.

◆ ID_BACK_2

#define ID_BACK_2   1201

Definition at line 59 of file wordpad.h.

◆ ID_BULLET

#define ID_BULLET   1314

Definition at line 75 of file wordpad.h.

◆ ID_COLOR_AQUA

#define ID_COLOR_AQUA   1814

Definition at line 151 of file wordpad.h.

◆ ID_COLOR_AUTOMATIC

#define ID_COLOR_AUTOMATIC   1816

Definition at line 153 of file wordpad.h.

◆ ID_COLOR_BLACK

#define ID_COLOR_BLACK   1800

Definition at line 137 of file wordpad.h.

◆ ID_COLOR_BLUE

#define ID_COLOR_BLUE   1812

Definition at line 149 of file wordpad.h.

◆ ID_COLOR_FIRST

#define ID_COLOR_FIRST   1800

Definition at line 136 of file wordpad.h.

◆ ID_COLOR_FUCHSIA

#define ID_COLOR_FUCHSIA   1813

Definition at line 150 of file wordpad.h.

◆ ID_COLOR_GRAY

#define ID_COLOR_GRAY   1807

Definition at line 144 of file wordpad.h.

◆ ID_COLOR_GREEN

#define ID_COLOR_GREEN   1802

Definition at line 139 of file wordpad.h.

◆ ID_COLOR_LIME

#define ID_COLOR_LIME   1810

Definition at line 147 of file wordpad.h.

◆ ID_COLOR_MAROON

#define ID_COLOR_MAROON   1801

Definition at line 138 of file wordpad.h.

◆ ID_COLOR_NAVY

#define ID_COLOR_NAVY   1804

Definition at line 141 of file wordpad.h.

◆ ID_COLOR_OLIVE

#define ID_COLOR_OLIVE   1803

Definition at line 140 of file wordpad.h.

◆ ID_COLOR_PURPLE

#define ID_COLOR_PURPLE   1805

Definition at line 142 of file wordpad.h.

◆ ID_COLOR_RED

#define ID_COLOR_RED   1809

Definition at line 146 of file wordpad.h.

◆ ID_COLOR_SILVER

#define ID_COLOR_SILVER   1808

Definition at line 145 of file wordpad.h.

◆ ID_COLOR_TEAL

#define ID_COLOR_TEAL   1806

Definition at line 143 of file wordpad.h.

◆ ID_COLOR_WHITE

#define ID_COLOR_WHITE   1815

Definition at line 152 of file wordpad.h.

◆ ID_COLOR_YELLOW

#define ID_COLOR_YELLOW   1811

Definition at line 148 of file wordpad.h.

◆ ID_DATETIME

#define ID_DATETIME   1600

Definition at line 129 of file wordpad.h.

◆ ID_EDIT_CHARFORMAT

#define ID_EDIT_CHARFORMAT   1304

Definition at line 65 of file wordpad.h.

◆ ID_EDIT_CLEAR

#define ID_EDIT_CLEAR   1313

Definition at line 74 of file wordpad.h.

◆ ID_EDIT_COPY

#define ID_EDIT_COPY   1310

Definition at line 71 of file wordpad.h.

◆ ID_EDIT_CUT

#define ID_EDIT_CUT   1311

Definition at line 72 of file wordpad.h.

◆ ID_EDIT_DEFCHARFORMAT

#define ID_EDIT_DEFCHARFORMAT   1306

Definition at line 67 of file wordpad.h.

◆ ID_EDIT_GETTEXT

#define ID_EDIT_GETTEXT   1309

Definition at line 70 of file wordpad.h.

◆ ID_EDIT_MODIFIED

#define ID_EDIT_MODIFIED   1303

Definition at line 64 of file wordpad.h.

◆ ID_EDIT_PARAFORMAT

#define ID_EDIT_PARAFORMAT   1305

Definition at line 66 of file wordpad.h.

◆ ID_EDIT_PASTE

#define ID_EDIT_PASTE   1312

Definition at line 73 of file wordpad.h.

◆ ID_EDIT_READONLY

#define ID_EDIT_READONLY   1302

Definition at line 63 of file wordpad.h.

◆ ID_EDIT_REDO

#define ID_EDIT_REDO   1308

Definition at line 69 of file wordpad.h.

◆ ID_EDIT_SELECTALL

#define ID_EDIT_SELECTALL   1300

Definition at line 61 of file wordpad.h.

◆ ID_EDIT_SELECTIONINFO

#define ID_EDIT_SELECTIONINFO   1301

Definition at line 62 of file wordpad.h.

◆ ID_EDIT_UNDO

#define ID_EDIT_UNDO   1307

Definition at line 68 of file wordpad.h.

◆ ID_FILE_EXIT

#define ID_FILE_EXIT   1000

Definition at line 27 of file wordpad.h.

◆ ID_FILE_NEW

#define ID_FILE_NEW   1003

Definition at line 30 of file wordpad.h.

◆ ID_FILE_OPEN

#define ID_FILE_OPEN   1001

Definition at line 28 of file wordpad.h.

◆ ID_FILE_RECENT1

#define ID_FILE_RECENT1   1005

Definition at line 33 of file wordpad.h.

◆ ID_FILE_RECENT2

#define ID_FILE_RECENT2   1006

Definition at line 34 of file wordpad.h.

◆ ID_FILE_RECENT3

#define ID_FILE_RECENT3   1007

Definition at line 35 of file wordpad.h.

◆ ID_FILE_RECENT4

#define ID_FILE_RECENT4   1008

Definition at line 36 of file wordpad.h.

◆ ID_FILE_RECENT_SEPARATOR

#define ID_FILE_RECENT_SEPARATOR   1009

Definition at line 37 of file wordpad.h.

◆ ID_FILE_SAVE

#define ID_FILE_SAVE   1002

Definition at line 29 of file wordpad.h.

◆ ID_FILE_SAVEAS

#define ID_FILE_SAVEAS   1004

Definition at line 31 of file wordpad.h.

◆ ID_FIND

#define ID_FIND   1014

Definition at line 44 of file wordpad.h.

◆ ID_FIND_NEXT

#define ID_FIND_NEXT   1015

Definition at line 45 of file wordpad.h.

◆ ID_FONTSETTINGS

#define ID_FONTSETTINGS   1315

Definition at line 77 of file wordpad.h.

◆ ID_FORMAT_BOLD

#define ID_FORMAT_BOLD   1400

Definition at line 79 of file wordpad.h.

◆ ID_FORMAT_COLOR

#define ID_FORMAT_COLOR   1403

Definition at line 82 of file wordpad.h.

◆ ID_FORMAT_ITALIC

#define ID_FORMAT_ITALIC   1401

Definition at line 80 of file wordpad.h.

◆ ID_FORMAT_UNDERLINE

#define ID_FORMAT_UNDERLINE   1402

Definition at line 81 of file wordpad.h.

◆ ID_NEWFILE_ABORT

#define ID_NEWFILE_ABORT   100

Definition at line 114 of file wordpad.h.

◆ ID_PARAFORMAT

#define ID_PARAFORMAT   1601

Definition at line 130 of file wordpad.h.

◆ ID_PREVIEW

#define ID_PREVIEW   1011

Definition at line 40 of file wordpad.h.

◆ ID_PREVIEW_NEXTPAGE

#define ID_PREVIEW_NEXTPAGE   1017

Definition at line 48 of file wordpad.h.

◆ ID_PREVIEW_NUMPAGES

#define ID_PREVIEW_NUMPAGES   1019

Definition at line 50 of file wordpad.h.

◆ ID_PREVIEW_PREVPAGE

#define ID_PREVIEW_PREVPAGE   1018

Definition at line 49 of file wordpad.h.

◆ ID_PREVIEW_ZOOMIN

#define ID_PREVIEW_ZOOMIN   1020

Definition at line 51 of file wordpad.h.

◆ ID_PREVIEW_ZOOMOUT

#define ID_PREVIEW_ZOOMOUT   1021

Definition at line 52 of file wordpad.h.

◆ ID_PRINT

#define ID_PRINT   1010

Definition at line 39 of file wordpad.h.

◆ ID_PRINT_QUICK

#define ID_PRINT_QUICK   1013

Definition at line 42 of file wordpad.h.

◆ ID_PRINTSETUP

#define ID_PRINTSETUP   1012

Definition at line 41 of file wordpad.h.

◆ ID_REPLACE

#define ID_REPLACE   1016

Definition at line 46 of file wordpad.h.

◆ ID_TAB_ADD

#define ID_TAB_ADD   100

Definition at line 116 of file wordpad.h.

◆ ID_TAB_DEL

#define ID_TAB_DEL   101

Definition at line 117 of file wordpad.h.

◆ ID_TAB_EMPTY

#define ID_TAB_EMPTY   102

Definition at line 118 of file wordpad.h.

◆ ID_TABSTOPS

#define ID_TABSTOPS   1602

Definition at line 131 of file wordpad.h.

◆ ID_TOGGLE_FORMATBAR

#define ID_TOGGLE_FORMATBAR   1501

Definition at line 85 of file wordpad.h.

◆ ID_TOGGLE_RULER

#define ID_TOGGLE_RULER   1503

Definition at line 87 of file wordpad.h.

◆ ID_TOGGLE_STATUSBAR

#define ID_TOGGLE_STATUSBAR   1502

Definition at line 86 of file wordpad.h.

◆ ID_TOGGLE_TOOLBAR

#define ID_TOGGLE_TOOLBAR   1500

Definition at line 84 of file wordpad.h.

◆ ID_VIEWPROPERTIES

#define ID_VIEWPROPERTIES   1604

Definition at line 134 of file wordpad.h.

◆ ID_WORDWRAP_MARGIN

#define ID_WORDWRAP_MARGIN   2

Definition at line 112 of file wordpad.h.

◆ ID_WORDWRAP_NONE

#define ID_WORDWRAP_NONE   0

Definition at line 110 of file wordpad.h.

◆ ID_WORDWRAP_WINDOW

#define ID_WORDWRAP_WINDOW   1

Definition at line 111 of file wordpad.h.

◆ IDB_FORMATBAR

#define IDB_FORMATBAR   101

Definition at line 184 of file wordpad.h.

◆ IDB_TOOLBAR

#define IDB_TOOLBAR   100

Definition at line 183 of file wordpad.h.

◆ IDC_COMBO

#define IDC_COMBO   2005

Definition at line 160 of file wordpad.h.

◆ IDC_DATETIME

#define IDC_DATETIME   2006

Definition at line 161 of file wordpad.h.

◆ IDC_EDITOR

#define IDC_EDITOR   2001

Definition at line 156 of file wordpad.h.

◆ IDC_FONTLIST

#define IDC_FONTLIST   2013

Definition at line 168 of file wordpad.h.

◆ IDC_FORMATBAR

#define IDC_FORMATBAR   2003

Definition at line 158 of file wordpad.h.

◆ IDC_NEWFILE

#define IDC_NEWFILE   2007

Definition at line 162 of file wordpad.h.

◆ IDC_PAGEFMT_FB

#define IDC_PAGEFMT_FB   101

Definition at line 121 of file wordpad.h.

◆ IDC_PAGEFMT_ID

#define IDC_PAGEFMT_ID   107

Definition at line 127 of file wordpad.h.

◆ IDC_PAGEFMT_RU

#define IDC_PAGEFMT_RU   102

Definition at line 122 of file wordpad.h.

◆ IDC_PAGEFMT_SB

#define IDC_PAGEFMT_SB   103

Definition at line 123 of file wordpad.h.

◆ IDC_PAGEFMT_TB

#define IDC_PAGEFMT_TB   100

Definition at line 120 of file wordpad.h.

◆ IDC_PAGEFMT_WM

#define IDC_PAGEFMT_WM   106

Definition at line 126 of file wordpad.h.

◆ IDC_PAGEFMT_WN

#define IDC_PAGEFMT_WN   104

Definition at line 124 of file wordpad.h.

◆ IDC_PAGEFMT_WW

#define IDC_PAGEFMT_WW   105

Definition at line 125 of file wordpad.h.

◆ IDC_PARA_ALIGN

#define IDC_PARA_ALIGN   2011

Definition at line 166 of file wordpad.h.

◆ IDC_PARA_FIRST

#define IDC_PARA_FIRST   2010

Definition at line 165 of file wordpad.h.

◆ IDC_PARA_LEFT

#define IDC_PARA_LEFT   2008

Definition at line 163 of file wordpad.h.

◆ IDC_PARA_RIGHT

#define IDC_PARA_RIGHT   2009

Definition at line 164 of file wordpad.h.

◆ IDC_PREVIEW

#define IDC_PREVIEW   2016

Definition at line 171 of file wordpad.h.

◆ IDC_REBAR

#define IDC_REBAR   2004

Definition at line 159 of file wordpad.h.

◆ IDC_RULER

#define IDC_RULER   2015

Definition at line 170 of file wordpad.h.

◆ IDC_SIZELIST

#define IDC_SIZELIST   2014

Definition at line 169 of file wordpad.h.

◆ IDC_STATUSBAR

#define IDC_STATUSBAR   2000

Definition at line 155 of file wordpad.h.

◆ IDC_TABSTOPS

#define IDC_TABSTOPS   2012

Definition at line 167 of file wordpad.h.

◆ IDC_TOOLBAR

#define IDC_TOOLBAR   2002

Definition at line 157 of file wordpad.h.

◆ IDC_ZOOM

#define IDC_ZOOM   103

Definition at line 195 of file wordpad.h.

◆ IDD_DATETIME

#define IDD_DATETIME   2100

Definition at line 173 of file wordpad.h.

◆ IDD_FORMATOPTS

#define IDD_FORMATOPTS   2104

Definition at line 177 of file wordpad.h.

◆ IDD_NEWFILE

#define IDD_NEWFILE   2101

Definition at line 174 of file wordpad.h.

◆ IDD_PARAFORMAT

#define IDD_PARAFORMAT   2102

Definition at line 175 of file wordpad.h.

◆ IDD_TABSTOPS

#define IDD_TABSTOPS   2103

Definition at line 176 of file wordpad.h.

◆ IDI_WORDPAD

#define IDI_WORDPAD   102

Definition at line 186 of file wordpad.h.

◆ IDM_COLOR_POPUP

#define IDM_COLOR_POPUP   2202

Definition at line 181 of file wordpad.h.

◆ IDM_MAINMENU

#define IDM_MAINMENU   2200

Definition at line 179 of file wordpad.h.

◆ IDM_POPUP

#define IDM_POPUP   2201

Definition at line 180 of file wordpad.h.

◆ MAX_STRING_LEN

#define MAX_STRING_LEN   255

Definition at line 22 of file wordpad.h.

◆ PREVIEW_BUTTONS

#define PREVIEW_BUTTONS   7

Definition at line 89 of file wordpad.h.

◆ STRING_ALIGN_CENTER

#define STRING_ALIGN_CENTER   1418

Definition at line 212 of file wordpad.h.

◆ STRING_ALIGN_LEFT

#define STRING_ALIGN_LEFT   1416

Definition at line 210 of file wordpad.h.

◆ STRING_ALIGN_RIGHT

#define STRING_ALIGN_RIGHT   1417

Definition at line 211 of file wordpad.h.

◆ STRING_ALL_FILES

#define STRING_ALL_FILES   1400

Definition at line 199 of file wordpad.h.

◆ STRING_DEFAULT_FILENAME

#define STRING_DEFAULT_FILENAME   1700

Definition at line 234 of file wordpad.h.

◆ STRING_INVALID_NUMBER

#define STRING_INVALID_NUMBER   1705

Definition at line 239 of file wordpad.h.

◆ STRING_LOAD_RICHED_FAILED

#define STRING_LOAD_RICHED_FAILED   1703

Definition at line 237 of file wordpad.h.

◆ STRING_MAX_TAB_STOPS

#define STRING_MAX_TAB_STOPS   1712

Definition at line 246 of file wordpad.h.

◆ STRING_NEWFILE_RICHTEXT

#define STRING_NEWFILE_RICHTEXT   1404

Definition at line 204 of file wordpad.h.

◆ STRING_NEWFILE_TXT

#define STRING_NEWFILE_TXT   1405

Definition at line 205 of file wordpad.h.

◆ STRING_NEWFILE_TXT_UNICODE

#define STRING_NEWFILE_TXT_UNICODE   1406

Definition at line 206 of file wordpad.h.

◆ STRING_OLE_STORAGE_NOT_SUPPORTED

#define STRING_OLE_STORAGE_NOT_SUPPORTED   1706

Definition at line 240 of file wordpad.h.

◆ STRING_OPEN_ACCESS_DENIED

#define STRING_OPEN_ACCESS_DENIED   1710

Definition at line 244 of file wordpad.h.

◆ STRING_OPEN_FAILED

#define STRING_OPEN_FAILED   1709

Definition at line 243 of file wordpad.h.

◆ STRING_PREVIEW_CLOSE

#define STRING_PREVIEW_CLOSE   1455

Definition at line 225 of file wordpad.h.

◆ STRING_PREVIEW_NEXTPAGE

#define STRING_PREVIEW_NEXTPAGE   1449

Definition at line 219 of file wordpad.h.

◆ STRING_PREVIEW_ONEPAGE

#define STRING_PREVIEW_ONEPAGE   1452

Definition at line 222 of file wordpad.h.

◆ STRING_PREVIEW_PAGE

#define STRING_PREVIEW_PAGE   1456

Definition at line 226 of file wordpad.h.

◆ STRING_PREVIEW_PAGES

#define STRING_PREVIEW_PAGES   1457

Definition at line 227 of file wordpad.h.

◆ STRING_PREVIEW_PREVPAGE

#define STRING_PREVIEW_PREVPAGE   1450

Definition at line 220 of file wordpad.h.

◆ STRING_PREVIEW_PRINT

#define STRING_PREVIEW_PRINT   1448

Definition at line 218 of file wordpad.h.

◆ STRING_PREVIEW_TWOPAGES

#define STRING_PREVIEW_TWOPAGES   1451

Definition at line 221 of file wordpad.h.

◆ STRING_PREVIEW_ZOOMIN

#define STRING_PREVIEW_ZOOMIN   1453

Definition at line 223 of file wordpad.h.

◆ STRING_PREVIEW_ZOOMOUT

#define STRING_PREVIEW_ZOOMOUT   1454

Definition at line 224 of file wordpad.h.

◆ STRING_PRINTER_FILES_PRN

#define STRING_PRINTER_FILES_PRN   1407

Definition at line 208 of file wordpad.h.

◆ STRING_PRINTING_NOT_IMPLEMENTED

#define STRING_PRINTING_NOT_IMPLEMENTED   1711

Definition at line 245 of file wordpad.h.

◆ STRING_PROMPT_SAVE_CHANGES

#define STRING_PROMPT_SAVE_CHANGES   1701

Definition at line 235 of file wordpad.h.

◆ STRING_RICHTEXT_FILES_RTF

#define STRING_RICHTEXT_FILES_RTF   1403

Definition at line 202 of file wordpad.h.

◆ STRING_SAVE_LOSEFORMATTING

#define STRING_SAVE_LOSEFORMATTING   1704

Definition at line 238 of file wordpad.h.

◆ STRING_SEARCH_FINISHED

#define STRING_SEARCH_FINISHED   1702

Definition at line 236 of file wordpad.h.

◆ STRING_TEXT_FILES_TXT

#define STRING_TEXT_FILES_TXT   1401

Definition at line 200 of file wordpad.h.

◆ STRING_TEXT_FILES_UNICODE_TXT

#define STRING_TEXT_FILES_UNICODE_TXT   1402

Definition at line 201 of file wordpad.h.

◆ STRING_UNITS_CM

#define STRING_UNITS_CM   1458

Definition at line 229 of file wordpad.h.

◆ STRING_UNITS_IN

#define STRING_UNITS_IN   1459

Definition at line 230 of file wordpad.h.

◆ STRING_UNITS_INCH

#define STRING_UNITS_INCH   1460

Definition at line 231 of file wordpad.h.

◆ STRING_UNITS_PT

#define STRING_UNITS_PT   1461

Definition at line 232 of file wordpad.h.

◆ STRING_VIEWPROPS_RICHTEXT

#define STRING_VIEWPROPS_RICHTEXT   1434

Definition at line 216 of file wordpad.h.

◆ STRING_VIEWPROPS_TEXT

#define STRING_VIEWPROPS_TEXT   1433

Definition at line 215 of file wordpad.h.

◆ STRING_VIEWPROPS_TITLE

#define STRING_VIEWPROPS_TITLE   1432

Definition at line 214 of file wordpad.h.

◆ STRING_WRITE_ACCESS_DENIED

#define STRING_WRITE_ACCESS_DENIED   1708

Definition at line 242 of file wordpad.h.

◆ STRING_WRITE_FAILED

#define STRING_WRITE_FAILED   1707

Definition at line 241 of file wordpad.h.

◆ TWIPS_PER_INCH

#define TWIPS_PER_INCH   1440

Definition at line 24 of file wordpad.h.

Function Documentation

◆ close_preview()

void close_preview ( HWND  hMainWnd)

Definition at line 751 of file print.c.

752{
753 HWND hwndPreview = GetDlgItem(hMainWnd, IDC_PREVIEW);
754 preview.window.right = 0;
756 preview.page = 0;
760 if (preview.zoomlevel > 0)
762 if(preview.hdc) {
765 DeleteObject(oldbm);
766 preview.hdc = NULL;
767 }
768 if(preview.hdc2) {
771 DeleteObject(oldbm);
772 preview.hdc2 = NULL;
773 }
774
776 DestroyWindow(hwndPreview);
777}
static void preview_bar_show(HWND hMainWnd, BOOL show)
Definition: print.c:578
static previewinfo preview
Definition: print.c:56
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
pKey DeleteObject()
HWND hMainWnd
Definition: magnifier.c:32
static HBITMAP
Definition: button.c:44
#define OBJ_BITMAP
Definition: objidl.idl:1415
int pages_shown
Definition: print.c:36
HDC hdc2
Definition: print.c:41
int pageCapacity
Definition: print.c:38
int * pageEnds
Definition: print.c:38
HDC hdc
Definition: print.c:40
int saved_pages_shown
Definition: print.c:37
int zoomlevel
Definition: print.c:48
int page
Definition: print.c:35
RECT window
Definition: print.c:42
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428
BOOL WINAPI DeleteDC(_In_ HDC)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IDC_PREVIEW
Definition: wordpad.h:171

Referenced by preview_exit().

◆ dialog_print()

void dialog_print ( HWND  hMainWnd,
LPWSTR  wszFileName 
)

Definition at line 549 of file print.c.

550{
551 PRINTDLGW pd;
553 int from = 0;
554 int to = 0;
555
556 ZeroMemory(&pd, sizeof(pd));
557 pd.lStructSize = sizeof(pd);
558 pd.hwndOwner = hMainWnd;
560 pd.nMinPage = 1;
561 pd.nMaxPage = -1;
562 pd.hDevMode = devMode;
563 pd.hDevNames = devNames;
564
566 if(from == to)
567 pd.Flags |= PD_NOSELECTION;
568
569 if(PrintDlgW(&pd))
570 {
571 devMode = pd.hDevMode;
572 devNames = pd.hDevNames;
573 print(&pd, wszFileName);
575 }
576}
static HGLOBAL devMode
Definition: print.c:52
static void print(LPPRINTDLGW pd, LPWSTR wszFileName)
Definition: print.c:438
static void update_ruler(HWND hRulerWnd)
Definition: print.c:296
static HWND get_ruler_wnd(HWND hMainWnd)
Definition: print.c:283
static HGLOBAL devNames
Definition: print.c:53
static WCHAR wszFileName[MAX_PATH]
Definition: wordpad.c:71
static HWND hEditorWnd
Definition: wordpad.c:61
#define PD_USEDEVMODECOPIESANDCOLLATE
Definition: commdlg.h:166
#define PD_NOSELECTION
Definition: commdlg.h:149
#define PD_RETURNDC
Definition: commdlg.h:155
BOOL WINAPI PrintDlgW(LPPRINTDLGW lppd)
Definition: printdlg.c:2403
CardRegion * from
Definition: spigame.cpp:19
HGLOBAL hDevMode
Definition: commdlg.h:488
DWORD Flags
Definition: commdlg.h:491
HWND hwndOwner
Definition: commdlg.h:487
HGLOBAL hDevNames
Definition: commdlg.h:489
WORD nMaxPage
Definition: commdlg.h:495
WORD nMinPage
Definition: commdlg.h:494
DWORD lStructSize
Definition: commdlg.h:486
#define ZeroMemory
Definition: winbase.h:1712
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define EM_GETSEL
Definition: winuser.h:1997
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_EDITOR
Definition: wordpad.h:156

Referenced by OnCommand(), and preview_command().

◆ dialog_printsetup()

void dialog_printsetup ( HWND  hMainWnd)

Definition at line 498 of file print.c.

499{
500 PAGESETUPDLGW ps;
501
502 ZeroMemory(&ps, sizeof(ps));
503 ps.lStructSize = sizeof(ps);
504 ps.hwndOwner = hMainWnd;
508 ps.hDevMode = devMode;
509 ps.hDevNames = devNames;
510
511 if(PageSetupDlgW(&ps))
512 {
515 devMode = ps.hDevMode;
516 devNames = ps.hDevNames;
518 }
519}
static LONG twips_to_centmm(int twips)
Definition: print.c:166
static LONG centmm_to_twips(int mm)
Definition: print.c:171
static RECT margins
Definition: print.c:55
#define PSD_MARGINS
Definition: commdlg.h:173
#define PSD_INHUNDREDTHSOFMILLIMETERS
Definition: commdlg.h:175
BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg)
Definition: printdlg.c:3938
HGLOBAL hDevNames
Definition: commdlg.h:452
DWORD lStructSize
Definition: commdlg.h:449
RECT rtMargin
Definition: commdlg.h:456
DWORD Flags
Definition: commdlg.h:453
HWND hwndOwner
Definition: commdlg.h:450
HGLOBAL hDevMode
Definition: commdlg.h:451
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

Referenced by OnCommand().

◆ file_basename()

LPWSTR file_basename ( LPWSTR  path)

Definition at line 212 of file wordpad.c.

213{
215
216 while(pos > path)
217 {
218 if(*pos == '\\' || *pos == '/')
219 {
220 pos++;
221 break;
222 }
223 pos--;
224 }
225 return pos;
226}
#define lstrlenW
Definition: compat.h:750
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by format_filelist_filename(), prompt_save_changes(), and set_caption().

◆ get_default_printer_opts()

void get_default_printer_opts ( void  )

Definition at line 521 of file print.c.

522{
523 PRINTDLGW pd;
524 ZeroMemory(&pd, sizeof(pd));
525
526 ZeroMemory(&pd, sizeof(pd));
527 pd.lStructSize = sizeof(pd);
529 pd.hDevMode = devMode;
530
531 PrintDlgW(&pd);
532
533 devMode = pd.hDevMode;
534 devNames = pd.hDevNames;
535}
#define PD_RETURNDEFAULT
Definition: commdlg.h:157

Referenced by WinMain().

◆ init_preview()

void init_preview ( HWND  hMainWnd,
LPWSTR  wszFileName 
)

Definition at line 735 of file print.c.

736{
738 preview.page = 1;
739 preview.hdc = 0;
740 preview.hdc2 = 0;
742 preview.zoomratio = 0;
743 preview.zoomlevel = 0;
745
748 0, 0, 200, 10, hMainWnd, (HMENU)IDC_PREVIEW, hInstance, NULL);
749}
const WCHAR wszPreviewWndClass[]
Definition: wordpad.c:57
HINSTANCE hInstance
Definition: charmap.c:19
#define TRUE
Definition: types.h:120
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define WS_CHILD
Definition: pedump.c:617
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_HSCROLL
Definition: pedump.c:628
LPWSTR wszFileName
Definition: print.c:49
float zoomratio
Definition: print.c:47
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)

Referenced by OnCommand().

◆ preview_command()

LRESULT preview_command ( HWND  hWnd,
WPARAM  wParam 
)

Definition at line 1203 of file print.c.

1204{
1205 switch(LOWORD(wParam))
1206 {
1207 case ID_FILE_EXIT:
1208 PostMessageW(hWnd, WM_CLOSE, 0, 0);
1209 break;
1210
1213 {
1215 preview.page++;
1216 else
1217 preview.page--;
1218
1220 }
1221 break;
1222
1225 break;
1226
1227 case ID_PREVIEW_ZOOMIN:
1228 if (preview.zoomlevel < 2)
1229 {
1230 if (preview.zoomlevel == 0)
1233 preview.zoomratio = 0;
1234 if (preview.pages_shown > 1)
1235 {
1236 /* Forced switch to one page when zooming in. */
1238 } else {
1239 HWND hwndPreview = GetDlgItem(hWnd, IDC_PREVIEW);
1240 update_preview_sizes(hwndPreview, TRUE);
1241 InvalidateRect(hwndPreview, NULL, FALSE);
1243 }
1244 }
1245 break;
1246
1247 case ID_PREVIEW_ZOOMOUT:
1248 if (preview.zoomlevel > 0)
1249 {
1250 HWND hwndPreview = GetDlgItem(hWnd, IDC_PREVIEW);
1252 preview.zoomratio = 0;
1253 if (preview.zoomlevel == 0 && preview.saved_pages_shown > 1) {
1255 } else {
1256 update_preview_sizes(hwndPreview, TRUE);
1257 InvalidateRect(hwndPreview, NULL, FALSE);
1259 }
1260 }
1261 break;
1262
1263 case ID_PRINT:
1265 SendMessageW(hWnd, WM_CLOSE, 0, 0);
1266 break;
1267 }
1268
1269 return 0;
1270}
HWND hWnd
Definition: settings.c:17
#define ID_FILE_EXIT
Definition: resource.h:46
static void update_preview_sizes(HWND hwndPreview, BOOL zoomLevelUpdated)
Definition: print.c:649
static void update_preview(HWND hMainWnd)
Definition: print.c:920
static void toggle_num_pages(HWND hMainWnd)
Definition: print.c:972
void dialog_print(HWND hMainWnd, LPWSTR wszFileName)
Definition: print.c:549
static void update_preview_buttons(HWND hMainWnd)
Definition: print.c:815
WPARAM wParam
Definition: combotst.c:138
#define LOWORD(l)
Definition: pedump.c:82
#define WM_CLOSE
Definition: winuser.h:1621
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define ID_PREVIEW_NEXTPAGE
Definition: wordpad.h:48
#define ID_PREVIEW_NUMPAGES
Definition: wordpad.h:50
#define ID_PREVIEW_ZOOMOUT
Definition: wordpad.h:52
#define ID_PREVIEW_ZOOMIN
Definition: wordpad.h:51
#define ID_PRINT
Definition: wordpad.h:39
#define ID_PREVIEW_PREVPAGE
Definition: wordpad.h:49

Referenced by WndProc().

◆ preview_isactive()

BOOL preview_isactive ( void  )

Definition at line 779 of file print.c.

780{
781 return preview.page != 0;
782}

Referenced by OnSize(), and WndProc().

◆ print_quick()

void print_quick ( HWND  hMainWnd,
LPWSTR  wszFileName 
)

Definition at line 537 of file print.c.

538{
539 PRINTDLGW pd;
540
541 ZeroMemory(&pd, sizeof(pd));
542 pd.hwndOwner = hMainWnd;
543 pd.hDC = make_dc();
544
545 print(&pd, wszFileName);
546 DeleteDC(pd.hDC);
547}
static HDC make_dc(void)
Definition: print.c:145
HDC hDC
Definition: commdlg.h:490

Referenced by OnCommand().

◆ redraw_ruler()

void redraw_ruler ( HWND  hRulerWnd)

Definition at line 288 of file print.c.

289{
290 RECT rc;
291
292 GetClientRect(hRulerWnd, &rc);
293 InvalidateRect(hRulerWnd, &rc, TRUE);
294}
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by OnSize(), and update_ruler().

◆ reg_formatindex()

int reg_formatindex ( WPARAM  format)

Definition at line 330 of file registry.c.

331{
332 return (format & SF_TEXT) ? 1 : 0;
333}
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define SF_TEXT
Definition: richedit.h:720

Referenced by dialog_viewproperties(), is_bar_visible(), OnCommand(), registry_read_formatopts(), registry_read_formatopts_all(), registry_set_formatopts_all(), set_fileformat(), store_bar_state(), and WinMain().

◆ registry_read_filelist()

void registry_read_filelist ( HWND  hMainWnd)

Definition at line 217 of file registry.c.

218{
219 HKEY hFileKey;
220
222 {
223 WCHAR itemText[MAX_PATH+3], buffer[MAX_PATH];
224 /* The menu item name is not the same as the file name, so we need to store
225 the file name here */
226 static WCHAR file1[MAX_PATH], file2[MAX_PATH], file3[MAX_PATH], file4[MAX_PATH];
227 WCHAR numFormat[] = {'&','%','d',' ',0};
228 LPWSTR pFile[] = {file1, file2, file3, file4};
229 DWORD pathSize = MAX_PATH*sizeof(WCHAR);
230 int i;
231 WCHAR key[6];
233 HMENU hMenu = GetMenu(hMainWnd);
234
235 mi.cbSize = sizeof(MENUITEMINFOW);
237 mi.fType = MFT_STRING;
238 mi.dwTypeData = itemText;
239 mi.wID = ID_FILE_RECENT1;
240
242 for(i = 0; i < FILELIST_ENTRIES; i++)
243 {
244 wsprintfW(key, var_file, i+1);
246 if(RegQueryValueExW(hFileKey, (LPWSTR)key, 0, NULL, (LPBYTE)pFile[i], &pathSize)
247 != ERROR_SUCCESS)
248 break;
249
250 mi.dwItemData = (ULONG_PTR)pFile[i];
251 wsprintfW(itemText, numFormat, i+1);
252
254
256
258 mi.wID++;
259 pathSize = MAX_PATH*sizeof(WCHAR);
260 }
261 mi.fType = MFT_SEPARATOR;
262 mi.fMask = MIIM_FTYPE | MIIM_ID;
264
265 RegCloseKey(hFileKey);
266 }
267}
static const WCHAR var_file[]
Definition: registry.c:36
static const WCHAR key_recentfiles[]
Definition: registry.c:29
static void format_filelist_filename(LPWSTR file, LPWSTR out)
Definition: registry.c:150
static LRESULT registry_get_handle(HKEY *hKey, LPDWORD action, LPCWSTR subKey)
Definition: registry.c:42
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define ULONG_PTR
Definition: config.h:101
unsigned long DWORD
Definition: ntddk_ex.h:95
MdFileObject pFile
GLuint buffer
Definition: glext.h:5915
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: copy.c:22
DWORD cbSize
Definition: winuser.h:3784
unsigned char * LPBYTE
Definition: typedefs.h:53
static MONITORINFO mi
Definition: win.c:7338
#define MF_BYCOMMAND
Definition: winuser.h:202
#define MIIM_STRING
Definition: winuser.h:727
#define MIIM_ID
Definition: winuser.h:722
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define MIIM_FTYPE
Definition: winuser.h:729
#define MFT_SEPARATOR
Definition: winuser.h:744
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MFT_STRING
Definition: winuser.h:746
#define MIIM_DATA
Definition: winuser.h:726
HMENU WINAPI GetMenu(_In_ HWND)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
struct tagMENUITEMINFOW MENUITEMINFOW
#define FILELIST_ENTRIES
Definition: wordpad.h:91
#define ID_FILE_RECENT1
Definition: wordpad.h:33
#define ID_FILE_RECENT_SEPARATOR
Definition: wordpad.h:37
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by OnCreate(), preview_exit(), and registry_set_filelist().

◆ registry_read_formatopts_all()

void registry_read_formatopts_all ( DWORD  barState[],
DWORD  wordWrap[] 
)

Definition at line 398 of file registry.c.

399{
402}
int reg_formatindex(WPARAM format)
Definition: registry.c:330
static const WCHAR key_text[]
Definition: registry.c:34
static void registry_read_formatopts(int index, LPCWSTR key, DWORD barState[], DWORD wordWrap[])
Definition: registry.c:355
static const WCHAR key_rtf[]
Definition: registry.c:33
static DWORD wordWrap[2]
Definition: wordpad.c:67
static DWORD barState[2]
Definition: wordpad.c:68
#define SF_RTF
Definition: richedit.h:721

Referenced by OnCreate().

◆ registry_read_maximized()

void registry_read_maximized ( DWORD bMaximized)

Definition at line 124 of file registry.c.

125{
126 HKEY hKey = 0;
127 DWORD size = sizeof(DWORD);
128
130 RegQueryValueExW(hKey, var_maximized, 0, NULL, (LPBYTE)bMaximized, &size) !=
131 ERROR_SUCCESS || size != sizeof(DWORD))
132 {
133 *bMaximized = FALSE;
134 }
135
137}
static const WCHAR var_maximized[]
Definition: registry.c:40
static const WCHAR key_options[]
Definition: registry.c:31
FxAutoRegKey hKey
GLsizeiptr size
Definition: glext.h:5919
#define DWORD
Definition: nt_native.h:44

Referenced by WinMain().

◆ registry_read_options()

void registry_read_options ( void  )

Definition at line 335 of file registry.c.

336{
337 HKEY hKey;
338
341 else
342 {
345 }
346
349 } else {
352 }
353}
void registry_read_previewpages(HKEY hKey)
Definition: print.c:105
void registry_read_pagemargins(HKEY hKey)
Definition: print.c:90
static const WCHAR key_settings[]
Definition: registry.c:32

Referenced by OnCreate().

◆ registry_read_pagemargins()

void registry_read_pagemargins ( HKEY  hKey)

Definition at line 90 of file print.c.

91{
92 DWORD size = sizeof(RECT);
93
95 &size) != ERROR_SUCCESS || size != sizeof(RECT))
96 SetRect(&margins, 1757, 1417, 1757, 1417);
97}
static const WCHAR var_pagemargin[]
Definition: print.c:60
#define RECT
Definition: precomp.h:26

Referenced by registry_read_options().

◆ registry_read_previewpages()

void registry_read_previewpages ( HKEY  hKey)

Definition at line 105 of file print.c.

106{
107 DWORD size = sizeof(DWORD);
108 if(!hKey ||
111 size != sizeof(DWORD))
112 {
114 } else {
116 else if (preview.pages_shown > 2) preview.pages_shown = 2;
117 }
118}
static const WCHAR var_previewpages[]
Definition: print.c:61

Referenced by registry_read_options().

◆ registry_read_winrect()

void registry_read_winrect ( RECT rc)

Definition at line 111 of file registry.c.

112{
113 HKEY hKey = 0;
114 DWORD size = sizeof(RECT);
115
118 ERROR_SUCCESS || size != sizeof(RECT))
119 SetRect(rc, 0, 0, 600, 300);
120
122}
static const WCHAR var_framerect[]
Definition: registry.c:37

Referenced by WinMain().

◆ registry_set_filelist()

void registry_set_filelist ( LPCWSTR  newFile,
HWND  hMainWnd 
)

Definition at line 269 of file registry.c.

270{
271 HKEY hKey;
273
275 {
277 int i;
278 HMENU hMenu = GetMenu(hMainWnd);
280 WCHAR buffer[6];
281
282 mi.cbSize = sizeof(MENUITEMINFOW);
283 mi.fMask = MIIM_DATA;
284
285 for(i = 0; i < FILELIST_ENTRIES; i++)
286 pFiles[i] = NULL;
287
288 for(i = 0; GetMenuItemInfoW(hMenu, ID_FILE_RECENT1+i, FALSE, &mi); i++)
289 pFiles[i] = (LPWSTR)mi.dwItemData;
290
291 if(lstrcmpiW(newFile, pFiles[0]))
292 {
293 for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
294 {
295 if(!lstrcmpiW(pFiles[i], newFile))
296 {
297 int j;
298 for(j = 0; j < i; j++)
299 {
300 pFiles[i-j] = pFiles[i-j-1];
301 }
302 pFiles[0] = NULL;
303 break;
304 }
305 }
306
307 if(!pFiles[0])
308 {
309 pFiles[0] = newFile;
310 } else
311 {
312 for(i = 0; i < FILELIST_ENTRIES-1; i++)
313 pFiles[FILELIST_ENTRIES-1-i] = pFiles[FILELIST_ENTRIES-2-i];
314
315 pFiles[0] = newFile;
316 }
317
318 for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
319 {
321 RegSetValueExW(hKey, (LPWSTR)&buffer, 0, REG_SZ, (const BYTE*)pFiles[i],
322 (lstrlenW(pFiles[i])+1)*sizeof(WCHAR));
323 }
324 }
326 }
328}
void registry_read_filelist(HWND hMainWnd)
Definition: registry.c:217
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
const WCHAR * action
Definition: action.c:7479
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define REG_SZ
Definition: layer.c:22
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193

Referenced by DoOpenFile().

◆ registry_set_formatopts_all()

void registry_set_formatopts_all ( DWORD  barState[],
DWORD  wordWrap[] 
)

Definition at line 419 of file registry.c.

420{
423}
static void registry_set_formatopts(int index, LPCWSTR key, DWORD barState[], DWORD wordWrap[])
Definition: registry.c:404

Referenced by WndProc().

◆ registry_set_options()

void registry_set_options ( HWND  hMainWnd)

Definition at line 83 of file registry.c.

84{
85 HKEY hKey = 0;
87
89 {
91 DWORD isMaximized;
92
93 wp.length = sizeof(WINDOWPLACEMENT);
95 isMaximized = (wp.showCmd == SW_SHOWMAXIMIZED);
96
98 RegSetValueExW(hKey, var_maximized, 0, REG_DWORD, (LPBYTE)&isMaximized, sizeof(DWORD));
99
102 }
103
105 {
108 }
109}
void registry_set_previewpages(HKEY hKey)
Definition: print.c:99
void registry_set_pagemargins(HKEY hKey)
Definition: print.c:85
#define REG_BINARY
Definition: nt_native.h:1496
#define REG_DWORD
Definition: sdbapi.c:596
RECT rcNormalPosition
Definition: winuser.h:3295
#define SW_SHOWMAXIMIZED
Definition: winuser.h:773
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
struct _WINDOWPLACEMENT WINDOWPLACEMENT

Referenced by WndProc().

◆ registry_set_pagemargins()

void registry_set_pagemargins ( HKEY  hKey)

Definition at line 85 of file print.c.

Referenced by registry_set_options().

◆ registry_set_previewpages()

void registry_set_previewpages ( HKEY  hKey)

Definition at line 99 of file print.c.

Referenced by registry_set_options().

◆ ruler_proc()

LRESULT CALLBACK ruler_proc ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 410 of file print.c.

411{
412 static WNDPROC pPrevRulerProc;
413 static LONG EditLeftmost;
414 static BOOL NewMetrics;
415
416 switch(msg)
417 {
418 case WM_USER:
419 if(wParam)
420 {
421 EditLeftmost = ((POINTL*)wParam)->x;
422 pPrevRulerProc = (WNDPROC)lParam;
423 }
424 NewMetrics = TRUE;
425 break;
426
427 case WM_PAINT:
428 paint_ruler(hWnd, EditLeftmost, NewMetrics);
429 break;
430
431 default:
432 return CallWindowProcW(pPrevRulerProc, hWnd, msg, wParam, lParam);
433 }
434
435 return 0;
436}
#define msg(x)
Definition: auth_time.c:54
static void paint_ruler(HWND hWnd, LONG EditLeftmost, BOOL NewMetrics)
Definition: print.c:377
LPARAM lParam
Definition: combotst.c:139
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define WM_PAINT
Definition: winuser.h:1620
#define WM_USER
Definition: winuser.h:1895
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2906
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by WinMain().

◆ setup_richedit_olecallback()

HRESULT setup_richedit_olecallback ( HWND  hEditorWnd)

Definition at line 203 of file olecallback.c.

204{
207 0, &olecallback.stg);
208
210 return hr;
211}
HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName, DWORD grfMode, DWORD reserved, IStorage **ppstgOpen)
Definition: storage32.c:8636
#define STGM_READWRITE
Definition: objbase.h:919
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:923
#define STGM_DELETEONRELEASE
Definition: objbase.h:925
struct IRichEditOleCallbackImpl olecallback
Definition: olecallback.c:40
#define EM_SETOLECALLBACK
Definition: richedit.h:103
HRESULT hr
Definition: shlfolder.c:183

Referenced by OnCreate().

◆ target_device()

void target_device ( HWND  hMainWnd,
DWORD  wordWrap 
)

Definition at line 209 of file print.c.

210{
212
214 {
215 int width = 0;
217 HDC hdc = make_dc();
218 RECT rc = get_print_rect(hdc);
219
220 width = rc.right - rc.left;
221 if(!hdc)
222 {
223 HDC hMaindc = GetDC(hMainWnd);
224 hdc = CreateCompatibleDC(hMaindc);
225 ReleaseDC(hMainWnd, hMaindc);
226 }
228 DeleteDC(hdc);
229 if (result)
230 return;
231 /* otherwise EM_SETTARGETDEVICE failed, so fall back on wrapping
232 * to window using the NULL DC. */
233 }
234
235 if (wordWrap != ID_WORDWRAP_NONE) {
237 } else {
239 }
240
241}
static RECT get_print_rect(HDC hdc)
Definition: print.c:187
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint64EXT * result
Definition: glext.h:11304
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
#define EM_SETTARGETDEVICE
Definition: richedit.h:105
LONG_PTR LRESULT
Definition: windef.h:209
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
#define ID_WORDWRAP_NONE
Definition: wordpad.h:110
#define ID_WORDWRAP_MARGIN
Definition: wordpad.h:112

Referenced by dialog_viewproperties(), OnCommand(), set_fileformat(), and WinMain().