1. Moved windows styles pertaining to the edit control to main.h

2.  Stopped using WS_BORDER on the edit control


svn path=/trunk/; revision=18040
This commit is contained in:
Nathan Woods 2005-09-25 00:35:13 +00:00
parent fd73ac02d7
commit 6e7b2b5af4
3 changed files with 8 additions and 6 deletions

View file

@ -617,8 +617,7 @@ VOID DIALOG_EditTimeDate(VOID)
VOID DIALOG_EditWrap(VOID)
{
static const WCHAR editW[] = { 'e','d','i','t',0 };
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |
ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL;
DWORD dwStyle;
RECT rc;
DWORD size;
LPWSTR pTemp;
@ -633,7 +632,7 @@ VOID DIALOG_EditWrap(VOID)
GetWindowText(Globals.hEdit, pTemp, size);
DestroyWindow(Globals.hEdit);
GetClientRect(Globals.hMainWnd, &rc);
if( Globals.bWrapLongLines ) dwStyle |= WS_HSCROLL | ES_AUTOHSCROLL;
dwStyle = Globals.bWrapLongLines ? EDIT_STYLE_WRAP : EDIT_STYLE;
Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, editW, NULL, dwStyle,
0, 0, rc.right, rc.bottom, Globals.hMainWnd,
NULL, Globals.hInstance, NULL);

View file

@ -222,9 +222,7 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
static const WCHAR editW[] = { 'e','d','i','t',0 };
RECT rc;
GetClientRect(hWnd, &rc);
Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, editW, NULL,
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL |
ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL,
Globals.hEdit = CreateWindowEx(EDIT_EXSTYLE, editW, NULL, EDIT_STYLE,
0, 0, rc.right, rc.bottom, hWnd,
NULL, Globals.hInstance, NULL);
break;

View file

@ -23,6 +23,11 @@
#include "notepad_res.h"
#define EDIT_STYLE (WS_CHILD | WS_VISIBLE | WS_VSCROLL \
| ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL)
#define EDIT_STYLE_WRAP (EDIT_STYLE | WS_HSCROLL | ES_AUTOHSCROLL)
#define EDIT_EXSTYLE (WS_EX_CLIENTEDGE)
#define MAX_STRING_LEN 255
#define ENCODING_ANSI 0