mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
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:
parent
fd73ac02d7
commit
6e7b2b5af4
3 changed files with 8 additions and 6 deletions
|
@ -617,8 +617,7 @@ VOID DIALOG_EditTimeDate(VOID)
|
||||||
VOID DIALOG_EditWrap(VOID)
|
VOID DIALOG_EditWrap(VOID)
|
||||||
{
|
{
|
||||||
static const WCHAR editW[] = { 'e','d','i','t',0 };
|
static const WCHAR editW[] = { 'e','d','i','t',0 };
|
||||||
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |
|
DWORD dwStyle;
|
||||||
ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL;
|
|
||||||
RECT rc;
|
RECT rc;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
LPWSTR pTemp;
|
LPWSTR pTemp;
|
||||||
|
@ -633,7 +632,7 @@ VOID DIALOG_EditWrap(VOID)
|
||||||
GetWindowText(Globals.hEdit, pTemp, size);
|
GetWindowText(Globals.hEdit, pTemp, size);
|
||||||
DestroyWindow(Globals.hEdit);
|
DestroyWindow(Globals.hEdit);
|
||||||
GetClientRect(Globals.hMainWnd, &rc);
|
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,
|
Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, editW, NULL, dwStyle,
|
||||||
0, 0, rc.right, rc.bottom, Globals.hMainWnd,
|
0, 0, rc.right, rc.bottom, Globals.hMainWnd,
|
||||||
NULL, Globals.hInstance, NULL);
|
NULL, Globals.hInstance, NULL);
|
||||||
|
|
|
@ -222,9 +222,7 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||||
static const WCHAR editW[] = { 'e','d','i','t',0 };
|
static const WCHAR editW[] = { 'e','d','i','t',0 };
|
||||||
RECT rc;
|
RECT rc;
|
||||||
GetClientRect(hWnd, &rc);
|
GetClientRect(hWnd, &rc);
|
||||||
Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, editW, NULL,
|
Globals.hEdit = CreateWindowEx(EDIT_EXSTYLE, editW, NULL, EDIT_STYLE,
|
||||||
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL |
|
|
||||||
ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL,
|
|
||||||
0, 0, rc.right, rc.bottom, hWnd,
|
0, 0, rc.right, rc.bottom, hWnd,
|
||||||
NULL, Globals.hInstance, NULL);
|
NULL, Globals.hInstance, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
|
|
||||||
#include "notepad_res.h"
|
#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 MAX_STRING_LEN 255
|
||||||
|
|
||||||
#define ENCODING_ANSI 0
|
#define ENCODING_ANSI 0
|
||||||
|
|
Loading…
Reference in a new issue