Skip to content
Browse files

Initial commit - Notepad2 4.1.24

  • Loading branch information...
0 parents commit eba35801a27a5f40ac463fe9e81e8d7fa6bb6431 @djs committed May 15, 2010
29 License.txt
@@ -0,0 +1,29 @@
+Notepad2 Copyright � 2004-2010 Florian Balmer
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Neither the name of Florian Balmer nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BIN Notepad2.ini
Binary file not shown.
21 Notepad2.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Notepad2", "Notepad2.vcproj", "{B69A8C7E-A22D-45DA-9997-2D1403C7AEE8}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {B69A8C7E-A22D-45DA-9997-2D1403C7AEE8}.Debug.ActiveCfg = Debug|Win32
+ {B69A8C7E-A22D-45DA-9997-2D1403C7AEE8}.Debug.Build.0 = Debug|Win32
+ {B69A8C7E-A22D-45DA-9997-2D1403C7AEE8}.Release.ActiveCfg = Release|Win32
+ {B69A8C7E-A22D-45DA-9997-2D1403C7AEE8}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
835 Notepad2.txt
@@ -0,0 +1,835 @@
+
+=======================================================================
+= =
+= =
+= Notepad2 - light-weight Scintilla-based text editor for Windows =
+= =
+= =
+= Notepad2 4.1.24 =
+= (c) Florian Balmer 2004-2010 =
+= http://www.flos-freeware.ch =
+= =
+= =
+=======================================================================
+
+
+Description
+
+ Notepad2 is a light-weight, free and open source Notepad-like text
+ editor with syntax highlighting for a few commonly used languages.
+ It's based on the Scintilla source code editing component and works
+ on NT-based versions of Windows.
+
+
+Features
+
+ - Syntax highlighting: HTML, XML, PHP, ASP (JS, VBS), CSS,
+ JavaScript, VBScript, C/C++, C#, Resource Script, Makefiles, Java,
+ Visual Basic, Pascal, Assembly, SQL, Perl, Python, Configuration
+ Files, Apache Config Files, PowerShell, Batch Files, Diff Files
+ - Drag & drop text editing inside and outside Notepad2
+ - Basic regular expression search and replace
+ - Useful word, line and block editing shortcuts
+ - Rectangular selection (Alt+Mouse)
+ - Brace matching, auto indent, long line marker, zoom functions
+ - Support for Unicode, UTF-8, Unix and Mac text files
+ - Open shell links
+ - Mostly adjustable
+
+
+New in Version 4.1.24 (released March 02, 2010)
+
+ - /z command line switch (support registry-based Notepad replacement)
+ - /u command line switch (launch Notepad2 with elevated privileges)
+ - Fixed some /p command line switch options not working properly
+ - Display more informative error messages for file operation failures
+ - Hotkey to copy pathname of current file to clipboard (Shift+F9)
+ - Window title indicator when running with elevated privileges
+ - Ini-options to control system MRU, taskbar and jump list behaviour
+ - Enhanced portability for directory settings inside My Documents
+ - Configure whether tab key should reformat indenting whitespace
+ - Revised word wrap settings dialog and added more detailed options
+ - New style setting to control font smoothing (see FAQ on my website)
+ - New style setting to control size of visible white space dots
+ - Improved cursor visibility on any background color
+ - Added new "HTML Element Text" and "XML Element Text" styles
+ - Improved default style utilization for HTML-embedded schemes
+ - Updated PowerShell keywords to version 2.0
+ - Added missing keywords to VBScript scheme
+ - Fixed deleted files reappearing in MRU lists
+ - Updated Scintilla library to 2.03
+
+
+New in Version 4.0.23 (released October 06, 2009)
+
+ - Added PowerShell Script syntax highlighting
+ - Added missing keywords to JavaScript schemes
+ - Further simplified syntax schemes by consolidating certain styles
+ - More accurate "mode" file variable matching with tightened rules
+ - Avoid repetitive zone checks when running Notepad2.exe internally
+ - Fixed choice of encoding conversion prompt being ignored
+ - Fixed recent file dialog hang with inaccessible UNC paths
+ - Internal changes to allow complete internationalization (future)
+
+
+New in Version 4.0.22 (released July 28, 2009)
+
+ - Support for numerous Windows, DOS, ISO, Mac and EBCDIC encodings
+ - Enhanced encoding selection dialog (F9)
+ - "Recode" (F8) to reload file with different source encoding
+ - "Recode file as system default ANSI" (Ctrl+Shift+A)
+ - "Recode file as system default OEM" (Ctrl+Shift+O)
+ - "Recode 7-bit ASCII file as UTF-8" (Shift+F8)
+ - Option to load 7-bit ASCII files as UTF-8 (File, Encoding, Default)
+ - Option to disable encoding tag parsing (File, Encoding, Default)
+ - Issue warning if data can't be converted to selected file encoding
+ - Fix loading of (invalid) Unicode files with embedded null bytes
+ - /e command line switch to specify file source encoding
+ - "Insert Encoding Identifier" (Ctrl+F8)
+ - "Tabify Indent" (Ctrl+Alt+T) and "Untabify Indent" (Ctrl+Alt+S)
+ - "Increase Number" (Ctrl+Alt++) and "Decrease Number" (Ctrl+Alt+-)
+ - Option to auto-reload unmodified files changed by external programs
+ - Hotkey (Alt+F5) and auto-reset option for file change notification
+ - Manual and automatic reloading of files keeps current encoding
+ - Scroll find matches and jump positions away from bottom border
+ - Enabled new Scintilla indent modes for wrapped lines
+ - Option to set any characters as boundaries for word wrap
+ - Allow bigger tab-/indent-widths (256) and long line limit (4096)
+ - Allow setting extra line spacing (through "Default Text" scheme)
+ - Dropping directories displays file open dialog
+ - Consolidated styles to simplify configuration (patch by Kai Liu)
+ - Ensure cursor visibility on any background color (patch by Kai Liu)
+ - Enabled improved Scintilla Pascal lexing module (patch by Kai Liu)
+ - Updated HTML keywords to version 5.0
+ - Remapped "Manage Favorites" hotkey to Alt+F9
+ - Remapped "Invert Case" hotkey to Ctrl+Alt+U
+ - Remapped "Title Case" hotkey to Ctrl+Alt+I
+ - Remapped "Sentence Case" hotkey to Ctrl+Alt+O
+ - Fixed various minor bugs
+ - Notepad2.exe program file no longer compressed with UPX
+ - Updated Scintilla library to 1.79
+
+
+New in Version 3.1.21 (released June 21, 2009)
+
+ - No ini-file is created by default (save settings with F7, once)
+ - "Move Up" and "Move Down" keep selection and work with blocks
+ - Set cursor to start (Ctrl+,) or end of text selection (Ctrl+.)
+ - "URL Encode" (Ctrl+Shift+E) and "URL Decode" (Ctrl+Shift+R)
+ - "Escape" (Ctrl+Alt+E) and "Unescape C Special Chars" (Ctrl+Alt+U)
+ - "Sort Lines" with several options (Alt+O)
+ - "Pad With Spaces" block command (Alt+B)
+ - "Replace Next" assigned to hotkey (F4)
+ - Auto strip trailing blanks option (File, Line Endings, Default)
+ - Remapped "Transparent Mode" hotkey to Ctrl+0
+ - Simple XML detection for files without extensions
+ - Simple language detection for cgi and fcgi files
+ - Reload file without file variable parsing (Alt+F8)
+ - Enabled better styling of C/C++ preprocessor elements
+ - Recent files and search strings merged with existing items on save
+ - Paste board mode ignores immediately repeated copy actions
+ - Command line switch + to accept multiple files (quoted spaces)
+ - Command line switch - to accept single file argument (no quotes)
+ - Option to set default command line mode (single or multiple files)
+ - Command line switches to set file encoding and line ending mode
+ - More /p command line switches (see "Command Line Switches" below)
+ - /r command line switch to reuse existing window
+ - /ns and /rs command line switches to enable single file instance
+ - Renamed /t command line switch to /d (select default text scheme)
+ - /t command line switch to set window title
+ - Set window title to excerpt of current text selection (Ctrl+9)
+ - Save relative pathnames for recent files (ini-option to disable)
+ - Save relative directories for "Open with..." and "Favorites"
+ - "Open with..." no longer sends short pathnames to external programs
+ - External commands use current file directory as working directory
+ - Remember "Save Copy" location until exit
+ - Require only single click to restore window from tray icon
+ - "Reuse Window" option timeout improves opening multiple files
+ - Replaced "Find Up" option with "Find Previous" button in dialogs
+ - "Find Wrap" notification dialogs provide "Cancel" button
+ - Option to suppress replace count notifications
+ - Find and replace dialogs provide new system menu commands
+ - Dialog boxes use correct theme fonts on Vista
+ - Patches to default styles, file types and auto-detection by Kai Liu
+ - Incorporated base x64 source code compatibility patch
+ - Fixed some problems with relative ini-file locations
+ - Fixed some minor file variable problems
+ - Fixed some encoding detection issues
+ - Fixed some find and replace problems
+ - Fixed several memory leaks when saving files
+ - Fixed several memory leaks for editing operations
+ - Reduced size of Notepad2.exe program file
+
+
+New in Version 3.0.20 (released October 31, 2008)
+
+ - Notepad2 converted to a native Win32 Unicode application
+ - "Copy Add" (Ctrl+E) to append selected text to clipboard
+ - "Unwrap Paragraphs" (Ctrl+Shift+J)
+ - "Strip Last Character" (Alt+U)
+ - "Select Line", can be used repeatedly (Ctrl+Shift+Space)
+ - Remapped "Delete Line" hotkey to Ctrl+Shift+D
+ - Remapped "Transparent Mode" hotkey to Alt+O
+ - Allow easy toggling of find and replace dialogs (Ctrl+F, Ctrl+H)
+ - Save and restore find and replace dialog positions (Ctrl+O, Ctrl+P)
+ - Files with UTF-8 Signature always loaded in UTF-8 mode
+ - Simple HTML detection for files without extensions
+ - Support basic Emacs file variables (see FAQ on my website)
+ - Update timestamps (Shift+F5) (see FAQ on my website)
+ - %APPDATA% searched for existing ini-file
+ - Modest enhancements to scheme customization dialog
+ - Improved performance for saving settings to ini-file
+ - Less restrictive handling of quoted filenames on command line
+ - Keep scrolling positions when reloading changed files
+ - Modified /s command line switch to work with extensions, not ids
+ - /m command line switch to match specified text
+ - /q command line switch to force creation of new files
+ - Pass command line switches to existing windows: /s /t /h /x /g /q
+ - Proceed to next match after choosing "replace" in replace dialog
+ - Fixed some more find and replace problems
+ - Improved visual appearance on Windows Vista
+ - Updated Scintilla library to 1.77
+
+
+New in Version 2.1.19 (released April 10, 2008)
+
+ - "Line Comment" (Ctrl+Q) and "Stream Comment" (Ctrl+Shift+Q)
+ - "Title Case" (Ctrl+Alt+T) and "Sentence Case" (Ctrl+Alt+S)
+ - "Compress Whitespace" (Alt+P) command reduces spaces and tabs
+ - Original Notepad .LOG feature
+ - /f command line switch to set ini-file (/f0 to omit ini-file)
+ - /p command line switch trumps sticky window position
+ - /p0 uses system default settings for new window position
+ - Move new off-screen windows prior to resizing
+ - Option to skip Unicode text detection (File, Encoding, Default)
+ - Reload file with different default encoding (Ctrl+F8, Shift+F8)
+ - Unsaved documents with just whitespace considered empty
+ - Improved handling of relative path names
+ - File dialog filters can be specified in the Notepad2 ini-file
+ - Type of indent guides can be specified in the Notepad2 ini-file
+ - Track width of displayed text to adjust horizontal scroll range
+ - Selected find results are better scrolled into view
+ - Restore scrolling positions on revert
+ - Ctrl+Back and Ctrl+Del stop at newlines, as usual on Windows
+ - Ctrl+Space doesn't select initial line indentation whitespace
+ - Ctrl+Tab hotkey modified to always insert a tabulator
+ - Increase (Alt++) and decrease (Alt+-) long lines limit
+ - Display long lines limit in statusbar if visual marker enabled
+ - Import and export settings from customization dialog (Alt+I, Alt+X)
+ - Added "Regular Expression" style to JavaScript and Java schemes
+ - Updated filename extension lists with more default types
+ - Updated Python keywords to version 3.0
+ - Simplified SQL keywords (merged from MySQL and SQLite)
+ - Improved compatibility with Windows Vista
+ - Improved visual appearance of toolbar button images
+ - Print margins can be set to "0"
+ - Fixed several bugs with regular expression find and replace
+ - Fixed bug with hanging of recent files dialog
+ - Fixed bug with charset not being saved properly
+ - Fixed bug with display of text selection at the beginning of lines
+ - Fixed bug with cursor movement at start and end of wrapped lines
+ - Updated Scintilla library to 1.76
+
+
+New in Version 2.0.18 (released July 26, 2007)
+
+ - "Select To" command in find dialog allows expanding the selection
+ - "Select To Next" (F2) and "Select To Previous" (Shift+F2)
+ - "Save Find Text" (Alt+F3) for later use with F2, F3, etc.
+ - "Swap" (Ctrl+K) to exchange selected text with clipboard contents
+ - Notepad2.exe program file is compressed with UPX by default
+
+
+New in Version 2.0.17 (released July 24, 2007)
+
+ - Option to allow only one Notepad2 window for each file
+ - Option to display filename in window title in various forms
+ - Hotkey Shift+Esc to save file and exit Notepad2
+ - Indent size can be specified separately from tab width
+ - Indent guides are highlighted along with matching braces
+ - Caret can be displayed as a block (specify "block" for caret width)
+ - Find and replace dialogs can be toggled from the toolbar
+ - Tray icon is restored when Explorer is restarted
+ - Fixed bug with brace matching
+ - Fixed bug with replacement of ^c cutting the last character
+ - Fixed bug with regular expression search causing infinite loop
+ - Updated Scintilla library to 1.74
+
+
+New in Version 2.0.16 (released May 14, 2007)
+
+ - The msvcr70.dll runtime library is no longer required
+ - "Enclose Selection" helper tool (Alt+Q)
+ - Single line files are opened with default line ending mode
+ - Remapped hotkey Ctrl+Shift+Z from "Undo" to "Redo"
+ - Remapped hotkey Ctrl+Shift+Y from "Redo" to "Undo"
+ - Fixed bug: problem with MRU lists causing random crashes
+ - Fixed bug: moving lines up/down not working properly
+ - Fixed bug: window settings overwritten on new screen resolution
+
+
+New in Version 2.0.15 (released April 07, 2007)
+
+ - BSD License for Notepad2 and source code (see License.txt)
+ - "Insert HTML/XML Tag" helper tool (Alt+X)
+ - Regex support for \d, \D, \s, \S, \w, \W, \xHH
+ - Text selection can have "eolfilled" style (on by default)
+ - Caret blink rate is set to system default on startup
+ - Support for opening makefiles without filename extension
+ - Dropped Windows 9x support
+ - Requires msvcr70.dll runtime library
+ - Updated Scintilla library to 1.73
+
+
+New in Version 2.0.14 (not released to the public)
+
+ - Find and replace dialogs: Don't wrap around on find option
+ - Use the clipboard contents as the replacement text (enter ^c)
+ - Date and time formats can be changed using template strings
+ - "FileCheckInterval" ini-setting (see FAQ on my website)
+
+
+New in Version 2.0.13 (not released to the public)
+
+ - Settings are stored in ini-file
+ - File change notification (optional)
+ - Find and replace dialogs are now modeless
+ - Multiline find and replace through transform backslashes function
+ - Find next / previous word / selected text (Ctrl+F3, Ctrl+Shift+F3)
+ - Find and replace dialogs: exclusive options deactivate each other
+ - Find wrap notification message can be deactivated
+ - Preview function in scheme customization dialog
+ - Quickly change the default font (F2)
+ - Script information is saved along with font settings
+ - Selection and current line background support transparency
+ - Open ASCII files as UTF-8 if the default setting is UTF-8
+ - Open empty files with default encoding and line ending settings
+ - Don't prompt to save modified empty untitled documents
+ - Line endings are always converted to current setting on paste
+ - Ensure consistent line endings option (File, Line Endings, Default)
+ - NTFS streams are preserved when saving files
+ - Switching encoding performs proper text conversion to new encoding
+ - Encoding conversion notification message can be deactivated
+ - Encoding selection dialog displays info about system ANSI code page
+ - Downgraded ANSI code page support to system default only
+ - Big file warning message can be deactivated
+ - "Wrap Text To Column" command (Ctrl+Shift+W)
+ - "Modify Lines" command to prefix and append text to lines (Alt+M)
+ - "Duplicate Selection" command (Alt+D)
+ - "Invert Case" command (Ctrl+Shift+E)
+ - "Clear clipboard" command (in the "Edit" menu)
+ - Force indent and unindent (Ctrl+Tab, Ctrl+Shift+Tab)
+ - Highlight current line (Ctrl+Shift+I)
+ - Additional hotkey for "New File": Ctrl+F4
+ - Mapped Ctrl+Shift+Y/Z to Ctrl+Y/Z
+ - New hotkey for "Tab Settings" (Ctrl+T)
+ - Changed hotkey for "Join Lines" (Ctrl+J)
+ - Rearranged some items in the "View" and "Settings" menus
+ - "Copy" tool button works as "Copy All" when no text selected
+ - "Clear" tool button works as "Clear All" when no text selected
+ - Ctrl+Space: select line if word is already selected
+ - <br>, <hr> and other tags are no longer closed automatically
+ - File, revert now asks if you really want to revert the file
+ - "Open with..." and "Favorites" directories can be relative
+ - Directories can be used as favorites (triggers open dialog)
+ - Filter for open and save dialogs is always set to *.*
+ - Location of metapath.exe can be specified in ini-file
+ - "DefaultDirectory" ini-setting (see FAQ on my website)
+ - "DefaultExtension" ini-setting (see FAQ on my website)
+ - Select print color mode (defaults to color on white)
+ - Don't print separator line if header or footer omitted
+ - Added proper support for multiple monitor systems
+ - Allow multiple window position settings for different screen sizes
+ - Option to use a sticky window position
+ - New command line switches to select syntax schemes: /s, /t, /h, /x
+ - Added Apache Config Files syntax highlighting
+ - Added Perl POD verbatim style
+ - Updated PHP keywords to PHP5
+ - Updated SQL keywords
+ - Updated CSS syntax highlighting to CSS2
+ - Removed NSIS syntax highlighting
+ - Removed ActionScript syntax highlighting
+ - Removed "Bookmarks" feature
+ - Removed "Delete Line Left/Right" and "Transpose Line" commands
+ - Removed code page trace message
+ - Fixed several bugs that caused Notepad2 to crash when saving files
+ - Fixed crash when printing to offline printer
+ - Fixed bug with transparency level setting
+
+
+New in Version 1.0.12 (released June 25, 2004)
+
+ - Notepad2 source code now released under the GNU GPL
+ - "Read Only" option handles file attributes
+ - Enhanced find and replace dialogs with new options
+ - Optionally auto close HTML/XML tags (Ctrl+Shift+H)
+ - Improved tabify/untabify selection functions
+ - New hotkey to select XML scheme (Shift+F11)
+
+
+New in Version 1.0.11 (released May 30, 2004)
+
+ - Simple favorites management based on file shortcuts (Alt+I)
+ - Optional toolbar buttons for favorites management
+ - Improved undo / redo handling of auto indent text
+ - Better cursor behaviour for line editing commands
+ - Clipboard text is converted according to font character set
+ - Auto-select ANSI code page option (File, Encoding, Default...)
+ - Windows system text and background colors used by default
+ - Enabled some new comment styles for C/C++ related languages
+
+
+New in Version 1.0.10 (released May 21, 2004)
+
+ - Option to select a default syntax scheme (F12)
+ - Find, replace, upper- and lowercase handle umlauts and accents
+ - Paste board feature (cmd switch /b) to collect clipboard entries
+ - Text is copied to clipboard in Unicode format (Windows NT/2k/XP)
+ - Reload current file without encoding detection (F8)
+ - Updated CSS properties to version 2.1
+ - "Reuse Window" disabled by default to allow multiple windows
+
+
+New in Version 1.0.09 (released May 13, 2004)
+
+ - Convert tabs to spaces and vice versa (Ctrl+Shift+S/T)
+ - Insert time/date (short form/long form) (Ctrl+F5, Ctrl+Shift+F5)
+ - Insert filename/path and filename (Ctrl+F9, Ctrl+Shift+F9)
+ - Added missing copy line command (Ctrl+Shift+C)
+ - Enabled script selection in font dialogs
+
+
+New in Version 1.0.08 (released May 08, 2004)
+
+ - Find and replace dialogs accept Unicode input (Windows NT/2k/XP)
+ - Warning message for large files (customizable using Notepad2.reg)
+ - Default file extension is "txt" (customizable using Notepad2.reg)
+ - New command line parameters: /c, /g, /?
+ - Fixed writing of hidden and system files (Windows XP/2k)
+ - Fixed some handling problems with relative pathnames
+ - Notepad2.txt outlines how to import and export Notepad2 settings
+
+
+New in Version 1.0.07 (released May 03, 2004)
+
+ - Select default encoding for new files
+ - Select default line endings for new files
+ - Right clicking moves cursor if no selection
+ - Zooming with Ctrl+Mousewheel recalculates line number width
+
+
+New in Version 1.0.06 (released April 30, 2004)
+
+ - Word wrap settings, show word wrap symbols (Ctrl+Shift+0)
+ - Move line up/down (Ctrl+Shift+Up/Down)
+ - Remove blank lines (Alt+R)
+ - Bookmarks for file navigation (Ctrl+F2)
+ - Minimal print header and footer customization
+ - Remapped some keyboard shortcuts (see Notepad2.txt)
+ - Added a few comments to Notepad2.txt
+
+
+New in Version 1.0.05 (released April 26, 2004)
+
+ - Support for XML, ActionScript 2.0, Python, NSIS Script
+ - Fully customizable second default style (Shift+F12)
+ - Find matching brace (Ctrl+B)
+ - Select to matching brace (Ctrl+Shift+B)
+ - Goto column (Ctrl+J)
+ - Optionally change background color of long lines
+ - Transparent mode on Windows 2k and above (Alt+U)
+ - Fixed line endings detection for Unicode files
+
+
+New in Version 1.0.04 (released April 20, 2004)
+
+ - Fixed loading of UTF-8 files with signature
+
+
+New in Version 1.0.03 (released April 19,2004)
+
+ - Toggle word wrap toolbar button
+ - New block command: strip first character (Alt+Z)
+ - Strip trailing blanks uses selection, if any
+
+
+New in Version 1.0.02 (released April 17, 2004)
+
+ - Reload current file (F5)
+ - Revised printing functionality
+ - Zooming recalculates line number width
+
+
+New in Version 1.0.01 (released April 15, 2004)
+
+ - Initial public release
+
+
+Installation and Uninstallation
+
+ Just put a copy of Notepad2.exe and Notepad2.ini to any directory on
+ your computer. To uninstall Notepad2, simply delete these two files.
+ Notepad2 does not create any registry entries on your computer.
+
+
+Keyboard Shortcuts for Notepad2
+
+ File
+
+ Ctrl+N New file.
+ Ctrl+F4 Close file, identical with Ctrl+N.
+ Ctrl+O Open file.
+ F5 Reload file.
+ F8 Recode file.
+ Ctrl+Shift+A Recode file as system default ANSI.
+ Ctrl+Shift+O Recode file as system default OEM.
+ Shift+F8 Recode 7-bit ASCII file as UTF-8.
+ Alt+F8 Reload file without file variable parsing.
+ Ctrl+S Save file.
+ F6 Save file as.
+ Ctrl+F6 Save file copy.
+ Ctrl+P Print file.
+ Alt+H Open recent file.
+
+ Tools
+
+ Alt+N Open document in new window.
+ Alt+0 Open new empty window.
+ Ctrl+M Run metapath file browser plugin.
+ Ctrl+L Launch document.
+ Alt+L Open with.
+ Ctrl+R Run command.
+
+ Favorites
+
+ Alt+I Open favorites.
+ Alt+K Add to favorites.
+ Alt+F9 Manage favorites.
+
+ Edit
+
+ Ctrl+Z Undo.
+ Ctrl+Shift+Z Redo.
+ Alt+Backspace Undo.
+ Ctrl+Y Redo.
+ Ctrl+Shift+Y Undo.
+ Ctrl+X Cut.
+ Shift+Del Cut.
+ Ctrl+C Copy.
+ Alt+C Copy all.
+ Ctrl+E Copy add.
+ Ctrl+V Paste.
+ Shift+Ins Paste.
+ Ctrl+K Swap.
+ Del Clear.
+ Ctrl+A Select all.
+ Alt+Shift+Arrows Rectangular selection.
+ Ctrl+Enter New line with toggled auto indent option.
+ Ctrl+PgUp/PgDn Goto previous/next block.
+ Ctrl+Shift+PgUp/PgDn Select to previous/next block.
+
+ Char, Word
+
+ Ctrl+Space Select word (or line).
+ Ctrl+Backspace Delete word before/left.
+ Ctrl+Del Delete word after/right.
+ Ctrl+Tab Insert tabulator.
+
+ Lines
+
+ Ctrl+Shift+Space Select line.
+ Ctrl+Shift+Up Move line (block) up.
+ Ctrl+Shift+Down Move line (block) down.
+ Ctrl+D Duplicate line.
+ Ctrl+Shift+X Cut line.
+ Ctrl+Shift+C Copy line.
+ Ctrl+Shift+D Delete line.
+ Ctrl+Shift+Backspace Delete line left.
+ Ctrl+Shift+Del Delete line right.
+ Ctrl+Shift+W Column wrap.
+ Ctrl+I Split lines.
+ Ctrl+J Join lines.
+ Ctrl+Shift+J Join paragraphs.
+
+ Block
+
+ Tab Indent selected block.
+ Shift+Tab Unindent selected block.
+ Alt+Q Enclose selection.
+ Alt+D Duplicate selection.
+ Alt+B Pad with spaces.
+ Alt+Z Strip first character.
+ Alt+U Strip last character.
+ Alt+W Strip trailing blanks.
+ Alt+P Compress whitespace.
+ Alt+R Remove blank lines.
+ Alt+M Modify lines.
+ Alt+O Sort lines.
+
+ Convert
+
+ Ctrl+Shift+U Make uppercase.
+ Ctrl+U Make lowercase.
+ Ctrl+Alt+U Invert case.
+ Ctrl+Alt+I Title case.
+ Ctrl+Alt+O Sentence case.
+ Ctrl+Shift+S Convert tabs to spaces.
+ Ctrl+Shift+T Convert spaces to tabs.
+ Ctrl+Alt+S Convert indenting tabs to spaces.
+ Ctrl+Alt+T Convert indenting spaces to tabs.
+
+ Insert
+
+ Alt+X HTML/XML tag.
+ Ctrl+F8 Encoding identifier.
+ Ctrl+F5 Time/date (short form).
+ Ctrl+Shift+F5 Time/date (long form).
+ Ctrl+F9 Filename.
+ Ctrl+Shift+F9 Path and filename.
+
+ Special
+
+ Ctrl+Q Block comment (toggle).
+ Ctrl+Shift+Q Stream comment.
+ Ctrl+Shift+E URL Encode.
+ Ctrl+Shift+R URL Decode.
+ Ctrl+Alt+E Escape C Special Chars.
+ Ctrl+Alt+U Unescape C Special Chars.
+ Ctrl+B Find matching brace.
+ Ctrl+Shift+B Select to matching brace.
+ Ctrl+1 Enclose within ''.
+ Ctrl+2 Enclose within "".
+ Ctrl+3 Enclose within ().
+ Ctrl+4 Enclose within [].
+ Ctrl+5 Enclose within {}.
+ Ctrl+6 Enclose within ``.
+ Shift+F5 Update timestamps.
+ Ctrl+Alt++ Increase number.
+ Ctrl+Alt+- Decrease number.
+ Ctrl+, Jump to selection start.
+ Ctrl+. Jump to selection end.
+
+ Find, Replace
+
+ Ctrl+F Find.
+ Alt+F3 Save find text.
+ F3 Find next.
+ Shift+F3 Find previous.
+ Ctrl+F3 Find next word or selection.
+ Ctrl+Shift+F3 Find previous word or selection.
+ F2 Expand selection to next match.
+ Shift+F2 Expand selection to previous match.
+ Ctrl+H Replace.
+ F4 Replace next.
+ Ctrl+G Jump to line.
+
+ Syntax scheme, Font
+
+ F12 Select syntax scheme.
+ Shift+F12 Select 2nd default syntax scheme.
+ Ctrl+F12 Customize syntax schemes.
+ Alt+F12 Select default font.
+ F11 Select default text syntax scheme.
+ Ctrl+F11 Select web source code syntax scheme.
+ Shift+F11 Select XML document syntax scheme.
+
+ View
+
+ Ctrl+W Toggle word wrap.
+ Ctrl+Shift+L Show long line marker.
+ Ctrl+Shift+G Show indentation guides.
+ Ctrl+Shift+N Show line numbers.
+ Ctrl+Shift+M Show selection margin.
+ Ctrl+Shift+8 Show whitespace.
+ Ctrl+Shift+9 Show line endings.
+ Ctrl+Shift+0 Show wrap symbols.
+ Ctrl+Shift+V Toggle visual brace matching.
+ Ctrl+Shift+I Highlight current line.
+
+ Zoom
+
+ Ctrl++ Zoom in.
+ Ctrl+- Zoom out.
+ Ctrl+/ Reset zoom.
+
+ Settings
+
+ Ctrl+T Tab settings.
+ Alt++ Increase limit for long lines.
+ Alt+- Decrease limit for long lines.
+ Ctrl+Shift+H Toggle auto close HTML/XML.
+ Alt+T Always on top.
+ Ctrl+0 Transparent mode.
+ Alt+F5 File change notification settings.
+ Ctrl+9 Display text excerpt in title.
+ F7 Save settings now.
+ Ctrl+F7 Jump to ini-file.
+
+ Misc.
+
+ Shift+F9 Copy pathname to clipboard.
+ Esc Optionally minimize or exit Notepad2.
+ Shift+Esc Save file and exit Notepad2.
+ F1 Display version info.
+
+
+Regular Expression Syntax
+
+ Note: the Scintilla source code editing component supports only a
+ basic subset of regular expression syntax, and searches are limited
+ to single lines.
+
+ . Matches any character
+
+ \( This marks the start of a region for tagging a match.
+
+ \) This marks the end of a tagged region.
+
+ \n Where n is 1 through 9 refers to the first through ninth
+ tagged region when replacing. For example, if the search
+ string was Fred\([1-9]\)XXX and the replace string was
+ Sam\1YYY, when applied to Fred2XXX this would generate
+ Sam2YYY.
+
+ \< This matches the start of a word.
+
+ \> This matches the end of a word.
+
+ \x This allows you to use a character x that would otherwise
+ have a special meaning. For example, \[ would be interpreted
+ as [ and not as the start of a character set.
+
+ [...] This indicates a set of characters, for example, [abc] means
+ any of the characters a, b or c. You can also use ranges, for
+ example [a-z] for any lower case character.
+
+ [^...] The complement of the characters in the set. For example,
+ [^A-Za-z] means any character except an alphabetic character.
+
+ ^ This matches the start of a line (unless used inside a set,
+ see above).
+
+ $ This matches the end of a line.
+
+ * This matches 0 or more times. For example, Sa*m matches Sm,
+ Sam, Saam, Saaam and so on.
+
+ + This matches 1 or more times. For example, Sa+m matches Sam,
+ Saam, Saaam and so on.
+
+ \d Any decimal digit.
+ \D Any character that is not a decimal digit.
+
+ \s Any whitespace character.
+ \S Any character that is not a whitespace character.
+
+ \w Any "word" character.
+ \W Any "non-word" character.
+
+ \xHH Character with hex code HH.
+
+ -----> Examples (don't use quotes)
+ - Quote lines: find "^" replace with "> "
+ - Unquote lines: find "^> " replace with ""
+ - Remove line numbers: find "^[0-9]+" replace with ""
+ - Convert tabs to double spaces: find "\t" replace with " "
+ - Remove NULL bytes: find "\x00" replace with ""
+
+
+Command Line Switches
+
+ Notepad2.exe [(encoding)] [(line ending mode)] [/e id] [/g ln[,col]]
+ [/m[-][r|b] text] [/q] [/s ext] [/d] [/h] [/x] [/c]
+ [/b] [/n|/ns] [/r|/rs]
+ [/p x,y,cx,cy[,max]|/p0|/ps|/pf,l,t,r,b,m]
+ [/t title] [/i] [/f ini|/f0] [/u] [/z ...] [/?]
+ [+|-] [file] ...
+
+ file File to open, can be a relative pathname, or a shell link.
+ Must be the last argument, no quoted spaces by default.
+ + Accept multiple file arguments (with quoted spaces).
+ - Accept single file argument (without quoted spaces).
+ ... Desired file encoding (can be one of /ansi, /unicode,
+ /unicodebe, /utf8 or /utf8sig).
+ ... Desired line ending mode (either /crlf, /lf, or /cr).
+ /e Specify file source encoding.
+ /g Jump to specified position, /g -1 means end of file.
+ /m Match specified text (/m- last, /mr regex, /mb backslash).
+ /q Force creation of new files without prompt.
+ /s Select syntax scheme associated with specified extension.
+ /d Select default text scheme.
+ /h Select Web Source Code scheme.
+ /x Select XML Document scheme.
+ /c Open a new Notepad2 window and paste the clipboard contents.
+ /b Open a new Notepad2 paste board to collect clipboard entries.
+ /n Always open a new Notepad2 window (/ns single file instance).
+ /r Reuse Notepad2 window (/rs single file instance).
+ /p Set window position to x,y with size cx,cy, optional max set
+ to nonzero to zoom; /p0 system, /ps internal defaults;
+ /p(f)ull,(l)eft,(t)op,(r)ight,(b)ottom,(m)argin.
+ /t Set window title.
+ /i Start as tray icon.
+ /f Specify ini-file; /f0 use no ini-file (don't save settings).
+ /u Launch with elevated privileges.
+ /z Skip next (usable for registry-based Notepad replacement).
+ /? Display a brief summary about command line parameters.
+
+
+Source Code
+
+ Notepad2 is based on the Scintilla source code editing component:
+ http://www.scintilla.org
+
+ The full Notepad2 source code can be found at:
+ http://www.flos-freeware.ch
+
+
+More Information and Resources
+
+ For more information on Notepad2 features, how to replace Windows
+ Notepad, and answers to the most frequently asked questions (FAQ),
+ please visit the Notepad2 website:
+ http://www.flos-freeware.ch
+
+
+Feature Requests
+
+ Thank you very much for the overwhelming feedback about Notepad2!
+ Feature requests are always welcome, but please keep in mind that
+ Notepad2 has been designed as a compact Notepad replacement.
+
+
+Credits and Special Thanks
+
+ Here I would like to say "THANK YOU" to the developers of the great
+ Scintilla source code editing component [1], which is the core of
+ Notepad2. Without Scintilla, the rich features found in Notepad2
+ wouldn't have been possible!
+
+ [1] http://www.scintilla.org
+
+ Many thanks to everybody for sending me bug reports and useful hints.
+ A special thank goes to Roland Weigelt [2] for his helpful thoughts
+ and comments about Notepad2 features and usability in early develop-
+ ment stages. I'd also like to express my thanks to Timo Kunze [3],
+ to Kai Liu [4] and to Moritz Kroll for sending detailed bug reports
+ and ready-to-use patches.
+
+ [2] http://www.roland-weigelt.de
+ [3] http://www.TimoSoft-Software.de
+ [4] http://code.kliu.org/misc/notepad2/
+
+
+Copyright
+
+ Notepad2 is FREE SOFTWARE and may be used and distributed freely.
+ Please do not charge any distribution or download fees for this
+ program, except for the cost of the distribution medium. The use of
+ this software is AT YOUR OWN RISK. See License.txt for full details.
+
+ If you have comments or questions, please drop me a note:
+ florian.balmer@gmail.com
+
+ (c) Florian Balmer 2004-2010
+
+###
458 Notepad2.vcproj
@@ -0,0 +1,458 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="Notepad2"
+ ProjectGUID="{B69A8C7E-A22D-45DA-9997-2D1403C7AEE8}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="scintilla\include;scintilla\src;scintilla\win32"
+ PreprocessorDefinitions="STATIC_BUILD;SCI_LEXER;UNICODE;_UNICODE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib shlwapi.lib imm32.lib"
+ OutputFile="$(OutDir)/Notepad2.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/Notepad2.pdb"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="scintilla\include;scintilla\src;scintilla\win32"
+ PreprocessorDefinitions="STATIC_BUILD;SCI_LEXER;NDEBUG;UNICODE;_UNICODE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib shlwapi.lib imm32.lib"
+ OutputFile="$(OutDir)/Notepad2.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="FALSE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+ <File
+ RelativePath="src\Dialogs.c">
+ </File>
+ <File
+ RelativePath="src\Dlapi.c">
+ </File>
+ <File
+ RelativePath="src\Edit.c">
+ </File>
+ <File
+ RelativePath="src\Helpers.c">
+ </File>
+ <File
+ RelativePath="src\Notepad2.c">
+ </File>
+ <File
+ RelativePath="src\Print.cpp">
+ </File>
+ <File
+ RelativePath="src\Styles.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc">
+ <File
+ RelativePath="src\Dialogs.h">
+ </File>
+ <File
+ RelativePath="src\Dlapi.h">
+ </File>
+ <File
+ RelativePath="src\Edit.h">
+ </File>
+ <File
+ RelativePath="src\Helpers.h">
+ </File>
+ <File
+ RelativePath="src\Notepad2.h">
+ </File>
+ <File
+ RelativePath="src\Styles.h">
+ </File>
+ <File
+ RelativePath="src\resource.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;manifest;xpm">
+ <File
+ RelativePath="res\Copy.cur">
+ </File>
+ <File
+ RelativePath="res\Encoding.bmp">
+ </File>
+ <File
+ RelativePath="res\Hover.cur">
+ </File>
+ <File
+ RelativePath="scintilla\win32\Margin.cur">
+ </File>
+ <File
+ RelativePath="res\Next.bmp">
+ </File>
+ <File
+ RelativePath="res\Notepad2.exe.manifest">
+ </File>
+ <File
+ RelativePath="res\Notepad2.ico">
+ </File>
+ <File
+ RelativePath="src\Notepad2.rc">
+ </File>
+ <File
+ RelativePath="res\Open.bmp">
+ </File>
+ <File
+ RelativePath="res\Pick.bmp">
+ </File>
+ <File
+ RelativePath="res\Prev.bmp">
+ </File>
+ <File
+ RelativePath="res\Run.ico">
+ </File>
+ <File
+ RelativePath="res\Styles.ico">
+ </File>
+ <File
+ RelativePath="res\Toolbar.bmp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Scintilla"
+ Filter="">
+ <Filter
+ Name="include"
+ Filter="">
+ <File
+ RelativePath="scintilla\include\Accessor.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\KeyWords.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\Platform.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\PropSet.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\SString.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\SciLexer.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\Scintilla.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\ScintillaWidget.h">
+ </File>
+ <File
+ RelativePath="scintilla\include\WindowAccessor.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="src"
+ Filter="">
+ <File
+ RelativePath="scintilla\src\AutoComplete.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\AutoComplete.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\CallTip.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\CallTip.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\CellBuffer.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\CellBuffer.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\CharClassify.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\CharClassify.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\CharacterSet.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\ContractionState.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\ContractionState.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Decoration.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\Decoration.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Document.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\Document.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\DocumentAccessor.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\DocumentAccessor.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Editor.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\Editor.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\ExternalLexer.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\ExternalLexer.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Indicator.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\Indicator.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\KeyMap.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\KeyMap.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\KeyWords.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexAsm.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexCPP.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexCSS.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexConf.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexHTML.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexOthers.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexPascal.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexPerl.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexPowerShell.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexPython.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexSQL.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LexVB.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LineMarker.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\LineMarker.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Partitioning.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\PerLine.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\PerLine.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\PositionCache.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\PositionCache.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\PropSet.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\RESearch.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\RESearch.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\RunStyles.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\RunStyles.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\SVector.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\ScintillaBase.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\ScintillaBase.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Selection.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\Selection.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\SplitVector.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\Style.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\Style.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\StyleContext.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\StyleContext.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\UniConversion.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\UniConversion.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\ViewStyle.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\ViewStyle.h">
+ </File>
+ <File
+ RelativePath="scintilla\src\WindowAccessor.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\XPM.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\src\XPM.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="win32"
+ Filter="">
+ <File
+ RelativePath="scintilla\win32\PlatWin.cxx">
+ </File>
+ <File
+ RelativePath="scintilla\win32\PlatformRes.h">
+ </File>
+ <File
+ RelativePath="scintilla\win32\ScintillaWin.cxx">
+ </File>
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
78 Readme.txt
@@ -0,0 +1,78 @@
+
+=======================================================================
+= =
+= =
+= Notepad2 - light-weight Scintilla-based text editor for Windows =
+= =
+= =
+= Notepad2 4.1.24 =
+= (c) Florian Balmer 2004-2010 =
+= http://www.flos-freeware.ch =
+= =
+= =
+=======================================================================
+
+
+The Notepad2 Source Code
+
+ This package contains the full source code of Notepad2 4.1.24 for
+ Windows. Project files for Visual C++ 7.0 are included. Chances are
+ that Notepad2 can be rebuilt with other development tools, including
+ the free Visual C++ Express Edition, but I haven't tested this.
+
+
+Rebuilding from the Source Code
+
+ To be able to rebuild Notepad2, the source code of the Scintilla
+ editing component [1] has to be unzipped to the "Scintilla"
+ subdirectory of the Notepad2 source code directory.
+
+ [1] http://www.scintilla.org
+
+ Notepad2 4.1.24 has been created with Scintilla 2.03. The following
+ modification to the Scintilla source code is necessary:
+
+ Scintilla/src/KeyWords.cxx:
+
+ #define LINK_LEXER(lexer) extern LexerModule lexer; ...
+
+ must be replaced with:
+
+ #define LINK_LEXER(lexer) void(0)
+
+
+Creating a Compact Executable Program File
+
+ Linking to the system CRT slightly improves disk footprint, memory
+ usage and startup because the pages for the system CRT are already
+ loaded and shared in memory. To achieve this, the release version of
+ Notepad2.exe is built using the Windows Driver Kit (WDK) 7.1.0 tools,
+ available as a free download from Microsoft. The appropriate build
+ scripts can be found in the "wdkbuild" subdirectory. Set %WDKBASEDIR%
+ to the directory where the WDK tools are located on your system.
+
+
+How to add or modify Syntax Schemes
+
+ The Scintilla documentation has an overview of syntax highlighting,
+ and how to write your own lexing module, in case the language you
+ would like to add is not currently supported by Scintilla.
+
+ Add your own lexer data structs to the global pLexArray (Styles.c),
+ then adjust NUMLEXERS (Styles.h) to the new total number of syntax
+ schemes. The style definitions can be found in SciLexer.h of the
+ Scintilla source code. Include the Lex*.cxx file from Scintilla
+ required for your language into your project.
+
+
+Copyright
+
+ See License.txt for details about distribution and modification.
+
+ If you have any comments or questions, please drop me a note:
+ florian.balmer@gmail.com
+
+ (c) Florian Balmer 2004-2010
+ http://www.flos-freeware.ch
+
+###
BIN res/Copy.cur
Binary file not shown.
BIN res/Encoding.bmp
Binary file not shown.
BIN res/Next.bmp
Binary file not shown.
32 res/Notepad2.exe.manifest
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity
+ name="Notepad2"
+ processorArchitecture="x86"
+ version="5.1.0.0"
+ type="win32"
+ />
+ <description>Notepad2</description>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="x86"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+ </dependency>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"
+ />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
BIN res/Notepad2.ico
Binary file not shown.
BIN res/Open.bmp
Binary file not shown.
BIN res/Pick.bmp
Binary file not shown.
BIN res/Prev.bmp
Binary file not shown.
BIN res/Run.ico
Binary file not shown.
BIN res/Styles.ico
Binary file not shown.
BIN res/Toolbar.bmp
Binary file not shown.
2,343 src/Dialogs.c
@@ -0,0 +1,2343 @@
+/******************************************************************************
+*
+*
+* Notepad2
+*
+* Dialogs.c
+* Notepad2 dialog boxes implementation
+*
+* See Readme.txt for more information about this source code.
+* Please send me your comments to this work.
+*
+* See License.txt for details about distribution and modification.
+*
+* (c) Florian Balmer 1996-2010
+* florian.balmer@gmail.com
+* http://www.flos-freeware.ch
+*
+*
+******************************************************************************/
+#define _WIN32_WINNT 0x501
+#include <windows.h>
+#include <commctrl.h>
+#include <shlobj.h>
+#include <shellapi.h>
+#include <shlwapi.h>
+#include <commdlg.h>
+#include <string.h>
+#include "notepad2.h"
+#include "scintilla.h"
+#include "edit.h"
+#include "helpers.h"
+#include "dlapi.h"
+#include "dialogs.h"
+#include "resource.h"
+
+
+extern HWND hwndMain;
+extern HWND hwndEdit;
+extern HINSTANCE g_hInstance;
+extern LPMALLOC g_lpMalloc;
+extern DWORD dwLastIOError;
+extern BOOL bSkipUnicodeDetection;
+extern BOOL bLoadASCIIasUTF8;
+extern int fNoFileVariables;
+extern BOOL bNoEncodingTags;
+extern BOOL bFixLineEndings;
+extern BOOL bAutoStripBlanks;
+extern WCHAR szCurFile[MAX_PATH+40];
+
+
+//=============================================================================
+//
+// MsgBox()
+//
+int MsgBox(int iType,UINT uIdMsg,...)
+{
+
+ WCHAR szText [1024];
+ WCHAR szBuf [1024];
+ WCHAR szTitle[64];
+ int iIcon = 0;
+ HWND hwnd;
+
+ if (!GetString(uIdMsg,szBuf,COUNTOF(szBuf)))
+ return(0);
+
+ wvsprintf(szText,szBuf,(LPVOID)((PUINT_PTR)&uIdMsg + 1));
+
+ if (uIdMsg == IDS_ERR_LOADFILE || uIdMsg == IDS_ERR_SAVEFILE ||
+ uIdMsg == IDS_CREATEINI_FAIL || uIdMsg == IDS_WRITEINI_FAIL) {
+ LPVOID lpMsgBuf;
+ WCHAR wcht;
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ dwLastIOError,
+ MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
+ (LPTSTR)&lpMsgBuf,
+ 0,
+ NULL);
+ StrTrim(lpMsgBuf,L" \a\b\f\n\r\t\v");
+ StrCatBuff(szText,L"\n",COUNTOF(szText));
+ StrCatBuff(szText,lpMsgBuf,COUNTOF(szText));
+ LocalFree(lpMsgBuf);
+ wcht = *CharPrev(szText,StrEnd(szText));
+ if (IsCharAlphaNumeric(wcht) || wcht == '"' || wcht == '\'')
+ StrCatBuff(szText,L".",COUNTOF(szText));
+ }
+
+ GetString(IDS_APPTITLE,szTitle,COUNTOF(szTitle));
+
+ switch (iType) {
+ case MBINFO: iIcon = MB_ICONEXCLAMATION; break;
+ case MBWARN: iIcon = MB_ICONEXCLAMATION; break;
+ case MBYESNO: iIcon = MB_ICONEXCLAMATION | MB_YESNO; break;
+ case MBYESNOCANCEL: iIcon = MB_ICONEXCLAMATION | MB_YESNOCANCEL; break;
+ case MBYESNOWARN: iIcon = MB_ICONEXCLAMATION | MB_YESNO; break;
+ case MBOKCANCEL: iIcon = MB_ICONEXCLAMATION | MB_OKCANCEL; break;
+ }
+
+ if (!(hwnd = GetFocus()))
+ hwnd = hwndMain;
+
+ return MessageBoxEx(hwnd,
+ szText,szTitle,
+ MB_SETFOREGROUND | iIcon,
+ MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT));
+
+}
+
+
+//=============================================================================
+//
+// DisplayCmdLineHelp()
+//
+void DisplayCmdLineHelp()
+{
+ MSGBOXPARAMS mbp;
+
+ WCHAR szTitle[32];
+ WCHAR szText[2048];
+
+ GetString(IDS_APPTITLE,szTitle,COUNTOF(szTitle));
+ GetString(IDS_CMDLINEHELP,szText,COUNTOF(szText));
+
+ mbp.cbSize = sizeof(MSGBOXPARAMS);
+ mbp.hwndOwner = NULL;
+ mbp.hInstance = g_hInstance;
+ mbp.lpszText = szText;
+ mbp.lpszCaption = szTitle;
+ mbp.dwStyle = MB_OK | MB_USERICON | MB_SETFOREGROUND;
+ mbp.lpszIcon = MAKEINTRESOURCE(IDR_MAINWND);
+ mbp.dwContextHelpId = 0;
+ mbp.lpfnMsgBoxCallback = NULL;
+ mbp.dwLanguageId = MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL);
+
+ MessageBoxIndirect(&mbp);
+}
+
+
+//=============================================================================
+//
+// BFFCallBack()
+//
+int CALLBACK BFFCallBack(HWND hwnd,UINT umsg,LPARAM lParam,LPARAM lpData)
+{
+ if (umsg == BFFM_INITIALIZED)
+ SendMessage(hwnd,BFFM_SETSELECTION,TRUE,lpData);
+
+ return(0);
+
+ lParam;
+}
+
+
+//=============================================================================
+//
+// GetDirectory()
+//
+BOOL GetDirectory(HWND hwndParent,int iTitle,LPWSTR pszFolder,LPCWSTR pszBase,BOOL bNewDialogStyle)
+{
+
+ BROWSEINFO bi;
+ LPITEMIDLIST pidl;
+ //LPMALLOC lpMalloc;
+ WCHAR szTitle[256];
+ WCHAR szBase[MAX_PATH];
+ BOOL fOk = FALSE;
+
+ lstrcpy(szTitle,L"");
+ GetString(iTitle,szTitle,COUNTOF(szTitle));
+
+ if (!pszBase || !*pszBase)
+ GetCurrentDirectory(MAX_PATH,szBase);
+ else
+ lstrcpy(szBase,pszBase);
+
+ bi.hwndOwner = hwndParent;
+ bi.pidlRoot = NULL;
+ bi.pszDisplayName = pszFolder;
+ bi.lpszTitle = szTitle;
+ bi.ulFlags = BIF_RETURNONLYFSDIRS;
+ if (bNewDialogStyle)
+ bi.ulFlags |= BIF_NEWDIALOGSTYLE;
+ bi.lpfn = &BFFCallBack;
+ bi.lParam = (LPARAM)szBase;
+ bi.iImage = 0;
+
+ //if (SHGetMalloc(&lpMalloc) != NOERROR)
+ // return FALSE;
+
+ pidl = SHBrowseForFolder(&bi);
+ if (pidl)
+ {
+ SHGetPathFromIDList(pidl,pszFolder);
+
+ g_lpMalloc->lpVtbl->Free(g_lpMalloc,pidl);
+
+ fOk = TRUE;
+ }
+ //lpMalloc->lpVtbl->Release(lpMalloc);
+
+ return fOk;
+
+}
+
+
+//=============================================================================
+//
+// AboutDlgProc()
+//
+static const DWORD dwVerMajor = 4;
+static const DWORD dwVerMinor = 1;
+static const DWORD dwBuildNumber = 24;
+static const WCHAR* szRevision = L"";
+static const WCHAR* szExtra = L"";
+static const BOOL bReleaseBuild = TRUE;
+
+BOOL CALLBACK AboutDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
+{
+
+ static HFONT hFontTitle;
+
+ switch(umsg)
+ {
+ case WM_INITDIALOG:
+ {
+ WCHAR szVersion[64];
+ WCHAR szDate[64];
+ WCHAR szLink[256];
+ WCHAR szLinkCode[256];
+ LOGFONT lf;
+
+ if (bReleaseBuild) {
+ wsprintf(szVersion,L"Notepad2 %u.%u.%0.2u%s",
+ dwVerMajor,dwVerMinor,dwBuildNumber,szRevision);
+ SetDlgItemText(hwnd,IDC_VERSION,szVersion);
+ }
+ else {
+ MultiByteToWideChar(CP_ACP,0,__DATE__,-1,szDate,COUNTOF(szDate));
+ wsprintf(szVersion,L"Notepad2 %u.%u.%0.2u%s%s %s",
+ dwVerMajor,dwVerMinor,dwBuildNumber,szRevision,szExtra,szDate);
+ SetDlgItemText(hwnd,IDC_VERSION,szVersion);
+ }
+
+ if (hFontTitle)
+ DeleteObject(hFontTitle);
+
+ if (NULL == (hFontTitle = (HFONT)SendDlgItemMessage(hwnd,IDC_VERSION,WM_GETFONT,0,0)))
+ hFontTitle = GetStockObject(DEFAULT_GUI_FONT);
+ GetObject(hFontTitle,sizeof(LOGFONT),&lf);
+ lf.lfWeight = FW_BOLD;
+ hFontTitle = CreateFontIndirect(&lf);
+ SendDlgItemMessage(hwnd,IDC_VERSION,WM_SETFONT,(WPARAM)hFontTitle,TRUE);
+
+ if (GetDlgItem(hwnd,IDC_WEBPAGE) == NULL)
+ ShowWindow(GetDlgItem(hwnd,IDC_WEBPAGE2),SW_SHOWNORMAL);
+ else {
+ GetDlgItemText(hwnd,IDC_WEBPAGE2,szLink,COUNTOF(szLink));
+ wsprintf(szLinkCode,L"<A>%s</A>",szLink);
+ SetDlgItemText(hwnd,IDC_WEBPAGE,szLinkCode);
+ }
+
+ if (GetDlgItem(hwnd,IDC_EMAIL) == NULL)
+ ShowWindow(GetDlgItem(hwnd,IDC_EMAIL2),SW_SHOWNORMAL);
+ else {
+ GetDlgItemText(hwnd,IDC_EMAIL2,szLink,COUNTOF(szLink));
+ wsprintf(szLinkCode,L"<A>%s</A>",szLink);
+ SetDlgItemText(hwnd,IDC_EMAIL,szLinkCode);
+ }
+
+ CenterDlgInParent(hwnd);
+ }
+ return TRUE;
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR pnmhdr = (LPNMHDR)lParam;
+ switch (pnmhdr->code) {
+
+ case NM_CLICK:
+ case NM_RETURN:
+ {
+ if (pnmhdr->idFrom == IDC_WEBPAGE) {
+ ShellExecute(hwnd,L"open",L"http://www.flos-freeware.ch",NULL,NULL,SW_SHOWNORMAL);
+ }
+ else if (pnmhdr->idFrom == IDC_EMAIL) {
+ ShellExecute(hwnd,L"open",L"mailto:florian.balmer@gmail.com",NULL,NULL,SW_SHOWNORMAL);
+ }
+ }
+ break;
+ }
+ }
+ break;
+
+ case WM_COMMAND:
+
+ switch(LOWORD(wParam))
+ {
+ case IDOK:
+ case IDCANCEL:
+ EndDialog(hwnd,IDOK);
+ break;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+
+//=============================================================================
+//
+// RunDlgProc()
+//
+BOOL CALLBACK RunDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
+{
+
+ switch(umsg)
+ {
+
+ case WM_INITDIALOG:
+ {
+ MakeBitmapButton(hwnd,IDC_SEARCHEXE,g_hInstance,IDB_OPEN);
+
+ SendDlgItemMessage(hwnd,IDC_COMMANDLINE,EM_LIMITTEXT,MAX_PATH - 1,0);
+ SetDlgItemText(hwnd,IDC_COMMANDLINE,(LPCWSTR)lParam);
+ SHAutoComplete(GetDlgItem(hwnd,IDC_COMMANDLINE),SHACF_FILESYSTEM);
+
+ CenterDlgInParent(hwnd);
+ }
+ return TRUE;
+
+
+ case WM_DESTROY:
+ DeleteBitmapButton(hwnd,IDC_SEARCHEXE);
+ return FALSE;
+
+
+ case WM_COMMAND:
+
+ switch(LOWORD(wParam))
+ {
+
+ case IDC_SEARCHEXE:
+ {
+ WCHAR szArgs[MAX_PATH];
+ WCHAR szArg2[MAX_PATH];
+ WCHAR szFile[MAX_PATH * 2];
+ WCHAR szFilter[256];
+ OPENFILENAME ofn;
+ ZeroMemory(&ofn,sizeof(OPENFILENAME));
+
+ GetDlgItemText(hwnd,IDC_COMMANDLINE,szArgs,COUNTOF(szArgs));
+ ExpandEnvironmentStringsEx(szArgs,COUNTOF(szArgs));
+ ExtractFirstArgument(szArgs,szFile,szArg2);
+
+ GetString(IDS_FILTER_EXE,szFilter,COUNTOF(szFilter));
+ PrepareFilterStr(szFilter);
+
+ ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.hwndOwner = hwnd;
+ ofn.lpstrFilter = szFilter;
+ ofn.lpstrFile = szFile;
+ ofn.nMaxFile = COUNTOF(szFile);
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_DONTADDTORECENT
+ | OFN_PATHMUSTEXIST | OFN_SHAREAWARE | OFN_NODEREFERENCELINKS;
+
+ if (GetOpenFileName(&ofn)) {
+ PathQuoteSpaces(szFile);
+ if (lstrlen(szArg2))
+ {
+ lstrcat(szFile,L" ");
+ lstrcat(szFile,szArg2);
+ }
+ SetDlgItemText(hwnd,IDC_COMMANDLINE,szFile);
+ }
+
+ PostMessage(hwnd,WM_NEXTDLGCTL,1,0);
+ }
+ break;
+
+
+ case IDC_COMMANDLINE:
+ {
+ BOOL bEnableOK = FALSE;
+ WCHAR args[MAX_PATH];
+
+ if (GetDlgItemText(hwnd,IDC_COMMANDLINE,args,MAX_PATH))
+ if (ExtractFirstArgument(args,args,NULL))
+ if (lstrlen(args))
+ bEnableOK = TRUE;
+
+ EnableWindow(GetDlgItem(hwnd,IDOK),bEnableOK);
+ }
+ break;
+
+
+ case IDOK:
+ {
+ WCHAR arg1[MAX_PATH];
+ WCHAR arg2[MAX_PATH];
+ SHELLEXECUTEINFO sei;
+ WCHAR wchDirectory[MAX_PATH] = L"";
+
+ if (GetDlgItemText(hwnd,IDC_COMMANDLINE,arg1,MAX_PATH))
+ {
+ BOOL bQuickExit = FALSE;
+
+ ExpandEnvironmentStringsEx(arg1,COUNTOF(arg1));
+ ExtractFirstArgument(arg1,arg1,arg2);
+
+ if (lstrcmpi(arg1,L"notepad2") == 0 ||
+ lstrcmpi(arg1,L"notepad2.exe") == 0) {
+ GetModuleFileName(NULL,arg1,COUNTOF(arg1));
+ bQuickExit = TRUE;
+ }
+
+ if (lstrlen(szCurFile)) {
+ lstrcpy(wchDirectory,szCurFile);
+ PathRemoveFileSpec(wchDirectory);
+ }
+
+ ZeroMemory(&sei,sizeof(SHELLEXECUTEINFO));
+
+ sei.cbSize = sizeof(SHELLEXECUTEINFO);
+ sei.fMask = 0;
+ sei.hwnd = hwnd;
+ sei.lpVerb = NULL;
+ sei.lpFile = arg1;
+ sei.lpParameters = arg2;
+ sei.lpDirectory = wchDirectory;
+ sei.nShow = SW_SHOWNORMAL;
+
+ if (bQuickExit) {
+ sei.fMask |= /*SEE_MASK_NOZONECHECKS*/0x00800000;
+ EndDialog(hwnd,IDOK);
+ ShellExecuteEx(&sei);
+ }
+
+ else {
+
+ if (ShellExecuteEx(&sei))
+ EndDialog(hwnd,IDOK);
+
+ else
+ PostMessage(hwnd,WM_NEXTDLGCTL,
+ (WPARAM)(GetDlgItem(hwnd,IDC_COMMANDLINE)),1);
+ }
+ }
+ }
+ break;
+
+
+ case IDCANCEL:
+ EndDialog(hwnd,IDCANCEL);
+ break;
+
+ }
+
+ return TRUE;
+
+ }
+
+ return FALSE;
+
+}
+
+
+//=============================================================================
+//
+// RunDlg()
+//
+void RunDlg(HWND hwnd,LPCWSTR lpstrDefault)
+{
+
+ ThemedDialogBoxParam(g_hInstance,MAKEINTRESOURCE(IDD_RUN),
+ hwnd,RunDlgProc,(LPARAM)lpstrDefault);
+
+}
+
+
+//=============================================================================
+//
+// OpenWithDlgProc()
+//
+extern WCHAR tchOpenWithDir[MAX_PATH];
+extern int flagNoFadeHidden;
+
+extern int cxOpenWithDlg;
+extern int cyOpenWithDlg;
+
+BOOL CALLBACK OpenWithDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
+{
+
+ switch(umsg)
+ {
+
+ case WM_INITDIALOG:
+ {
+ LVCOLUMN lvc = { LVCF_FMT|LVCF_TEXT, LVCFMT_LEFT, 0, L"", -1, 0, 0, 0 };
+
+ ResizeDlg_Init(hwnd,cxOpenWithDlg,cyOpenWithDlg,IDC_RESIZEGRIP3);
+
+ SetWindowLongPtr(hwnd,DWLP_USER,lParam);
+
+ //SetExplorerTheme(GetDlgItem(hwnd,IDC_OPENWITHDIR));
+ ListView_SetExtendedListViewStyle(GetDlgItem(hwnd,IDC_OPENWITHDIR),/*LVS_EX_FULLROWSELECT|*/LVS_EX_DOUBLEBUFFER|LVS_EX_LABELTIP);
+ ListView_InsertColumn(GetDlgItem(hwnd,IDC_OPENWITHDIR),0,&lvc);
+ DirList_Init(GetDlgItem(hwnd,IDC_OPENWITHDIR),NULL);
+ DirList_Fill(GetDlgItem(hwnd,IDC_OPENWITHDIR),tchOpenWithDir,DL_ALLOBJECTS,NULL,FALSE,flagNoFadeHidden,DS_NAME,FALSE);
+ DirList_StartIconThread(GetDlgItem(hwnd,IDC_OPENWITHDIR));
+ ListView_SetItemState(GetDlgItem(hwnd,IDC_OPENWITHDIR),0,LVIS_FOCUSED,LVIS_FOCUSED);
+
+ MakeBitmapButton(hwnd,IDC_GETOPENWITHDIR,g_hInstance,IDB_OPEN);
+
+ CenterDlgInParent(hwnd);
+ }
+ return TRUE;
+
+
+ case WM_DESTROY:
+ DirList_Destroy(GetDlgItem(hwnd,IDC_OPENWITHDIR));
+ DeleteBitmapButton(hwnd,IDC_GETOPENWITHDIR);
+
+ ResizeDlg_Destroy(hwnd,&cxOpenWithDlg,&cyOpenWithDlg);
+ return FALSE;
+
+
+ case WM_SIZE:
+ {
+ int dx;
+ int dy;
+ HDWP hdwp;
+
+ ResizeDlg_Size(hwnd,lParam,&dx,&dy);
+
+ hdwp = BeginDeferWindowPos(6);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_RESIZEGRIP3,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDOK,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDCANCEL,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_OPENWITHDIR,dx,dy,SWP_NOMOVE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_GETOPENWITHDIR,0,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_OPENWITHDESCR,0,dy,SWP_NOSIZE);
+ EndDeferWindowPos(hdwp);
+
+ ListView_SetColumnWidth(GetDlgItem(hwnd,IDC_OPENWITHDIR),0,LVSCW_AUTOSIZE_USEHEADER);
+ }
+ return TRUE;
+
+
+ case WM_GETMINMAXINFO:
+ ResizeDlg_GetMinMaxInfo(hwnd,lParam);
+ return TRUE;
+
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR pnmh = (LPNMHDR)lParam;
+
+ if (pnmh->idFrom == IDC_OPENWITHDIR)
+ {
+ switch(pnmh->code)
+ {
+ case LVN_GETDISPINFO:
+ DirList_GetDispInfo(GetDlgItem(hwnd,IDC_OPENWITHDIR),lParam,flagNoFadeHidden);
+ break;
+
+ case LVN_DELETEITEM:
+ DirList_DeleteItem(GetDlgItem(hwnd,IDC_OPENWITHDIR),lParam);
+ break;
+
+ case LVN_ITEMCHANGED: {
+ NM_LISTVIEW *pnmlv = (NM_LISTVIEW*)lParam;
+ EnableWindow(GetDlgItem(hwnd,IDOK),(pnmlv->uNewState & LVIS_SELECTED));
+ }
+ break;
+
+ case NM_DBLCLK:
+ if (ListView_GetSelectedCount(GetDlgItem(hwnd,IDC_OPENWITHDIR)))
+ SendMessage(hwnd,WM_COMMAND,MAKELONG(IDOK,1),0);
+ break;
+ }
+ }
+ }
+ return TRUE;
+
+
+ case WM_COMMAND:
+
+ switch(LOWORD(wParam))
+ {
+
+ case IDC_GETOPENWITHDIR:
+ {
+ if (GetDirectory(hwnd,IDS_OPENWITH,tchOpenWithDir,tchOpenWithDir,TRUE))
+ {
+ DirList_Fill(GetDlgItem(hwnd,IDC_OPENWITHDIR),tchOpenWithDir,DL_ALLOBJECTS,NULL,FALSE,flagNoFadeHidden,DS_NAME,FALSE);
+ DirList_StartIconThread(GetDlgItem(hwnd,IDC_OPENWITHDIR));
+ ListView_EnsureVisible(GetDlgItem(hwnd,IDC_OPENWITHDIR),0,FALSE);
+ ListView_SetItemState(GetDlgItem(hwnd,IDC_OPENWITHDIR),0,LVIS_FOCUSED,LVIS_FOCUSED);
+ }
+ PostMessage(hwnd,WM_NEXTDLGCTL,(WPARAM)(GetDlgItem(hwnd,IDC_OPENWITHDIR)),1);
+ }
+ break;
+
+
+ case IDOK: {
+ LPDLITEM lpdli = (LPDLITEM)GetWindowLongPtr(hwnd,DWLP_USER);
+ lpdli->mask = DLI_FILENAME | DLI_TYPE;
+ lpdli->ntype = DLE_NONE;
+ DirList_GetItem(GetDlgItem(hwnd,IDC_OPENWITHDIR),(-1),lpdli);
+
+ if (lpdli->ntype != DLE_NONE)
+ EndDialog(hwnd,IDOK);
+ else
+ MessageBeep(0);
+ }
+ break;
+
+
+ case IDCANCEL:
+ EndDialog(hwnd,IDCANCEL);
+ break;
+
+ }
+
+ return TRUE;
+
+ }
+
+ return FALSE;
+
+}
+
+
+//=============================================================================
+//
+// OpenWithDlg()
+//
+BOOL OpenWithDlg(HWND hwnd,LPCWSTR lpstrFile)
+{
+
+ DLITEM dliOpenWith;
+ dliOpenWith.mask = DLI_FILENAME;
+
+ if (IDOK == ThemedDialogBoxParam(g_hInstance,MAKEINTRESOURCE(IDD_OPENWITH),
+ hwnd,OpenWithDlgProc,(LPARAM)&dliOpenWith))
+ {
+ SHELLEXECUTEINFO sei;
+ WCHAR szParam[MAX_PATH];
+ WCHAR wchDirectory[MAX_PATH] = L"";
+
+ if (lstrlen(szCurFile)) {
+ lstrcpy(wchDirectory,szCurFile);
+ PathRemoveFileSpec(wchDirectory);
+ }
+
+ ZeroMemory(&sei,sizeof(SHELLEXECUTEINFO));
+ sei.cbSize = sizeof(SHELLEXECUTEINFO);
+ sei.fMask = 0;
+ sei.hwnd = hwnd;
+ sei.lpVerb = NULL;
+ sei.lpFile = dliOpenWith.szFileName;
+ sei.lpParameters = szParam;
+ sei.lpDirectory = wchDirectory;
+ sei.nShow = SW_SHOWNORMAL;
+
+ // resolve links and get short path name
+ if (!(PathIsLnkFile(lpstrFile) && PathGetLnkPath(lpstrFile,szParam,COUNTOF(szParam))))
+ lstrcpy(szParam,lpstrFile);
+ //GetShortPathName(szParam,szParam,sizeof(WCHAR)*COUNTOF(szParam));
+ PathQuoteSpaces(szParam);
+
+ ShellExecuteEx(&sei);
+
+ return(TRUE);
+ }
+
+ return(FALSE);
+
+}
+
+
+//=============================================================================
+//
+// FavoritesDlgProc()
+//
+extern WCHAR tchFavoritesDir[MAX_PATH];
+//extern int flagNoFadeHidden;
+
+extern int cxFavoritesDlg;
+extern int cyFavoritesDlg;
+
+BOOL CALLBACK FavoritesDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
+{
+
+ static HWND hwndLV;
+
+ switch(umsg)
+ {
+
+ case WM_INITDIALOG:
+ {
+ LVCOLUMN lvc = { LVCF_FMT|LVCF_TEXT, LVCFMT_LEFT, 0, L"", -1, 0, 0, 0 };
+
+ ResizeDlg_Init(hwnd,cxFavoritesDlg,cyFavoritesDlg,IDC_RESIZEGRIP3);
+
+ SetWindowLongPtr(hwnd,DWLP_USER,lParam);
+
+ //SetExplorerTheme(GetDlgItem(hwnd,IDC_FAVORITESDIR));
+ ListView_SetExtendedListViewStyle(GetDlgItem(hwnd,IDC_FAVORITESDIR),/*LVS_EX_FULLROWSELECT|*/LVS_EX_DOUBLEBUFFER|LVS_EX_LABELTIP);
+ ListView_InsertColumn(GetDlgItem(hwnd,IDC_FAVORITESDIR),0,&lvc);
+ DirList_Init(GetDlgItem(hwnd,IDC_FAVORITESDIR),NULL);
+ DirList_Fill(GetDlgItem(hwnd,IDC_FAVORITESDIR),tchFavoritesDir,DL_ALLOBJECTS,NULL,FALSE,flagNoFadeHidden,DS_NAME,FALSE);
+ DirList_StartIconThread(GetDlgItem(hwnd,IDC_FAVORITESDIR));
+ ListView_SetItemState(GetDlgItem(hwnd,IDC_FAVORITESDIR),0,LVIS_FOCUSED,LVIS_FOCUSED);
+
+ MakeBitmapButton(hwnd,IDC_GETFAVORITESDIR,g_hInstance,IDB_OPEN);
+
+ CenterDlgInParent(hwnd);
+ }
+ return TRUE;
+
+
+ case WM_DESTROY:
+ DirList_Destroy(GetDlgItem(hwnd,IDC_FAVORITESDIR));
+ DeleteBitmapButton(hwnd,IDC_GETFAVORITESDIR);
+
+ ResizeDlg_Destroy(hwnd,&cxFavoritesDlg,&cyFavoritesDlg);
+ return FALSE;
+
+
+ case WM_SIZE:
+ {
+ int dx;
+ int dy;
+ HDWP hdwp;
+
+ ResizeDlg_Size(hwnd,lParam,&dx,&dy);
+
+ hdwp = BeginDeferWindowPos(6);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_RESIZEGRIP3,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDOK,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDCANCEL,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_FAVORITESDIR,dx,dy,SWP_NOMOVE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_GETFAVORITESDIR,0,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_FAVORITESDESCR,0,dy,SWP_NOSIZE);
+ EndDeferWindowPos(hdwp);
+ ListView_SetColumnWidth(GetDlgItem(hwnd,IDC_FAVORITESDIR),0,LVSCW_AUTOSIZE_USEHEADER);
+ }
+ return TRUE;
+
+
+ case WM_GETMINMAXINFO:
+ ResizeDlg_GetMinMaxInfo(hwnd,lParam);
+ return TRUE;
+
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR pnmh = (LPNMHDR)lParam;
+
+ if (pnmh->idFrom == IDC_FAVORITESDIR)
+ {
+ switch(pnmh->code)
+ {
+ case LVN_GETDISPINFO:
+ DirList_GetDispInfo(GetDlgItem(hwnd,IDC_OPENWITHDIR),lParam,flagNoFadeHidden);
+ break;
+
+ case LVN_DELETEITEM:
+ DirList_DeleteItem(GetDlgItem(hwnd,IDC_FAVORITESDIR),lParam);
+ break;
+
+ case LVN_ITEMCHANGED: {
+ NM_LISTVIEW *pnmlv = (NM_LISTVIEW*)lParam;
+ EnableWindow(GetDlgItem(hwnd,IDOK),(pnmlv->uNewState & LVIS_SELECTED));
+ }
+ break;
+
+ case NM_DBLCLK:
+ if (ListView_GetSelectedCount(GetDlgItem(hwnd,IDC_FAVORITESDIR)))
+ SendMessage(hwnd,WM_COMMAND,MAKELONG(IDOK,1),0);
+ break;
+ }
+ }
+ }
+ return TRUE;
+
+
+ case WM_COMMAND:
+
+ switch(LOWORD(wParam))
+ {
+
+ case IDC_GETFAVORITESDIR:
+ {
+ if (GetDirectory(hwnd,IDS_FAVORITES,tchFavoritesDir,tchFavoritesDir,TRUE))
+ {
+ DirList_Fill(GetDlgItem(hwnd,IDC_FAVORITESDIR),tchFavoritesDir,DL_ALLOBJECTS,NULL,FALSE,flagNoFadeHidden,DS_NAME,FALSE);
+ DirList_StartIconThread(GetDlgItem(hwnd,IDC_FAVORITESDIR));
+ ListView_EnsureVisible(GetDlgItem(hwnd,IDC_FAVORITESDIR),0,FALSE);
+ ListView_SetItemState(GetDlgItem(hwnd,IDC_FAVORITESDIR),0,LVIS_FOCUSED,LVIS_FOCUSED);
+ }
+ PostMessage(hwnd,WM_NEXTDLGCTL,(WPARAM)(GetDlgItem(hwnd,IDC_FAVORITESDIR)),1);
+ }
+ break;
+
+
+ case IDOK: {
+ LPDLITEM lpdli = (LPDLITEM)GetWindowLongPtr(hwnd,DWLP_USER);
+ lpdli->mask = DLI_FILENAME | DLI_TYPE;
+ lpdli->ntype = DLE_NONE;
+ DirList_GetItem(GetDlgItem(hwnd,IDC_FAVORITESDIR),(-1),lpdli);
+
+ if (lpdli->ntype != DLE_NONE)
+ EndDialog(hwnd,IDOK);
+ else
+ MessageBeep(0);
+ }
+ break;
+
+
+ case IDCANCEL:
+ EndDialog(hwnd,IDCANCEL);
+ break;
+
+ }
+
+ return TRUE;
+
+ }
+
+ return FALSE;
+
+}
+
+
+//=============================================================================
+//
+// FavoritesDlg()
+//
+BOOL FavoritesDlg(HWND hwnd,LPWSTR lpstrFile)
+{
+
+ DLITEM dliFavorite;
+ dliFavorite.mask = DLI_FILENAME;
+
+ if (IDOK == ThemedDialogBoxParam(g_hInstance,MAKEINTRESOURCE(IDD_FAVORITES),
+ hwnd,FavoritesDlgProc,(LPARAM)&dliFavorite))
+ {
+ lstrcpyn(lpstrFile,dliFavorite.szFileName,MAX_PATH);
+ return(TRUE);
+ }
+
+ return(FALSE);
+
+}
+
+
+//=============================================================================
+//
+// AddToFavDlgProc()
+//
+// Controls: 100 Edit
+//
+BOOL CALLBACK AddToFavDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
+{
+
+ switch(umsg)
+ {
+
+ WCHAR *pszName;
+
+ case WM_INITDIALOG:
+ pszName = (LPWSTR)lParam;
+ SetWindowLongPtr(hwnd,DWLP_USER,(LONG_PTR)pszName);
+
+ SendDlgItemMessage(hwnd,100,EM_LIMITTEXT,MAX_PATH-1,0);
+ SetDlgItemText(hwnd,100,pszName);
+
+ CenterDlgInParent(hwnd);
+ return TRUE;
+
+
+ case WM_COMMAND:
+
+ switch(LOWORD(wParam))
+ {
+
+ case 100:
+ EnableWindow(GetDlgItem(hwnd,IDOK),
+ GetWindowTextLength(GetDlgItem(hwnd,100)));
+ break;
+
+
+ case IDOK:
+ pszName = (LPWSTR)GetWindowLongPtr(hwnd,DWLP_USER);
+ GetDlgItemText(hwnd,100,pszName,
+ MAX_PATH-1);
+ EndDialog(hwnd,IDOK);
+ break;
+
+
+ case IDCANCEL:
+ EndDialog(hwnd,IDCANCEL);
+ break;
+
+ }
+
+ return TRUE;
+
+ }
+
+ return FALSE;
+
+}
+
+
+//=============================================================================
+//
+// AddToFavDlg()
+//
+BOOL AddToFavDlg(HWND hwnd,LPCWSTR lpszName,LPCWSTR lpszTarget)
+{
+
+ int iResult;
+
+ WCHAR pszName[MAX_PATH];
+ lstrcpy(pszName,lpszName);
+
+ iResult = ThemedDialogBoxParam(
+ g_hInstance,
+ MAKEINTRESOURCE(IDD_ADDTOFAV),
+ hwnd,
+ AddToFavDlgProc,(LPARAM)pszName);
+
+ if (iResult == IDOK)
+ {
+ if (!PathCreateFavLnk(pszName,lpszTarget,tchFavoritesDir)) {
+ MsgBox(MBWARN,IDS_FAV_FAILURE);
+ return FALSE;
+ }
+
+ else {
+ MsgBox(MBINFO,IDS_FAV_SUCCESS);
+ return TRUE;
+ }
+ }
+
+ else
+ return FALSE;
+
+}
+
+
+//=============================================================================
+//
+// FileMRUDlgProc()
+//
+//
+extern LPMRULIST pFileMRU;
+extern BOOL bSaveRecentFiles;
+extern int cxFileMRUDlg;
+extern int cyFileMRUDlg;
+extern int flagNoFadeHidden;
+
+typedef struct tagIconThreadInfo
+{
+ HWND hwnd; // HWND of ListView Control
+ HANDLE hExitThread; // Flag is set when Icon Thread should terminate
+ HANDLE hTerminatedThread; // Flag is set when Icon Thread has terminated
+
+} ICONTHREADINFO, *LPICONTHREADINFO;
+
+DWORD WINAPI FileMRUIconThread(LPVOID lpParam) {
+
+ HWND hwnd;
+ LPICONTHREADINFO lpit;
+ LV_ITEM lvi;
+ WCHAR tch[MAX_PATH];
+ SHFILEINFO shfi;
+ DWORD dwFlags = SHGFI_SMALLICON | SHGFI_SYSICONINDEX | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED;
+ DWORD dwAttr = 0;
+ int iItem = 0;
+ int iMaxItem;
+
+ lpit = (LPICONTHREADINFO)lpParam;
+ ResetEvent(lpit->hTerminatedThread);
+
+ hwnd = lpit->hwnd;
+ iMaxItem = ListView_GetItemCount(hwnd);
+
+ CoInitialize(NULL);
+
+ ZeroMemory(&lvi,sizeof(LV_ITEM));
+
+ while (iItem < iMaxItem && WaitForSingleObject(lpit->hExitThread,0) != WAIT_OBJECT_0) {
+
+ lvi.mask = LVIF_TEXT;
+ lvi.pszText = tch;
+ lvi.cchTextMax = COUNTOF(tch);
+ lvi.iItem = iItem;
+ if (ListView_GetItem(hwnd,&lvi)) {
+
+ if (PathIsUNC(tch) || !PathFileExists(tch)) {
+ dwFlags |= SHGFI_USEFILEATTRIBUTES;
+ dwAttr = FILE_ATTRIBUTE_NORMAL;
+ shfi.dwAttributes = 0;
+ SHGetFileInfo(PathFindFileName(tch),dwAttr,&shfi,sizeof(SHFILEINFO),dwFlags);
+ }
+
+ else {
+ shfi.dwAttributes = SFGAO_LINK | SFGAO_SHARE;
+ SHGetFileInfo(tch,dwAttr,&shfi,sizeof(SHFILEINFO),dwFlags);
+ }
+
+ lvi.mask = LVIF_IMAGE;
+ lvi.iImage = shfi.iIcon;
+ lvi.stateMask = 0;
+ lvi.state = 0;
+
+ if (shfi.dwAttributes & SFGAO_LINK) {
+ lvi.mask |= LVIF_STATE;
+ lvi.stateMask |= LVIS_OVERLAYMASK;
+ lvi.state |= INDEXTOOVERLAYMASK(2);
+ }
+
+ if (shfi.dwAttributes & SFGAO_SHARE) {
+ lvi.mask |= LVIF_STATE;
+ lvi.stateMask |= LVIS_OVERLAYMASK;
+ lvi.state |= INDEXTOOVERLAYMASK(1);
+ }
+
+ if (PathIsUNC(tch))
+ dwAttr = FILE_ATTRIBUTE_NORMAL;
+ else
+ dwAttr = GetFileAttributes(tch);
+
+ if (!flagNoFadeHidden &&
+ dwAttr != INVALID_FILE_ATTRIBUTES &&
+ dwAttr & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) {
+ lvi.mask |= LVIF_STATE;
+ lvi.stateMask |= LVIS_CUT;
+ lvi.state |= LVIS_CUT;
+ }
+
+ lvi.iSubItem = 0;
+ ListView_SetItem(hwnd,&lvi);
+ }
+ iItem++;
+ }
+
+ CoUninitialize();
+
+ SetEvent(lpit->hTerminatedThread);
+ ExitThread(0);
+ return(0);
+}
+
+BOOL CALLBACK FileMRUDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
+{
+
+ switch(umsg)
+ {
+
+ case WM_INITDIALOG:
+ {
+ SHFILEINFO shfi;
+ LVCOLUMN lvc = { LVCF_FMT|LVCF_TEXT, LVCFMT_LEFT, 0, L"", -1, 0, 0, 0 };
+
+ LPICONTHREADINFO lpit = (LPVOID)GlobalAlloc(GPTR,sizeof(ICONTHREADINFO));
+ SetProp(hwnd,L"it",(HANDLE)lpit);
+ lpit->hwnd = GetDlgItem(hwnd,IDC_FILEMRU);
+ lpit->hExitThread = CreateEvent(NULL,TRUE,FALSE,NULL);
+ lpit->hTerminatedThread = CreateEvent(NULL,TRUE,TRUE,NULL);
+
+ SetWindowLongPtr(hwnd,DWLP_USER,lParam);
+
+ ResizeDlg_Init(hwnd,cxFileMRUDlg,cyFileMRUDlg,IDC_RESIZEGRIP);
+
+ ListView_SetImageList(GetDlgItem(hwnd,IDC_FILEMRU),
+ (HIMAGELIST)SHGetFileInfo(L"C:\\",0,&shfi,sizeof(SHFILEINFO),SHGFI_SMALLICON | SHGFI_SYSICONINDEX),
+ LVSIL_SMALL);
+
+ ListView_SetImageList(GetDlgItem(hwnd,IDC_FILEMRU),
+ (HIMAGELIST)SHGetFileInfo(L"C:\\",0,&shfi,sizeof(SHFILEINFO),SHGFI_LARGEICON | SHGFI_SYSICONINDEX),
+ LVSIL_NORMAL);
+
+ //SetExplorerTheme(GetDlgItem(hwnd,IDC_FILEMRU));
+ ListView_SetExtendedListViewStyle(GetDlgItem(hwnd,IDC_FILEMRU),/*LVS_EX_FULLROWSELECT|*/LVS_EX_DOUBLEBUFFER|LVS_EX_LABELTIP);
+ ListView_InsertColumn(GetDlgItem(hwnd,IDC_FILEMRU),0,&lvc);
+
+ // Update view
+ SendMessage(hwnd,WM_COMMAND,MAKELONG(0x00A0,1),0);
+
+ if (bSaveRecentFiles)
+ CheckDlgButton(hwnd,IDC_SAVEMRU,BST_CHECKED);
+
+ CenterDlgInParent(hwnd);
+ }
+ return TRUE;
+
+
+ case WM_DESTROY:
+ {
+ LPICONTHREADINFO lpit = (LPVOID)GetProp(hwnd,L"it");
+ SetEvent(lpit->hExitThread);
+ while (WaitForSingleObject(lpit->hTerminatedThread,0) != WAIT_OBJECT_0) {
+ MSG msg;
+ if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+ CloseHandle(lpit->hExitThread);
+ CloseHandle(lpit->hTerminatedThread);
+ RemoveProp(hwnd,L"it");
+ GlobalFree(lpit);
+
+ bSaveRecentFiles = (IsDlgButtonChecked(hwnd,IDC_SAVEMRU)) ? 1 : 0;
+
+ ResizeDlg_Destroy(hwnd,&cxFileMRUDlg,&cyFileMRUDlg);
+ }
+ return FALSE;
+
+
+ case WM_SIZE:
+ {
+ int dx;
+ int dy;
+ HDWP hdwp;
+
+ ResizeDlg_Size(hwnd,lParam,&dx,&dy);
+
+ hdwp = BeginDeferWindowPos(5);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_RESIZEGRIP,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDOK,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDCANCEL,dx,dy,SWP_NOSIZE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_FILEMRU,dx,dy,SWP_NOMOVE);
+ hdwp = DeferCtlPos(hdwp,hwnd,IDC_SAVEMRU,0,dy,SWP_NOSIZE);
+ EndDeferWindowPos(hdwp);
+ ListView_SetColumnWidth(GetDlgItem(hwnd,IDC_FILEMRU),0,LVSCW_AUTOSIZE_USEHEADER);
+ }
+ return TRUE;
+
+
+ case WM_GETMINMAXINFO:
+ ResizeDlg_GetMinMaxInfo(hwnd,lPar