Commit 94719d43 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

- allow to save/restore some properties into the registry (like font,

cursor size...) - implement the two sets of properties (default & current) - fixed some bugs mainly in dialog - enhanced font selection mechanisms, - added and protected sub-menu for all operations (sysmenu is not avail in managed mode) - better data separation for the backend(s)
parent 3940d8a2
...@@ -7,6 +7,7 @@ MODULE = wineconsole ...@@ -7,6 +7,7 @@ MODULE = wineconsole
C_SRCS = \ C_SRCS = \
dialog.c \ dialog.c \
registry.c \
user.c \ user.c \
wineconsole.c wineconsole.c
......
/*
* an application for displaying Win32 console
* registry and init functions
*
* Copyright 2001 Eric Pouech
*/
#include "winbase.h"
#include "winreg.h"
#include "winecon_private.h"
static const WCHAR wszConsole[] = {'C','o','n','s','o','l','e',0};
static const WCHAR wszCursorSize[] = {'C','u','r','s','o','r','S','i','z','e',0};
static const WCHAR wszCursorVisible[] = {'C','u','r','s','o','r','V','i','s','i','b','l','e',0};
static const WCHAR wszFaceName[] = {'F','a','c','e','N','a','m','e',0};
static const WCHAR wszFontSize[] = {'F','o','n','t','S','i','z','e',0};
static const WCHAR wszFontWeight[] = {'F','o','n','t','W','e','i','g','h','t',0};
static const WCHAR wszHistoryBufferSize[] = {'H','i','s','t','o','r','y','B','u','f','f','e','r','S','i','z','e',0};
static const WCHAR wszMenuMask[] = {'M','e','n','u','M','a','s','k',0};
static const WCHAR wszScreenBufferSize[] = {'S','c','r','e','e','n','B','u','f','f','e','r','S','i','z','e',0};
static const WCHAR wszScreenColors[] = {'S','c','r','e','e','n','C','o','l','o','r','s',0};
static const WCHAR wszWindowSize[] = {'W','i','n','d','o','w','S','i','z','e',0};
/******************************************************************
* WINECON_RegLoad
*
*
*/
BOOL WINECON_RegLoad(struct config_data* cfg)
{
HKEY hConKey;
DWORD type;
DWORD count;
DWORD val;
if (RegOpenKey(HKEY_CURRENT_USER, wszConsole, &hConKey)) hConKey = 0;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszCursorSize, 0, &type, (char*)&val, &count))
val = 25;
cfg->cursor_size = val;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszCursorVisible, 0, &type, (char*)&val, &count))
val = 1;
cfg->cursor_visible = val;
count = sizeof(cfg->face_name);
if (!hConKey || RegQueryValueEx(hConKey, wszFaceName, 0, &type, (char*)&cfg->face_name, &count))
cfg->face_name[0] = 0;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszFontSize, 0, &type, (char*)&val, &count))
val = 0x000C0008;
cfg->cell_height = HIWORD(val);
cfg->cell_width = LOWORD(val);
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszFontWeight, 0, &type, (char*)&val, &count))
val = 0;
cfg->font_weight = val;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszHistoryBufferSize, 0, &type, (char*)&val, &count))
val = 0;
cfg->history_size = val;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszMenuMask, 0, &type, (char*)&val, &count))
val = 0;
cfg->menu_mask = val;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszScreenBufferSize, 0, &type, (char*)&val, &count))
val = 0x000C0008;
cfg->sb_height = HIWORD(val);
cfg->sb_width = LOWORD(val);
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszScreenColors, 0, &type, (char*)&val, &count))
val = 0x0007;
cfg->def_attr = val;
count = sizeof(val);
if (!hConKey || RegQueryValueEx(hConKey, wszWindowSize, 0, &type, (char*)&val, &count))
val = 0x000C0008;
cfg->win_height = HIWORD(val);
cfg->win_width = LOWORD(val);
/* win_pos isn't read from registry */
if (hConKey) RegCloseKey(hConKey);
return TRUE;
}
/******************************************************************
* WINECON_RegSave
*
*
*/
BOOL WINECON_RegSave(const struct config_data* cfg)
{
HKEY hConKey;
DWORD val;
if (RegCreateKey(HKEY_CURRENT_USER, wszConsole, &hConKey))
{
Trace(0, "Can't open registry for saving\n");
return FALSE;
}
val = cfg->cursor_size;
RegSetValueEx(hConKey, wszCursorSize, 0, REG_DWORD, (char*)&val, sizeof(val));
val = cfg->cursor_visible;
RegSetValueEx(hConKey, wszCursorVisible, 0, REG_DWORD, (char*)&val, sizeof(val));
RegSetValueEx(hConKey, wszFaceName, 0, REG_SZ, (char*)&cfg->face_name, sizeof(cfg->face_name));
val = MAKELONG(cfg->cell_width, cfg->cell_height);
RegSetValueEx(hConKey, wszFontSize, 0, REG_DWORD, (char*)&val, sizeof(val));
val = cfg->font_weight;
RegSetValueEx(hConKey, wszFontWeight, 0, REG_DWORD, (char*)&val, sizeof(val));
val = cfg->history_size;
RegSetValueEx(hConKey, wszHistoryBufferSize, 0, REG_DWORD, (char*)&val, sizeof(val));
val = cfg->menu_mask;
RegSetValueEx(hConKey, wszMenuMask, 0, REG_DWORD, (char*)&val, sizeof(val));
val = MAKELONG(cfg->sb_width, cfg->sb_height);
RegSetValueEx(hConKey, wszScreenBufferSize, 0, REG_DWORD, (char*)&val, sizeof(val));
val = cfg->def_attr;
RegSetValueEx(hConKey, wszScreenColors, 0, REG_DWORD, (char*)&val, sizeof(val));
val = MAKELONG(cfg->win_width, cfg->win_height);
RegSetValueEx(hConKey, wszWindowSize, 0, REG_DWORD, (char*)&val, sizeof(val));
RegCloseKey(hConKey);
return TRUE;
}
/*
* an application for displaying Win32 console
*
* Copyright 2001 Eric Pouech
*/
#include <winbase.h> #include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <wincon.h> #include <wincon.h>
#include "wineconsole_res.h" #include "wineconsole_res.h"
struct inner_data { /* this is the configuration stored & loaded into the registry */
struct config_data {
unsigned cell_width; /* width in pixels of a character */
unsigned cell_height; /* height in pixels of a character */
int cursor_size; /* in % of cell height */
int cursor_visible;
DWORD def_attr;
WCHAR face_name[32]; /* name of font (size is LF_FACESIZE) */
DWORD font_weight;
DWORD history_size;
DWORD menu_mask; /* MK_CONTROL MK_SHIFT mask to drive submenu opening */
unsigned sb_width; /* active screen buffer width */ unsigned sb_width; /* active screen buffer width */
unsigned sb_height; /* active screen buffer height */ unsigned sb_height; /* active screen buffer height */
CHAR_INFO* cells; /* local copy of cells (sb_width * sb_height) */
COORD win_pos; /* position (in cells) of visible part of screen buffer in window */
unsigned win_width; /* size (in cells) of visible part of window (width & height) */ unsigned win_width; /* size (in cells) of visible part of window (width & height) */
unsigned win_height; unsigned win_height;
COORD win_pos; /* position (in cells) of visible part of screen buffer in window */
};
struct inner_data {
struct config_data curcfg;
struct config_data defcfg;
CHAR_INFO* cells; /* local copy of cells (sb_width * sb_height) */
COORD cursor; /* position in cells of cursor */ COORD cursor; /* position in cells of cursor */
int cursor_visible;
int cursor_size; /* in % of cell height */
HANDLE hConIn; /* console input handle */ HANDLE hConIn; /* console input handle */
HANDLE hConOut; /* screen buffer handle: has to be changed when active sb changes */ HANDLE hConOut; /* screen buffer handle: has to be changed when active sb changes */
...@@ -31,19 +49,7 @@ struct inner_data { ...@@ -31,19 +49,7 @@ struct inner_data {
void (*fnScroll)(struct inner_data* data, int pos, BOOL horz); void (*fnScroll)(struct inner_data* data, int pos, BOOL horz);
void (*fnDeleteBackend)(struct inner_data* data); void (*fnDeleteBackend)(struct inner_data* data);
/* the following fields are only user by the USER backend (should be hidden in user) */ void* private; /* data part belonging to the choosen backed */
HWND hWnd; /* handle to windows for rendering */
HFONT hFont; /* font used for rendering, usually fixed */
LOGFONT logFont; /* logFont dscription for used hFont */
unsigned cell_width; /* width in pixels of a character */
unsigned cell_height; /* height in pixels of a character */
HDC hMemDC; /* memory DC holding the bitmap below */
HBITMAP hBitmap; /* bitmap of display window content */
HBITMAP cursor_bitmap; /* bitmap used for the caret */
BOOL hasSelection; /* a rectangular mouse selection has taken place */
COORD selectPt1; /* start (and end) point of a mouse selection */
COORD selectPt2;
}; };
# ifdef __GNUC__ # ifdef __GNUC__
...@@ -59,6 +65,7 @@ extern void XTracer(int level, const char* format, ...); ...@@ -59,6 +65,7 @@ extern void XTracer(int level, const char* format, ...);
# define Trace (1) ? (void)0 : XTracer # define Trace (1) ? (void)0 : XTracer
#endif #endif
/* from wineconsole.c */
extern void WINECON_NotifyWindowChange(struct inner_data* data); extern void WINECON_NotifyWindowChange(struct inner_data* data);
extern int WINECON_GetHistorySize(HANDLE hConIn); extern int WINECON_GetHistorySize(HANDLE hConIn);
extern BOOL WINECON_SetHistorySize(HANDLE hConIn, int size); extern BOOL WINECON_SetHistorySize(HANDLE hConIn, int size);
...@@ -68,8 +75,9 @@ extern BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len); ...@@ -68,8 +75,9 @@ extern BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len);
extern void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm); extern void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm);
extern int WINECON_GrabChanges(struct inner_data* data); extern int WINECON_GrabChanges(struct inner_data* data);
extern BOOL WCUSER_GetProperties(struct inner_data*); /* from registry.c */
extern BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* font, const TEXTMETRIC* tm); extern BOOL WINECON_RegLoad(struct config_data* cfg);
extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf); extern BOOL WINECON_RegSave(const struct config_data* cfg);
extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, const TEXTMETRIC* tm);
/* backends... */
extern BOOL WCUSER_InitBackend(struct inner_data* data); extern BOOL WCUSER_InitBackend(struct inner_data* data);
/*
* an application for displaying Win32 console
* USER32 backend
*
* Copyright 2001 Eric Pouech
*/
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include "winecon_private.h"
struct inner_data_user {
/* the following fields are only user by the USER backend (should be hidden in user) */
HWND hWnd; /* handle to windows for rendering */
HFONT hFont; /* font used for rendering, usually fixed */
HDC hMemDC; /* memory DC holding the bitmap below */
HBITMAP hBitmap; /* bitmap of display window content */
HMENU hPopMenu; /* popup menu triggered by right mouse click */
HBITMAP cursor_bitmap; /* bitmap used for the caret */
BOOL hasSelection; /* a rectangular mouse selection has taken place */
COORD selectPt1; /* start (and end) point of a mouse selection */
COORD selectPt2;
};
#define PRIVATE(data) ((struct inner_data_user*)((data)->private))
/* from user.c */
extern COLORREF WCUSER_ColorMap[16];
extern BOOL WCUSER_GetProperties(struct inner_data*, BOOL);
extern BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* font);
extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf);
extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, const TEXTMETRIC* tm);
extern BOOL WCUSER_AreFontsEqual(const struct config_data* config, const LOGFONT* lf);
extern void WCUSER_CopyFont(struct config_data* config, const LOGFONT* lf);
...@@ -19,7 +19,7 @@ void XTracer(int level, const char* format, ...) ...@@ -19,7 +19,7 @@ void XTracer(int level, const char* format, ...)
if (level > trace_level) return; if (level > trace_level) return;
va_start(valist, format); va_start(valist, format);
len = wvsnprintfA(buf, sizeof(buf), format, valist); len = vsnprintf(buf, sizeof(buf), format, valist);
va_end(valist); va_end(valist);
if (len <= -1) if (len <= -1)
...@@ -45,8 +45,8 @@ void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm) ...@@ -45,8 +45,8 @@ void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm)
req->y = upd_tp; req->y = upd_tp;
req->mode = CHAR_INFO_MODE_TEXTATTR; req->mode = CHAR_INFO_MODE_TEXTATTR;
req->wrap = TRUE; req->wrap = TRUE;
wine_server_set_reply( req, &data->cells[upd_tp * data->sb_width], wine_server_set_reply( req, &data->cells[upd_tp * data->curcfg.sb_width],
(upd_bm-upd_tp+1) * data->sb_width * sizeof(CHAR_INFO) ); (upd_bm-upd_tp+1) * data->curcfg.sb_width * sizeof(CHAR_INFO) );
wine_server_call( req ); wine_server_call( req );
} }
SERVER_END_REQ; SERVER_END_REQ;
...@@ -63,10 +63,10 @@ void WINECON_NotifyWindowChange(struct inner_data* data) ...@@ -63,10 +63,10 @@ void WINECON_NotifyWindowChange(struct inner_data* data)
SERVER_START_REQ( set_console_output_info ) SERVER_START_REQ( set_console_output_info )
{ {
req->handle = (handle_t)data->hConOut; req->handle = (handle_t)data->hConOut;
req->win_left = data->win_pos.X; req->win_left = data->curcfg.win_pos.X;
req->win_top = data->win_pos.Y; req->win_top = data->curcfg.win_pos.Y;
req->win_right = data->win_pos.X + data->win_width - 1; req->win_right = data->curcfg.win_pos.X + data->curcfg.win_width - 1;
req->win_bottom = data->win_pos.Y + data->win_height - 1; req->win_bottom = data->curcfg.win_pos.Y + data->curcfg.win_height - 1;
req->mask = SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW; req->mask = SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW;
wine_server_call( req ); wine_server_call( req );
} }
...@@ -223,15 +223,15 @@ int WINECON_GrabChanges(struct inner_data* data) ...@@ -223,15 +223,15 @@ int WINECON_GrabChanges(struct inner_data* data)
} }
break; break;
case CONSOLE_RENDERER_SB_RESIZE_EVENT: case CONSOLE_RENDERER_SB_RESIZE_EVENT:
if (data->sb_width != evts[i].u.resize.width || if (data->curcfg.sb_width != evts[i].u.resize.width ||
data->sb_height != evts[i].u.resize.height) data->curcfg.sb_height != evts[i].u.resize.height)
{ {
Trace(1, " resize(%d,%d)", evts[i].u.resize.width, evts[i].u.resize.height); Trace(1, " resize(%d,%d)", evts[i].u.resize.width, evts[i].u.resize.height);
data->sb_width = evts[i].u.resize.width; data->curcfg.sb_width = evts[i].u.resize.width;
data->sb_height = evts[i].u.resize.height; data->curcfg.sb_height = evts[i].u.resize.height;
data->cells = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, data->cells, data->cells = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, data->cells,
data->sb_width * data->sb_height * sizeof(CHAR_INFO)); data->curcfg.sb_width * data->curcfg.sb_height * sizeof(CHAR_INFO));
if (!data->cells) {Trace(0, "OOM\n"); exit(0);} if (!data->cells) {Trace(0, "OOM\n"); exit(0);}
data->fnResizeScreenBuffer(data); data->fnResizeScreenBuffer(data);
data->fnComputePositions(data); data->fnComputePositions(data);
...@@ -251,8 +251,8 @@ int WINECON_GrabChanges(struct inner_data* data) ...@@ -251,8 +251,8 @@ int WINECON_GrabChanges(struct inner_data* data)
} }
break; break;
case CONSOLE_RENDERER_CURSOR_GEOM_EVENT: case CONSOLE_RENDERER_CURSOR_GEOM_EVENT:
if (evts[i].u.cursor_geom.size != data->cursor_size || if (evts[i].u.cursor_geom.size != data->curcfg.cursor_size ||
evts[i].u.cursor_geom.visible != data->cursor_visible) evts[i].u.cursor_geom.visible != data->curcfg.cursor_visible)
{ {
data->fnShapeCursor(data, evts[i].u.cursor_geom.size, data->fnShapeCursor(data, evts[i].u.cursor_geom.size,
evts[i].u.cursor_geom.visible, FALSE); evts[i].u.cursor_geom.visible, FALSE);
...@@ -261,24 +261,24 @@ int WINECON_GrabChanges(struct inner_data* data) ...@@ -261,24 +261,24 @@ int WINECON_GrabChanges(struct inner_data* data)
} }
break; break;
case CONSOLE_RENDERER_DISPLAY_EVENT: case CONSOLE_RENDERER_DISPLAY_EVENT:
if (evts[i].u.display.left != data->win_pos.X) if (evts[i].u.display.left != data->curcfg.win_pos.X)
{ {
data->fnScroll(data, evts[i].u.display.left, TRUE); data->fnScroll(data, evts[i].u.display.left, TRUE);
data->fnPosCursor(data); data->fnPosCursor(data);
Trace(1, " h-scroll(%d)", evts[i].u.display.left); Trace(1, " h-scroll(%d)", evts[i].u.display.left);
} }
if (evts[i].u.display.top != data->win_pos.Y) if (evts[i].u.display.top != data->curcfg.win_pos.Y)
{ {
data->fnScroll(data, evts[i].u.display.top, FALSE); data->fnScroll(data, evts[i].u.display.top, FALSE);
data->fnPosCursor(data); data->fnPosCursor(data);
Trace(1, " v-scroll(%d)", evts[i].u.display.top); Trace(1, " v-scroll(%d)", evts[i].u.display.top);
} }
if (evts[i].u.display.width != data->win_width || if (evts[i].u.display.width != data->curcfg.win_width ||
evts[i].u.display.height != data->win_height) evts[i].u.display.height != data->curcfg.win_height)
{ {
Trace(1, " win-size(%d,%d)", evts[i].u.display.width, evts[i].u.display.height); Trace(1, " win-size(%d,%d)", evts[i].u.display.width, evts[i].u.display.height);
data->win_width = evts[i].u.display.width; data->curcfg.win_width = evts[i].u.display.width;
data->win_height = evts[i].u.display.height; data->curcfg.win_height = evts[i].u.display.height;
data->fnComputePositions(data); data->fnComputePositions(data);
} }
break; break;
...@@ -326,6 +326,10 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid) ...@@ -326,6 +326,10 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data)); data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data));
if (!data) return 0; if (!data) return 0;
/* load default registry settings, and copy them into our current configuration */
WINECON_RegLoad(&data->defcfg);
data->curcfg = data->defcfg;
/* the handles here are created without the whistles and bells required by console /* the handles here are created without the whistles and bells required by console
* (mainly because wineconsole doesn't need it) * (mainly because wineconsole doesn't need it)
* - there are not inheritable * - there are not inheritable
...@@ -351,9 +355,8 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid) ...@@ -351,9 +355,8 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
ret = !wine_server_call_err( req ); ret = !wine_server_call_err( req );
} }
SERVER_END_REQ; SERVER_END_REQ;
if (!ret) goto error;
if (ret)
{
SERVER_START_REQ(create_console_output) SERVER_START_REQ(create_console_output)
{ {
req->handle_in = (handle_t)data->hConIn; req->handle_in = (handle_t)data->hConIn;
...@@ -364,7 +367,6 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid) ...@@ -364,7 +367,6 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
} }
SERVER_END_REQ; SERVER_END_REQ;
if (data->hConOut) return data; if (data->hConOut) return data;
}
error: error:
WINECON_Delete(data); WINECON_Delete(data);
...@@ -386,8 +388,7 @@ static BOOL WINECON_Spawn(struct inner_data* data, LPCSTR lpCmdLine) ...@@ -386,8 +388,7 @@ static BOOL WINECON_Spawn(struct inner_data* data, LPCSTR lpCmdLine)
/* we're in the case wineconsole <exe> <options>... spawn the new process */ /* we're in the case wineconsole <exe> <options>... spawn the new process */
memset(&startup, 0, sizeof(startup)); memset(&startup, 0, sizeof(startup));
startup.cb = sizeof(startup); startup.cb = sizeof(startup);
startup.dwFlags = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES; startup.dwFlags = STARTF_USESTDHANDLES;
startup.wShowWindow = SW_SHOWNORMAL;
/* the attributes of wineconsole's handles are not adequate for inheritance, so /* the attributes of wineconsole's handles are not adequate for inheritance, so
* get them with the correct attributes before process creation * get them with the correct attributes before process creation
...@@ -421,6 +422,11 @@ static BOOL WINECON_Spawn(struct inner_data* data, LPCSTR lpCmdLine) ...@@ -421,6 +422,11 @@ static BOOL WINECON_Spawn(struct inner_data* data, LPCSTR lpCmdLine)
return done; return done;
} }
/******************************************************************
* WINECON_HasEvent
*
*
*/
static BOOL WINECON_HasEvent(LPCSTR ptr, unsigned *evt) static BOOL WINECON_HasEvent(LPCSTR ptr, unsigned *evt)
{ {
while (*ptr == ' ' || *ptr == '\t') ptr++; while (*ptr == ' ' || *ptr == '\t') ptr++;
......
...@@ -7,6 +7,6 @@ rsrc wineconsole_res.res ...@@ -7,6 +7,6 @@ rsrc wineconsole_res.res
import -delay comctl32 import -delay comctl32
import gdi32.dll import gdi32.dll
import user32.dll import user32.dll
#import advapi32.dll import advapi32.dll
import kernel32.dll import kernel32.dll
import ntdll.dll import ntdll.dll
...@@ -14,6 +14,8 @@ IDS_SEARCH, "S&earch" ...@@ -14,6 +14,8 @@ IDS_SEARCH, "S&earch"
IDS_FNT_DISPLAY, "Each character is %ld pixels wide on %ld pixels high" IDS_FNT_DISPLAY, "Each character is %ld pixels wide on %ld pixels high"
IDS_FNT_PREVIEW_1, "This is a test" IDS_FNT_PREVIEW_1, "This is a test"
IDS_FNT_PREVIEW_2, "" IDS_FNT_PREVIEW_2, ""
IDS_DLG_TIT_DEFAULT "Setup - Default settings"
IDS_DLG_TIT_CURRENT "Setup - Current settings"
END END
IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
...@@ -26,7 +28,11 @@ FONT 8, "Helv" ...@@ -26,7 +28,11 @@ FONT 8, "Helv"
AUTORADIOBUTTON "&Medium", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP AUTORADIOBUTTON "&Medium", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP
AUTORADIOBUTTON "&Large", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP AUTORADIOBUTTON "&Large", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP
GROUPBOX "Command history", -1, 10, 57, 180, 35, BS_GROUPBOX GROUPBOX "Conf. open", -1, 140, 11, 60, 44, BS_GROUPBOX
AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 144, 23, 50, 10, WS_TABSTOP
AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 144, 33, 50, 10, WS_TABSTOP
GROUPBOX "Command history", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Numbers of recalled commands :", -1, 14, 67, 78, 18 LTEXT "&Numbers of recalled commands :", -1, 14, 67, 78, 18
EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0 CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
...@@ -39,10 +45,13 @@ CAPTION " Font " ...@@ -39,10 +45,13 @@ CAPTION " Font "
FONT 8, "Helv" FONT 8, "Helv"
{ {
LTEXT "&Font", -1, 5, 5, 24, 8 LTEXT "&Font", -1, 5, 5, 24, 8
LISTBOX IDC_FNT_LIST_FONT, 5,18,109,42, LBS_SORT|WS_VSCROLL LISTBOX IDC_FNT_LIST_FONT, 5, 18, 90, 42, LBS_SORT|WS_VSCROLL
LTEXT "&Size", -1, 128, 5, 60, 8 LTEXT "&Color", -1, 100, 5, 50, 8
LISTBOX IDC_FNT_LIST_SIZE, 128, 18, 50, 60, WS_VSCROLL CONTROL "", IDC_FNT_COLOR_FG, "WineConColorPreview", 0L, 100, 18, 48, 16
CONTROL "", IDC_FNT_PREVIEW, "WineConFontPreview", 0L, 5,60,109,40 CONTROL "", IDC_FNT_COLOR_BK, "WineConColorPreview", 0L, 100, 40, 48, 16
LTEXT "&Size", -1, 158, 5, 40, 8
LISTBOX IDC_FNT_LIST_SIZE, 158, 18, 40, 60, WS_VSCROLL
CONTROL "", IDC_FNT_PREVIEW, "WineConFontPreview", 0L, 5, 60, 109, 40
LTEXT "", IDC_FNT_FONT_INFO, 128, 76, 80, 18 LTEXT "", IDC_FNT_FONT_INFO, 128, 76, 80, 18
} }
......
...@@ -14,6 +14,8 @@ IDS_SEARCH, "C&hercher" ...@@ -14,6 +14,8 @@ IDS_SEARCH, "C&hercher"
IDS_FNT_DISPLAY, "Chaque caractre a %ld points en largeur et %ld points en hauteur" IDS_FNT_DISPLAY, "Chaque caractre a %ld points en largeur et %ld points en hauteur"
IDS_FNT_PREVIEW_1, "Ceci est un test" IDS_FNT_PREVIEW_1, "Ceci est un test"
IDS_FNT_PREVIEW_2, "" IDS_FNT_PREVIEW_2, ""
IDS_DLG_TIT_DEFAULT "Configuration par dfault"
IDS_DLG_TIT_CURRENT "Configuration courante"
END END
IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105 LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105 LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
...@@ -26,7 +28,11 @@ FONT 8, "Helv" ...@@ -26,7 +28,11 @@ FONT 8, "Helv"
AUTORADIOBUTTON "&Moyen", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP AUTORADIOBUTTON "&Moyen", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP
AUTORADIOBUTTON "&Grand", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP AUTORADIOBUTTON "&Grand", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP
GROUPBOX "Historique des commandes", -1, 10, 57, 180, 35, BS_GROUPBOX GROUPBOX "Ouverture conf.", -1, 140, 11, 60, 44, BS_GROUPBOX
AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 144, 23, 50, 10, WS_TABSTOP
AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 144, 33, 50, 10, WS_TABSTOP
GROUPBOX "Historique des commandes", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Taille de la mmoire tampon :", -1, 14, 67, 78, 18 LTEXT "&Taille de la mmoire tampon :", -1, 14, 67, 78, 18
EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0 CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
...@@ -39,9 +45,12 @@ CAPTION " Police " ...@@ -39,9 +45,12 @@ CAPTION " Police "
FONT 8, "Helv" FONT 8, "Helv"
{ {
LTEXT "&Police", -1, 5, 5, 24, 8 LTEXT "&Police", -1, 5, 5, 24, 8
LISTBOX IDC_FNT_LIST_FONT, 5, 18, 109, 42, LBS_SORT|WS_VSCROLL LISTBOX IDC_FNT_LIST_FONT, 5, 18, 90, 42, LBS_SORT|WS_VSCROLL
LTEXT "&Taille", -1, 128, 5, 60, 8 LTEXT "&Couleur", -1, 100, 5, 50, 8
LISTBOX IDC_FNT_LIST_SIZE, 128, 18, 50, 60, WS_VSCROLL CONTROL "", IDC_FNT_COLOR_FG, "WineConColorPreview", 0L, 100, 18, 48, 16
CONTROL "", IDC_FNT_COLOR_BK, "WineConColorPreview", 0L, 100, 40, 48, 16
LTEXT "&Taille", -1, 158, 5, 40, 8
LISTBOX IDC_FNT_LIST_SIZE, 158, 18, 40, 60, WS_VSCROLL
CONTROL "", IDC_FNT_PREVIEW, "WineConFontPreview", 0L, 5, 60, 109, 40 CONTROL "", IDC_FNT_PREVIEW, "WineConFontPreview", 0L, 5, 60, 109, 40
LTEXT "", IDC_FNT_FONT_INFO, 128, 76, 80, 18 LTEXT "", IDC_FNT_FONT_INFO, 128, 76, 80, 18
} }
...@@ -68,5 +77,3 @@ FONT 8, "Helv" ...@@ -68,5 +77,3 @@ FONT 8, "Helv"
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0 CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
} }
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#define IDS_SCROLL 0x114 #define IDS_SCROLL 0x114
#define IDS_SEARCH 0x115 #define IDS_SEARCH 0x115
#define IDS_DLG_TIT_DEFAULT 0x120
#define IDS_DLG_TIT_CURRENT 0x121
#define IDS_FNT_DISPLAY 0x200 #define IDS_FNT_DISPLAY 0x200
#define IDS_FNT_PREVIEW_1 0x201 #define IDS_FNT_PREVIEW_1 0x201
#define IDS_FNT_PREVIEW_2 0x202 #define IDS_FNT_PREVIEW_2 0x202
...@@ -27,11 +30,15 @@ ...@@ -27,11 +30,15 @@
#define IDC_OPT_HIST_SIZE 0x0104 #define IDC_OPT_HIST_SIZE 0x0104
#define IDC_OPT_HIST_SIZE_UD 0x0105 #define IDC_OPT_HIST_SIZE_UD 0x0105
#define IDC_OPT_HIST_DOUBLE 0x0106 #define IDC_OPT_HIST_DOUBLE 0x0106
#define IDC_OPT_CONF_CTRL 0x0107
#define IDC_OPT_CONF_SHIFT 0x0108
#define IDC_FNT_LIST_FONT 0x0201 #define IDC_FNT_LIST_FONT 0x0201
#define IDC_FNT_LIST_SIZE 0x0202 #define IDC_FNT_LIST_SIZE 0x0202
#define IDC_FNT_FONT_INFO 0x0203 #define IDC_FNT_COLOR_BK 0x0203
#define IDC_FNT_PREVIEW 0x0204 #define IDC_FNT_COLOR_FG 0x0204
#define IDC_FNT_FONT_INFO 0x0205
#define IDC_FNT_PREVIEW 0x0206
#define IDC_CNF_SB_WIDTH 0x0301 #define IDC_CNF_SB_WIDTH 0x0301
#define IDC_CNF_SB_WIDTH_UD 0x0302 #define IDC_CNF_SB_WIDTH_UD 0x0302
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment