25#define SBPART_CURPOS 0
27#define SBPART_ENCODING 2
52 TCHAR szFallback[42], *pszMessage = szFallback;
65 pszMessage = lpMsgBuf;
97 if (isModified ==
Globals.bWasModified)
102 Globals.bWasModified = isModified;
108 if (
Globals.szFileTitle[0] != 0)
115 (isModified ?
_T(
"*") :
_T(
"")), szFilename, szNotepad);
124 static INT s_nLock = 0;
130 if (s_hWaitCursor ==
NULL)
149 static const int defaultWidths[] = {120, 120, 120};
155 parts[0] = rcStatusBar.
right - (defaultWidths[1] + defaultWidths[2]);
156 parts[1] = rcStatusBar.
right - defaultWidths[2];
160 parts[1] =
max(
parts[1], defaultWidths[0] + defaultWidths[1]);
226 szFileName[0] ? szFileName : szUntitled,
379 static const TCHAR lf[] =
_T(
"\r\n");
433 ZeroMemory(&openfilename,
sizeof(openfilename));
435 if (
Globals.szFileName[0] == 0)
459 if (
Globals.szFileName[0] == 0)
539 if (
Globals.szFileName[0] == 0)
772 cf.lStructSize =
sizeof(
cf);
784 if (currfont !=
NULL)
799 if (!
Globals.find.lpstrFindWhat)
828 Globals.find.Flags &= ~FR_DOWN;
865 if (iLine <= 0 || s_pGotoData->cLines <
iLine)
894 DWORD dwStart = 0, dwEnd = 0;
915 if (GotoData.
iLine <= 0)
942 col = ((ich < 0) ? 0 : (dwStart - ich));
std::map< E_STRING, PART_TEST > parts
static VOID SetFileName(PCONSOLE_CHILDFRM_WND Info, PWSTR pFileName)
BOOL DIALOG_FileSaveAs(VOID)
VOID DoShowHideStatusBar(VOID)
VOID DIALOG_StatusBarAlignParts(VOID)
static BOOL DoSaveFile(VOID)
VOID DIALOG_Replace(VOID)
VOID DIALOG_HelpContents(VOID)
VOID DIALOG_StatusBarUpdateCaretPos(VOID)
VOID DIALOG_EditSelectAll(VOID)
VOID DIALOG_FileNew(VOID)
static VOID DIALOG_StatusBarUpdateEncoding(VOID)
static INT_PTR CALLBACK DIALOG_GoTo_DialogProc(HWND hwndDialog, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL HasFileExtension(LPCTSTR szFilename)
static VOID DIALOG_SearchDialog(FINDPROC pfnProc)
VOID WaitCursor(BOOL bBegin)
VOID DIALOG_FileExit(VOID)
VOID DIALOG_FileNewWindow(VOID)
VOID DIALOG_EditUndo(VOID)
static const TCHAR helpfile[]
static VOID DIALOG_StatusBarUpdateLineEndings(VOID)
VOID DIALOG_ViewStatusBar(VOID)
static const TCHAR empty_str[]
VOID DIALOG_EditTimeDate(VOID)
static void AlertFileNotFound(LPCTSTR szFileName)
static VOID DIALOG_StatusBarUpdateAll(VOID)
VOID DIALOG_FileOpen(VOID)
LRESULT CALLBACK EDIT_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
VOID DoCreateEditWindow(VOID)
static const TCHAR txt_files[]
static int AlertFileNotSaved(LPCTSTR szFileName)
VOID DIALOG_SelectFont(VOID)
BOOL DIALOG_FileSave(VOID)
struct tagGOTO_DATA * PGOTO_DATA
HWND(WINAPI * FINDPROC)(LPFINDREPLACE lpfr)
VOID DIALOG_HelpAboutNotepad(VOID)
VOID DIALOG_EditCut(VOID)
static UINT EolnToStrId[]
VOID DIALOG_EditWrap(VOID)
VOID DIALOG_SearchNext(BOOL bDown)
BOOL FileExists(LPCTSTR szFilename)
VOID DIALOG_EditPaste(VOID)
static UINT_PTR CALLBACK DIALOG_FileSaveAs_Hook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
struct tagGOTO_DATA GOTO_DATA
static const TCHAR szDefaultExt[]
VOID DIALOG_EditCopy(VOID)
int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCTSTR szString, DWORD dwFlags)
VOID DoOpenFile(LPCTSTR szFileName)
void UpdateWindowCaption(BOOL clearModifyAlert)
VOID DIALOG_EditDelete(VOID)
VOID NOTEPAD_EnableSearchMenu()
BOOL NOTEPAD_FindNext(FINDREPLACE *pFindReplace, BOOL bReplace, BOOL bShowAlert)
CLIPBOARD_GLOBALS Globals
#define OFN_OVERWRITEPROMPT
#define CF_INITTOLOGFONTSTRUCT
#define OFN_FILEMUSTEXIST
#define OFN_ENABLETEMPLATE
#define OFN_PATHMUSTEXIST
OPENFILENAMEA OPENFILENAME
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI SetEndOfFile(HANDLE hFile)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
LPVOID NTAPI LocalLock(HLOCAL hMem)
BOOL NTAPI LocalUnlock(HLOCAL hMem)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
TCHAR szTitle[MAX_LOADSTRING]
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static DWORD DWORD void LPSTR DWORD cch
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned __int3264 UINT_PTR
BOOL ReadText(HANDLE hFile, HLOCAL *phLocal, ENCODING *pencFile, EOLN *piEoln)
BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, ENCODING encFile, EOLN iEoln)
#define CMD_STATUSBAR_WND_ID
#define STRING_NOTEPAD_AUTHORS
#define STRING_LINE_NUMBER_OUT_OF_RANGE
#define STRING_LINE_COLUMN
#define STRING_UNICODE_BE
#define LOCALE_USER_DEFAULT
#define UNREFERENCED_PARAMETER(P)
#define CreateStatusWindow
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define GetFileAttributes
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define GetModuleFileName
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define CreateFontIndirect
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GetWindowTextLength
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define EM_EMPTYUNDOBUFFER
#define SW_SHOWNOACTIVATE
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
HWND WINAPI SetFocus(_In_opt_ HWND)
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define MB_ICONEXCLAMATION
UINT WINAPI GetDlgItemInt(_In_ HWND, _In_ int, _Out_opt_ PBOOL, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)