mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
Replace dropdowns in limited-hint dialog with spinners. Combine flags
for spinners into a macro to guarantee all same.
This commit is contained in:
parent
6a6ce44a59
commit
ee820361e2
3 changed files with 31 additions and 20 deletions
|
@ -30,10 +30,10 @@ initComboBox( HWND hDlg, XP_U16 id, XP_U16 startVal )
|
|||
wchar_t str[4];
|
||||
swprintf( str, L"%d", i );
|
||||
|
||||
SendDlgItemMessage( hDlg, id, CB_ADDSTRING, 0, (long)str );
|
||||
SendDlgItemMessage( hDlg, id, ADDSTRING, 0, (long)str );
|
||||
|
||||
if ( i == startVal ) {
|
||||
SendDlgItemMessage( hDlg, id, CB_SETCURSEL, i-1, 0L );
|
||||
SendDlgItemMessage( hDlg, id, SETCURSEL, i-1, 0L );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ static XP_U16
|
|||
getComboValue( HWND hDlg, XP_U16 id )
|
||||
{
|
||||
LONG result;
|
||||
result = SendDlgItemMessage( hDlg, id, CB_GETCURSEL, 0, 0L );
|
||||
result = SendDlgItemMessage( hDlg, id, GETCURSEL, 0, 0L );
|
||||
if ( result == CB_ERR ) {
|
||||
result = 1;
|
||||
}
|
||||
|
|
|
@ -172,6 +172,8 @@
|
|||
#define IDC_PHONIESUPDOWN 1116
|
||||
#define IDC_SVGM_UPDOWN 1117
|
||||
#define IDC_ASKBLANK_UPDOWN 1124
|
||||
#define HC_MIN_UPDOWN 1125
|
||||
#define HC_MAX_UPDOWN 1126
|
||||
|
||||
|
||||
#define IDC_SVGM_SELLAB 1118
|
||||
|
@ -243,7 +245,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 125
|
||||
#define _APS_NEXT_COMMAND_VALUE 40033
|
||||
#define _APS_NEXT_CONTROL_VALUE 1125
|
||||
#define _APS_NEXT_CONTROL_VALUE 1127
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -163,6 +163,12 @@ BEGIN
|
|||
END
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
# define SPINNER_CONTROL_FLAGS \
|
||||
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_WRAP | /*UDS_ARROWKEYS |*/\
|
||||
UDS_SETBUDDYINT | UDS_EXPANDABLE | UDS_NOSCROLL
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
|
@ -247,9 +253,7 @@ BEGIN
|
|||
LTEXT "",IDC_TOTAL_LABEL,LEFT_COL,NPLAYERS_ROW,43,8
|
||||
#ifdef _WIN32_WCE
|
||||
LISTBOX IDC_NPLAYERSCOMBO, 46, NPLAYERS_ROW, 24, 12, WS_TABSTOP
|
||||
CONTROL "", IDC_NPLAYERSUPDOWN, UPDOWN_CLASS,
|
||||
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_WRAP | /* UDS_ARROWKEYS | */
|
||||
UDS_SETBUDDYINT | UDS_EXPANDABLE | UDS_NOSCROLL,
|
||||
CONTROL "", IDC_NPLAYERSUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX IDC_NPLAYERSCOMBO,46,NPLAYERS_ROW,24,58,CBS_DROPDOWNLIST |
|
||||
|
@ -309,9 +313,7 @@ BEGIN
|
|||
SS_NOPREFIX
|
||||
#ifdef _WIN32_WCE
|
||||
LISTBOX IDC_DICTLIST, LEFT_COL+10,DICTPICK_ROW,70,12, WS_TABSTOP
|
||||
CONTROL "", IDC_DICTUPDOWN, UPDOWN_CLASS,
|
||||
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_WRAP | /* UDS_ARROWKEYS | */
|
||||
UDS_SETBUDDYINT | UDS_EXPANDABLE | UDS_NOSCROLL,
|
||||
CONTROL "", IDC_DICTUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX IDC_DICTLIST,LEFT_COL+10,DICTPICK_ROW,70,58,
|
||||
|
@ -366,9 +368,7 @@ BEGIN
|
|||
|
||||
#ifdef _WIN32_WCE
|
||||
LISTBOX BLANKFACE_LIST,65,8,25,12,WS_TABSTOP
|
||||
CONTROL "", IDC_ASKBLANK_UPDOWN, UPDOWN_CLASS,
|
||||
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_WRAP |
|
||||
UDS_SETBUDDYINT | UDS_EXPANDABLE | UDS_NOSCROLL,
|
||||
CONTROL "", IDC_ASKBLANK_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX BLANKFACE_LIST,60,5,25,12,
|
||||
|
@ -434,9 +434,7 @@ BEGIN
|
|||
#ifdef _WIN32_WCE
|
||||
LISTBOX IDC_SVGM_GAMELIST, SVGM_LEFT_COL,SVGM_ROW_2,70,12,
|
||||
WS_TABSTOP
|
||||
CONTROL "", IDC_SVGM_UPDOWN, UPDOWN_CLASS,
|
||||
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_WRAP |
|
||||
UDS_SETBUDDYINT | UDS_EXPANDABLE | UDS_NOSCROLL,
|
||||
CONTROL "", IDC_SVGM_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX IDC_SVGM_GAMELIST,SVGM_LEFT_COL,SVGM_ROW_2,70,58,
|
||||
|
@ -487,7 +485,7 @@ END
|
|||
#define HC_DROPDOWNS_COL 70
|
||||
#define HC_MINROW 3
|
||||
#define HC_MAXROW 16
|
||||
#define HC_WIDTH 90
|
||||
#define HC_WIDTH 98
|
||||
#define HC_OK_LEFT ((HC_WIDTH/2)-10-REPOS_BUTTON_WIDTH)
|
||||
#define HC_CANCEL_LEFT ((HC_WIDTH/2)+10)
|
||||
|
||||
|
@ -503,12 +501,25 @@ CAPTION "Tile hint limits"
|
|||
FONT 8, "System"
|
||||
BEGIN
|
||||
LTEXT "Use at least:",IDC_STATIC,HC_LABELS_COL,HC_MINROW,60,8
|
||||
#ifdef _WIN32_WCE
|
||||
LISTBOX HC_MIN_COMBO, HC_DROPDOWNS_COL,HC_MINROW, 24, 12, WS_TABSTOP
|
||||
CONTROL "", HC_MIN_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX HC_MIN_COMBO,HC_DROPDOWNS_COL,HC_MINROW,17,58,
|
||||
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
#endif
|
||||
|
||||
|
||||
LTEXT "But no more than:",IDC_STATIC,HC_LABELS_COL,HC_MAXROW,60,8
|
||||
#ifdef _WIN32_WCE
|
||||
LISTBOX HC_MAX_COMBO, HC_DROPDOWNS_COL,HC_MAXROW, 24, 12, WS_TABSTOP
|
||||
CONTROL "", HC_MAX_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX HC_MAX_COMBO,HC_DROPDOWNS_COL,HC_MAXROW,17,58,
|
||||
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
#endif
|
||||
#ifndef _WIN32_WCE
|
||||
DEFPUSHBUTTON "OK",IDOK,HC_OK_LEFT,31,REPOS_BUTTON_WIDTH,REPOS_BUTTON_HT
|
||||
PUSHBUTTON "Cancel",IDCANCEL,HC_CANCEL_LEFT,31,REPOS_BUTTON_WIDTH,
|
||||
|
@ -568,9 +579,7 @@ BEGIN
|
|||
LTEXT "Phonies:",PHONIES_LABEL,8,PR_ROW6,28,PREFS_ROW_HT
|
||||
#ifdef _WIN32_WCE
|
||||
LISTBOX PHONIES_COMBO, 38,PR_ROW6,50,12, WS_TABSTOP
|
||||
CONTROL "", IDC_PHONIESUPDOWN, UPDOWN_CLASS,
|
||||
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_WRAP | /* UDS_ARROWKEYS | */
|
||||
UDS_SETBUDDYINT | UDS_EXPANDABLE | UDS_NOSCROLL,
|
||||
CONTROL "", IDC_PHONIESUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
|
||||
0, 0, 0, 0
|
||||
#else
|
||||
COMBOBOX PHONIES_COMBO,38,PR_ROW6,40,58,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
|
|
Loading…
Reference in a new issue