Anatoly Lyutin : wineconsole: Added range of value for all up-down controls on config dialog.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Feb 13 11:07:55 CST 2007


Module: wine
Branch: master
Commit: 06999c504463ffa5f8745bbf6cbe69f5e424ea62
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=06999c504463ffa5f8745bbf6cbe69f5e424ea62

Author: Anatoly Lyutin <vostok at etersoft.ru>
Date:   Sat Feb 10 14:44:18 2007 +0300

wineconsole: Added range of value for all up-down controls on config dialog.

---

 programs/wineconsole/dialog.c |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index aa8f096..cc43684 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -599,17 +599,25 @@ static INT_PTR WINAPI WCUSER_FontDlgProc
 static INT_PTR WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     struct dialog_info*		di;
+    int                     nMaxUD = 2000;
 
     switch (msg)
     {
     case WM_INITDIALOG:
-	di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
-	di->hDlg = hDlg;
-	SetWindowLongPtr(hDlg, DWLP_USER, (DWORD_PTR)di);
-	SetDlgItemInt(hDlg, IDC_CNF_SB_WIDTH,   di->config.sb_width,   FALSE);
-	SetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT,  di->config.sb_height,  FALSE);
-	SetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH,  di->config.win_width,  FALSE);
-	SetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, di->config.win_height, FALSE);
+        di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
+        di->hDlg = hDlg;
+
+        SetWindowLongPtr(hDlg, DWLP_USER, (DWORD_PTR)di);
+        SetDlgItemInt(hDlg, IDC_CNF_SB_WIDTH,   di->config.sb_width,   FALSE);
+        SetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT,  di->config.sb_height,  FALSE);
+        SetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH,  di->config.win_width,  FALSE);
+        SetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, di->config.win_height, FALSE);
+
+        SendMessage(GetDlgItem(hDlg,IDC_CNF_WIN_HEIGHT_UD), UDM_SETRANGE, (WPARAM) 0, MAKELONG (nMaxUD, 0));
+        SendMessage(GetDlgItem(hDlg,IDC_CNF_WIN_WIDTH_UD), UDM_SETRANGE, (WPARAM) 0, MAKELONG (nMaxUD, 0));
+        SendMessage(GetDlgItem(hDlg,IDC_CNF_SB_HEIGHT_UD), UDM_SETRANGE, (WPARAM) 0, MAKELONG (nMaxUD, 0));
+        SendMessage(GetDlgItem(hDlg,IDC_CNF_SB_WIDTH_UD), UDM_SETRANGE, (WPARAM) 0, MAKELONG (nMaxUD, 0));
+
         SendDlgItemMessage(hDlg, IDC_CNF_CLOSE_EXIT, BM_SETCHECK,
                            (di->config.exit_on_die) ? BST_CHECKED : BST_UNCHECKED, 0L);
         {




More information about the wine-cvs mailing list