Click here to Skip to main content
15,892,674 members
Articles / Desktop Programming / MFC

Notepad RE (Regular Expressions)

Rate me:
Please Sign up or sign in to vote.
4.68/5 (107 votes)
22 Mar 2011CPOL9 min read 842.6K   8.5K   234  
Search and replace text in Notepad RE using Regular Expressions or normal mode. The editor supports drag and drop, file change notifications, and displays the line and column numbers. Unicode support is available too.
// notepadre.h : main header file for the NOTEPADRE application
//

#if !defined(AFX_NOTEPADRE_H__40872B48_B193_4751_9CED_B9C26B8435D8__INCLUDED_)
#define AFX_NOTEPADRE_H__40872B48_B193_4751_9CED_B9C26B8435D8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CNotepadreApp:
// See notepadre.cpp for the implementation of this class
//

class CNotepadreApp : public CWinApp
{
public:
	CNotepadreApp();
	int DoPrintDialog (CPrintDialog *pPD);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNotepadreApp)
	public:
	virtual BOOL InitInstance();
	virtual BOOL OnIdle(LONG lCount);
	virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName);
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CNotepadreApp)
	afx_msg void OnAppAbout();
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	void ParseCommandLine (CCommandLineInfo &rCmdInfo, bool &bReadOnly);
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NOTEPADRE_H__40872B48_B193_4751_9CED_B9C26B8435D8__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
I started programming in 1983 using Sinclair BASIC, then moved on to Z80 machine code and assembler. In 1988 I programmed 68000 assembler on the ATARI ST and it was 1990 when I started my degree in Computing Systems where I learnt Pascal, C and C++ as well as various academic programming languages (ML, LISP etc.)

I have been developing commercial software for Windows using C++ since 1994.

Comments and Discussions