资源简介

这是Windows2000记事本源代码,学习C程序的好参考

资源截图

代码片段和文件信息

/*
 *   Notepad application
 *   Copyright (C) 1984-1995 Microsoft Inc.
 */


#include “precomp.h“
#include 

#define DeepTrouble() MessageBox(hwndNP szErrSpace szNN MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);

UINT     lGotoLine;                  /* line number to goto to */

TCHAR    chMerge;
HWND     hwndNP = 0;                 /* handle to notepad parent window    */
HWND     hwndEdit = 0;               /* handle to main text control item  */
HANDLE   hEdit;                      /* Handle to storage for edit item   */
HWND     hDlgFind = NULL;            /* handle to modeless FindText window */
HANDLE   hStdCursor;                 /* handle to arrow or beam cursor    */
HANDLE   hWaitCursor;                /* handle to hour glass cursor       */
HANDLE   hInstanceNP;                /* Module instance handle            */
HANDLE   hFont;                      /* handle to Unicode font            */
LOGFONT  FontStruct;                 /* font dialog structure             */
INT      iPointSize=120;             /* current point size unit=1/10 pts  */
TCHAR    szFileName[MAX_PATH+1];     /* Current notepad filename          */
TCHAR    szSearch[CCHKEYMAX];        /* Search string                     */
TCHAR    szReplace[CCHKEYMAX];       /* replace string                    */

BOOL     fUntitled = TRUE;           /* TRUE iff notepad has no title      */

HMENU hSysMenuSetup;                 /* Save Away for disabled Minimize   */

DWORD     dwEmSetHandle = 0;          /* Is EM_SETHANDLE in process?       */
HANDLE   hAccel;                     /* Handle to accelerator table       */
BOOL     fRunBySetup = FALSE;        /* Did SlipUp WinExec us??           */
BOOL     fWrap = 0;                  /* Flag for word wrap                */
TCHAR    szNotepad[] = TEXT(“Notepad“);/* Name of notepad window class       */

BOOL fInSaveAsDlg = FALSE;

/* variables for the new File/Open File/SaveasFind Text and Print dialogs */
OPENFILENAME OFN;                     /* passed to the File Open/save APIs */
TCHAR szOpenFilterSpec[CCHFILTERMAX]; /* default open filter spec          */
TCHAR szSaveFilterSpec[CCHFILTERMAX]; /* default save filter spec          */
NP_FILETYPE g_ftOpenedAs=FT_UNKNOWN;  /* current file was opened           */
NP_FILETYPE g_ftSaveAs;               /* current file was opened           */

FINDREPLACE FR;                       /* Passed to FindText()              */
PAGESETUPDLG g_PageSetupDlg;
UINT wFRMsg;                          /* message used in communicating     */
                                      /* with Find/Replace dialog          */

DWORD dwCurrentSelectionstart = 0L;      /* WM_ACTIVATEAPP selection pos */
DWORD dwCurrentSelectionEnd   = 0L;      /* WM_ACTIVATEAPP selection pos */
UINT wHlpMsg;                        /* message used in invoking help     */

/* Strings loaded from resource file passed to LoadString at initialization time */
/* To add reso

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        247  2000-07-25 18:05  notepad\makefile

     文件        247  2000-07-25 18:05  notepad\mkuni\makefile

     文件       6216  2000-07-25 18:05  notepad\mkuni\mkuni.c

     文件        615  2000-07-25 18:05  notepad\mkuni\mkuni.h

     文件        434  2000-07-25 18:05  notepad\mkuni\mkuni.rc

     文件     370569  2000-07-25 18:05  notepad\mkuni\names2.txt

     文件        294  2000-07-25 18:05  notepad\mkuni\sources

     文件          0  2001-11-18 05:26  notepad\mkuni\personal statement.eml

     文件      54760  2000-07-25 18:05  notepad\notepad.c

     文件        580  2000-07-25 18:05  notepad\notepad.def

     文件       3062  2000-07-25 18:05  notepad\notepad.dlg

     文件      11019  2000-07-25 18:05  notepad\notepad.h

     文件      10134  2000-07-25 18:05  notepad\notepad.ico

     文件       8081  2000-07-25 18:05  notepad\notepad.rc

     文件        549  2000-07-25 18:05  notepad\notepad.rcv

     文件       1078  2000-07-25 18:05  notepad\npapp.ico

     文件       1912  2000-07-25 18:05  notepad\npdate.c

     文件      25242  2000-07-25 18:05  notepad\npfile.c

     文件      36643  2000-07-25 18:05  notepad\npinit.c

     文件       9924  2000-07-25 18:05  notepad\npmisc.c

     文件      42296  2000-07-25 18:05  notepad\npprint.c

     文件       3936  2000-07-25 18:05  notepad\nputf.c

     文件        492  2000-07-25 18:05  notepad\precomp.h

     文件       1279  2000-07-25 18:05  notepad\sources

     文件          0  2001-11-18 05:26  notepad\registry_log_messages.eml

     文件          0  2001-11-18 05:26  notepad\ronen-cv.eml

     目录          0  2001-11-18 05:26  notepad\mkuni

     目录          0  2001-11-18 05:26  notepad

----------- ---------  ---------- -----  ----

               589609                    28

............此处省略1个文件信息

评论

共有 条评论