Commit 0589f726 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Added configuration on per application basis.

Added ability to override part of the configuration from console creator. Revisited a bit wineconsole startup. Added dialog part for window closing at process termination.
parent d7d98364
......@@ -36,6 +36,8 @@ COLORREF WCUSER_ColorMap[16] =
RGB(0xFF, 0x00, 0x00), RGB(0xFF, 0x00, 0xFF), RGB(0xFF, 0xFF, 0x00), RGB(0xFF, 0xFF, 0xFF),
};
static BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* font);
/******************************************************************
* WCUSER_FillMemDC
*
......@@ -54,8 +56,11 @@ static void WCUSER_FillMemDC(const struct inner_data* data, int upd_tp, int upd_
*/
if (!PRIVATE(data)->hFont) return;
/* FIXME: could set up a mechanism to reuse the line between different
* calls to this function
*/
if (!(line = HeapAlloc(GetProcessHeap(), 0, data->curcfg.sb_width * sizeof(WCHAR))))
{WINE_ERR("OOM\n"); return;}
WINECON_Fatal("OOM\n");
hOldFont = SelectObject(PRIVATE(data)->hMemDC, PRIVATE(data)->hFont);
for (j = upd_tp; j <= upd_bm; j++)
......@@ -85,7 +90,7 @@ static void WCUSER_FillMemDC(const struct inner_data* data, int upd_tp, int upd_
* Either the font geometry or the sb geometry has changed. we need
* to recreate the bitmap geometry.
*/
static void WCUSER_NewBitmap(struct inner_data* data, BOOL fill)
static void WCUSER_NewBitmap(struct inner_data* data)
{
HDC hDC;
HBITMAP hnew, hold;
......@@ -107,8 +112,7 @@ static void WCUSER_NewBitmap(struct inner_data* data, BOOL fill)
WINE_FIXME("leak\n");
}
PRIVATE(data)->hBitmap = hnew;
if (fill)
WCUSER_FillMemDC(data, 0, data->curcfg.sb_height - 1);
WCUSER_FillMemDC(data, 0, data->curcfg.sb_height - 1);
}
/******************************************************************
......@@ -118,7 +122,7 @@ static void WCUSER_NewBitmap(struct inner_data* data, BOOL fill)
*/
static void WCUSER_ResizeScreenBuffer(struct inner_data* data)
{
WCUSER_NewBitmap(data, FALSE);
WCUSER_NewBitmap(data);
}
/******************************************************************
......@@ -140,7 +144,7 @@ static void WCUSER_PosCursor(const struct inner_data* data)
*
* Sets a new shape for the cursor
*/
void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force)
static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force)
{
if (force || size != data->curcfg.cursor_size)
{
......@@ -155,7 +159,7 @@ void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force)
w16b = ((data->curcfg.cell_width + 15) & ~15) / 8;
ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, w16b * data->curcfg.cell_height);
if (!ptr) {WINE_ERR("OOM\n"); return;}
if (!ptr) WINECON_Fatal("OOM");
nbl = max((data->curcfg.cell_height * size) / 100, 1);
for (j = data->curcfg.cell_height - nbl; j < data->curcfg.cell_height; j++)
{
......@@ -190,6 +194,7 @@ void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force)
}
}
}
WINECON_DumpConfig("crsr", &data->curcfg);
}
/******************************************************************
......@@ -207,11 +212,7 @@ void WCUSER_ComputePositions(struct inner_data* data)
r.right = data->curcfg.win_width * data->curcfg.cell_width;
r.bottom = data->curcfg.win_height * data->curcfg.cell_height;
if (IsRectEmpty(&r))
{
ShowWindow(PRIVATE(data)->hWnd, SW_HIDE);
return;
}
if (IsRectEmpty(&r)) return;
AdjustWindowRect(&r, GetWindowLong(PRIVATE(data)->hWnd, GWL_STYLE), FALSE);
......@@ -243,7 +244,7 @@ void WCUSER_ComputePositions(struct inner_data* data)
}
SetWindowPos(PRIVATE(data)->hWnd, 0, 0, 0, r.right - r.left + dx, r.bottom - r.top + dy,
SWP_NOMOVE|SWP_NOZORDER|SWP_SHOWWINDOW);
SWP_NOMOVE|SWP_NOZORDER);
WCUSER_ShapeCursor(data, data->curcfg.cursor_size, data->curcfg.cursor_visible, TRUE);
WCUSER_PosCursor(data);
}
......@@ -367,18 +368,21 @@ static int CALLBACK get_first_font_enum_2(const LOGFONT* lf, const TEXTMETRIC* t
mlf.lfHeight = fc->data->curcfg.cell_height;
if (WCUSER_SetFont(fc->data, &mlf))
{
struct config_data defcfg;
WCUSER_DumpLogFont("InitChoosing: ", &mlf, FontType);
fc->done = 1;
/* since we've modified the current config with new font information,
* set this information as the new default.
*/
fc->data->defcfg.cell_width = fc->data->curcfg.cell_width;
fc->data->defcfg.cell_height = fc->data->curcfg.cell_height;
lstrcpyW(fc->data->defcfg.face_name, fc->data->curcfg.face_name);
WINECON_RegLoad(NULL, &defcfg);
defcfg.cell_width = fc->data->curcfg.cell_width;
defcfg.cell_height = fc->data->curcfg.cell_height;
lstrcpyW(defcfg.face_name, fc->data->curcfg.face_name);
/* Force also its writing back to the registry so that we can get it
* the next time.
*/
WINECON_RegSave(&fc->data->defcfg);
WINECON_RegSave(&defcfg);
return 0;
}
}
......@@ -510,7 +514,7 @@ BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* logfont)
PRIVATE(data)->hFont = hFont;
WCUSER_ComputePositions(data);
WCUSER_NewBitmap(data, TRUE);
WCUSER_NewBitmap(data);
InvalidateRect(PRIVATE(data)->hWnd, NULL, FALSE);
UpdateWindow(PRIVATE(data)->hWnd);
......@@ -518,30 +522,27 @@ BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* logfont)
}
/******************************************************************
* WCUSER_InitFont
* WCUSER_SetFontPmt
*
* create a hFont from the settings saved in registry...
* (called on init, assuming no font has been created before)
* Sets a new font for the console.
* In fact a wrapper for WCUSER_SetFont
*/
static BOOL WCUSER_InitFont(struct inner_data* data)
static void WCUSER_SetFontPmt(struct inner_data* data, const WCHAR* font,
unsigned height, unsigned weight)
{
LOGFONT lf;
struct font_chooser fc;
WINE_TRACE_(wc_font)("=> %s\n", wine_dbgstr_wn(data->curcfg.face_name, -1));
if (data->curcfg.face_name[0] != '\0' &&
data->curcfg.cell_height != 0 &&
data->curcfg.font_weight != 0)
{
LOGFONT lf;
WCUSER_FillLogFont(&lf, data->curcfg.face_name,
data->curcfg.cell_height, data->curcfg.font_weight);
if (PRIVATE(data)->hFont != 0) WINE_FIXME("Oh strange\n");
WINE_TRACE_(wc_font)("=> %s h=%u w=%u\n",
wine_dbgstr_wn(font, -1), height, weight);
if (font[0] != '\0' && height != 0 && weight != 0)
{
WCUSER_FillLogFont(&lf, font, height, weight);
if (WCUSER_SetFont(data, &lf))
{
WCUSER_DumpLogFont("InitReuses: ", &lf, 0);
return TRUE;
return;
}
}
......@@ -550,8 +551,7 @@ static BOOL WCUSER_InitFont(struct inner_data* data)
fc.data = data;
fc.done = 0;
EnumFontFamilies(PRIVATE(data)->hMemDC, NULL, get_first_font_enum, (LPARAM)&fc);
if (!fc.done) WINE_WARN("Couldn't find a decent font, aborting\n");
return fc.done;
if (!fc.done) WINECON_Fatal("Couldn't find a decent font, aborting\n");
}
/******************************************************************
......@@ -858,8 +858,6 @@ static LRESULT WCUSER_Create(HWND hWnd, LPCREATESTRUCT lpcs)
SetWindowLong(hWnd, 0L, (DWORD)data);
PRIVATE(data)->hWnd = hWnd;
data->curcfg.cursor_size = 101; /* invalid value, will trigger a complete cleanup */
hSysMenu = GetSystemMenu(hWnd, FALSE);
if (!hSysMenu) return 0;
PRIVATE(data)->hPopMenu = CreatePopupMenu();
......@@ -1343,9 +1341,10 @@ static int WCUSER_MainLoop(struct inner_data* data)
{
MSG msg;
ShowWindow(PRIVATE(data)->hWnd, SW_SHOW);
for (;;)
{
switch(MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
switch (MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
{
case WAIT_OBJECT_0:
if (!WINECON_GrabChanges(data) && data->curcfg.exit_on_die)
......@@ -1392,6 +1391,7 @@ BOOL WCUSER_InitBackend(struct inner_data* data)
data->fnRefresh = WCUSER_Refresh;
data->fnResizeScreenBuffer = WCUSER_ResizeScreenBuffer;
data->fnSetTitle = WCUSER_SetTitle;
data->fnSetFont = WCUSER_SetFontPmt;
data->fnScroll = WCUSER_Scroll;
data->fnDeleteBackend = WCUSER_DeleteBackend;
......@@ -1413,10 +1413,5 @@ BOOL WCUSER_InitBackend(struct inner_data* data)
CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, 0, 0, wndclass.hInstance, data);
if (!PRIVATE(data)->hWnd) return FALSE;
/* force update of current data */
if (!WINECON_GrabChanges(data)) return FALSE;
if (!WCUSER_InitFont(data)) return FALSE;
return TRUE;
}
......@@ -32,7 +32,8 @@ struct config_data {
DWORD def_attr;
WCHAR face_name[32]; /* name of font (size is LF_FACESIZE) */
DWORD font_weight;
DWORD history_size;
DWORD history_size; /* number of commands in history buffer */
DWORD history_nodup; /* TRUE if commands are not stored twice in buffer */
DWORD menu_mask; /* MK_CONTROL MK_SHIFT mask to drive submenu opening */
DWORD quick_edit; /* whether mouse ops are sent to app (false) or used for content selection (true) */
unsigned sb_width; /* active screen buffer width */
......@@ -41,11 +42,11 @@ struct config_data {
unsigned win_height;
COORD win_pos; /* position (in cells) of visible part of screen buffer in window */
BOOL exit_on_die; /* whether the wineconsole should quit if server destroys the console */
WCHAR* registry; /* <x> part of HKLU\\<x>\\Console where config is read from (NULL if default settings) */
};
struct inner_data {
struct config_data curcfg;
struct config_data defcfg;
CHAR_INFO* cells; /* local copy of cells (sb_width * sb_height) */
......@@ -63,12 +64,14 @@ struct inner_data {
void (*fnResizeScreenBuffer)(struct inner_data* data);
void (*fnSetTitle)(const struct inner_data* data);
void (*fnScroll)(struct inner_data* data, int pos, BOOL horz);
void (*fnSetFont)(struct inner_data* data, const WCHAR* font, unsigned height, unsigned weight);
void (*fnDeleteBackend)(struct inner_data* data);
void* private; /* data part belonging to the choosen backed */
};
/* from wineconsole.c */
extern void WINECON_Fatal(const char* msg);
extern void WINECON_NotifyWindowChange(struct inner_data* data);
extern int WINECON_GetHistorySize(HANDLE hConIn);
extern BOOL WINECON_SetHistorySize(HANDLE hConIn, int size);
......@@ -77,10 +80,13 @@ extern BOOL WINECON_SetHistoryMode(HANDLE hConIn, int mode);
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 int WINECON_GrabChanges(struct inner_data* data);
extern VOID WINECON_SetConfig(struct inner_data* data,
const struct config_data* cfg, BOOL force);
/* from registry.c */
extern BOOL WINECON_RegLoad(struct config_data* cfg);
extern BOOL WINECON_RegSave(const struct config_data* cfg);
extern void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg);
extern void WINECON_RegSave(const struct config_data* cfg);
extern void WINECON_DumpConfig(const char* pfx, const struct config_data* cfg);
/* backends... */
extern BOOL WCUSER_InitBackend(struct inner_data* data);
extern BOOL WCCURSE_InitBackend(struct inner_data* data);
......@@ -43,7 +43,6 @@ struct inner_data_user {
/* 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, DWORD fontType);
......
......@@ -57,7 +57,7 @@ FONT 8, "Helv"
LTEXT "&Anzahl gemerkter Befehle :", -1, 14, 67, 78, 18
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
AUTOCHECKBOX "&Entferne doppelte", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
AUTOCHECKBOX "&Entferne doppelte", IDC_OPT_HIST_NODOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
}
IDD_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
......@@ -81,19 +81,35 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Konfiguration "
FONT 8, "Helv"
{
GROUPBOX "Pufferbereich", -1, 10, 11, 110, 42, BS_GROUPBOX
GROUPBOX "Pufferbereich", -1, 10, 11, 100, 42, BS_GROUPBOX
LTEXT "&Breite :", -1, 14, 25, 54, 9
EDITTEXT IDC_CNF_SB_WIDTH, 78, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_SB_WIDTH, 68, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "&Hhe :", -1, 14, 39, 54, 9
EDITTEXT IDC_CNF_SB_HEIGHT, 78, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_SB_HEIGHT, 68, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "Fenstergrsse", -1, 10, 55, 110, 42
GROUPBOX "Fenstergrsse", -1, 10, 55, 100, 42
LTEXT "Brei&te :", -1, 14, 69, 54, 9
EDITTEXT IDC_CNF_WIN_WIDTH, 78, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_WIN_WIDTH, 68, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "Hh&e :", -1, 14, 83, 54, 9
EDITTEXT IDC_CNF_WIN_HEIGHT, 78, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_WIN_HEIGHT, 68, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "End of program", -1, 115, 11, 80, 42, BS_GROUPBOX
AUTOCHECKBOX "&Close console", IDC_CNF_CLOSE_EXIT, 119, 25, 75, 20, WS_TABSTOP
}
IDD_SAVE_SETTINGS DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 140, 60
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Console parameters"
FONT 8, "Helv"
{
GROUPBOX "", -1, 10, 10, 120, 31, BS_GROUPBOX
AUTORADIOBUTTON "Retain these settings for later sessions", IDC_SAV_SAVE, 14, 15, 110, 10, WS_TABSTOP
AUTORADIOBUTTON "Modify only current session", IDC_SAV_SESSION, 14, 27, 110, 10, WS_TABSTOP
PUSHBUTTON "OK", IDOK, 20, 45, 35, 12
PUSHBUTTON "Cancel", IDCANCEL, 65, 45, 35, 12
}
......@@ -57,7 +57,7 @@ FONT 8, "Helv"
LTEXT "&Number of recalled commands :", -1, 14, 67, 78, 18
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
AUTOCHECKBOX "&Remove doubles", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
AUTOCHECKBOX "&Remove doubles", IDC_OPT_HIST_NODOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
}
IDD_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
......@@ -81,19 +81,35 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Configuration "
FONT 8, "Helv"
{
GROUPBOX "Buffer zone", -1, 10, 11, 110, 42, BS_GROUPBOX
GROUPBOX "Buffer zone", -1, 10, 11, 100, 42, BS_GROUPBOX
LTEXT "&Width :", -1, 14, 25, 54, 9
EDITTEXT IDC_CNF_SB_WIDTH, 78, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_SB_WIDTH, 68, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "&Height :", -1, 14, 39, 54, 9
EDITTEXT IDC_CNF_SB_HEIGHT, 78, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_SB_HEIGHT, 68, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "Window size", -1, 10, 55, 110, 42
GROUPBOX "Window size", -1, 10, 55, 100, 42
LTEXT "W&idth :", -1, 14, 69, 54, 9
EDITTEXT IDC_CNF_WIN_WIDTH, 78, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_WIN_WIDTH, 68, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "H&eight :", -1, 14, 83, 54, 9
EDITTEXT IDC_CNF_WIN_HEIGHT, 78, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_WIN_HEIGHT, 68, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "End of program", -1, 115, 11, 80, 42, BS_GROUPBOX
AUTOCHECKBOX "&Close console", IDC_CNF_CLOSE_EXIT, 119, 25, 75, 20, WS_TABSTOP
}
IDD_SAVE_SETTINGS DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 140, 60
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Console parameters"
FONT 8, "Helv"
{
GROUPBOX "", -1, 10, 10, 120, 31, BS_GROUPBOX
AUTORADIOBUTTON "Retain these settings for later sessions", IDC_SAV_SAVE, 14, 15, 110, 10, WS_TABSTOP
AUTORADIOBUTTON "Modify only current session", IDC_SAV_SESSION, 14, 27, 110, 10, WS_TABSTOP
PUSHBUTTON "OK", IDOK, 20, 45, 35, 12
PUSHBUTTON "Cancel", IDCANCEL, 65, 45, 35, 12
}
......@@ -57,7 +57,7 @@ FONT 8, "Helv"
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
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
AUTOCHECKBOX "&Supprimer les doublons", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
AUTOCHECKBOX "&Supprimer les doublons", IDC_OPT_HIST_NODOUBLE, 130, 67, 60, 18, WS_TABSTOP|BS_MULTILINE
}
IDD_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
......@@ -81,19 +81,35 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Configuration "
FONT 8, "Helv"
{
GROUPBOX "Taille mmoire tampon cran", -1, 10, 11, 110, 42, BS_GROUPBOX
GROUPBOX "Taille mmoire tampon cran", -1, 10, 11, 100, 42, BS_GROUPBOX
LTEXT "&Largeur :", -1, 14, 25, 54, 9
EDITTEXT IDC_CNF_SB_WIDTH, 78, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_SB_WIDTH, 68, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "Ha&uteur :", -1, 14, 39, 54, 9
EDITTEXT IDC_CNF_SB_HEIGHT, 78, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_SB_HEIGHT, 68, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "Taille de la fentre", -1, 10, 55, 110, 42
GROUPBOX "Taille de la fentre", -1, 10, 55, 100, 42
LTEXT "La&rgeur :", -1, 14, 69, 54, 9
EDITTEXT IDC_CNF_WIN_WIDTH, 78, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_WIN_WIDTH, 68, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "Hau&teur :", -1, 14, 83, 54, 9
EDITTEXT IDC_CNF_WIN_HEIGHT, 78, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
EDITTEXT IDC_CNF_WIN_HEIGHT, 68, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "Fin du programme", -1, 115, 11, 80, 42, BS_GROUPBOX
AUTOCHECKBOX "&Fermer la console", IDC_CNF_CLOSE_EXIT, 119, 25, 75, 20, WS_TABSTOP
}
IDD_SAVE_SETTINGS DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 200, 60
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Paramtres de la console"
FONT 8, "Helv"
{
GROUPBOX "", -1, 10, 10, 180, 31, BS_GROUPBOX
AUTORADIOBUTTON "Sauver les paramtres pour les prochaines sessions", IDC_SAV_SAVE, 14, 15, 170, 10, WS_TABSTOP
AUTORADIOBUTTON "Appliquer uniquement la session courante", IDC_SAV_SESSION, 14, 27, 170, 10, WS_TABSTOP
PUSHBUTTON "OK", IDOK, 50, 45, 35, 12
PUSHBUTTON "Annuler", IDCANCEL, 115, 45, 35, 12
}
......@@ -37,17 +37,19 @@
#define IDS_FNT_PREVIEW_1 0x201
#define IDS_FNT_PREVIEW_2 0x202
/* dialog boxes */
#define IDD_OPTION 0x0100
#define IDD_FONT 0x0200
#define IDD_CONFIG 0x0300
#define IDD_SAVE_SETTINGS 0x0400
/* dialog boxes */
/* dialog boxes controls */
#define IDC_OPT_CURSOR_SMALL 0x0101
#define IDC_OPT_CURSOR_MEDIUM 0x0102
#define IDC_OPT_CURSOR_LARGE 0x0103
#define IDC_OPT_HIST_SIZE 0x0104
#define IDC_OPT_HIST_SIZE_UD 0x0105
#define IDC_OPT_HIST_DOUBLE 0x0106
#define IDC_OPT_HIST_NODOUBLE 0x0106
#define IDC_OPT_CONF_CTRL 0x0107
#define IDC_OPT_CONF_SHIFT 0x0108
#define IDC_OPT_QUICK_EDIT 0x0109
......@@ -67,3 +69,7 @@
#define IDC_CNF_WIN_WIDTH_UD 0x0306
#define IDC_CNF_WIN_HEIGHT 0x0307
#define IDC_CNF_WIN_HEIGHT_UD 0x0308
#define IDC_CNF_CLOSE_EXIT 0x0309
#define IDC_SAV_SAVE 0x0401
#define IDC_SAV_SESSION 0x0402
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