ciderpress/util/MyEdit.h
Andy McFadden 63b9996009 Normalize indentation and EOL
This updates all source files to use spaces instead of tabs for
indentation.  It also normalizes the end-of-line markers to be
Windows-style CRLF, and ensures that all files end with EOL.

No substantive changes were made; "diff -w" is empty.
2014-11-03 16:26:53 -08:00

55 lines
1.3 KiB
C++

/*
* CiderPress
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
* See the file LICENSE for distribution terms.
*/
/*
* My edit class.
*/
#ifndef __MYEDIT__
#define __MYEDIT__
/*
* Replace the edit box in a dialog with this code by calling MyEdit's
* ReplaceDlgCtrl(this, ID) from the dialog's OnInitDialog. This class will
* take over support for that control.
*/
class MyEdit : public CEdit {
public:
MyEdit(void) {
fCapsOnly = fHexOnly = fNoWhiteSpace = false;
}
virtual ~MyEdit(void) {
Detach(); // it's not really our window
}
/* don't allow creation of a window */
int Create(LPCTSTR, LPCTSTR, DWORD, const RECT&, CWnd*, UINT, CCreateContext*) {
ASSERT(false);
return FALSE;
}
int Create(LPCTSTR, DWORD, const RECT&, CWnd*, UINT) {
ASSERT(false);
return FALSE;
}
enum {
kCapsOnly = 0x01,
kHexOnly = 0x02,
kNoWhiteSpace = 0x04,
};
virtual void SetProperties(int props);
virtual BOOL ReplaceDlgCtrl(CDialog* pDialog, int editID);
private:
virtual BOOL PreTranslateMessage(MSG* pMsg);
bool fCapsOnly;
bool fHexOnly;
bool fNoWhiteSpace;
//DECLARE_MESSAGE_MAP()
};
#endif /*__MYEDIT__*/