Rein Klazes : comdlg32: Set MAXTEXTROWS of the toolbar in the file dialog to zero.

Alexandre Julliard julliard at winehq.org
Mon Aug 3 11:13:41 CDT 2009


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

Author: Rein Klazes <wijn at online.nl>
Date:   Tue Jul 28 12:19:20 2009 +0200

comdlg32: Set MAXTEXTROWS of the toolbar in the file dialog to zero.

---

 dlls/comdlg32/filedlg.c       |    1 +
 dlls/comdlg32/tests/filedlg.c |   24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index 041d75c..6abdb26 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -1383,6 +1383,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
 
 /* FIXME: use TB_LOADIMAGES when implemented */
 /*  SendMessageW(fodInfos->DlgInfos.hwndTB, TB_LOADIMAGES, IDB_VIEW_SMALL_COLOR, HINST_COMMCTRL);*/
+  SendMessageW(fodInfos->DlgInfos.hwndTB, TB_SETMAXTEXTROWS, 0, 0);
   SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 12, (LPARAM) &tba[0]);
   SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 1, (LPARAM) &tba[1]);
 
diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c
index 2bef8ce..d18065a 100644
--- a/dlls/comdlg32/tests/filedlg.c
+++ b/dlls/comdlg32/tests/filedlg.c
@@ -29,6 +29,29 @@
 
 /* ##### */
 
+static void toolbarcheck( HWND hDlg)
+{
+    /* test toolbar properties */
+    /* bug #10532 */
+    int maxtextrows;
+    HWND ctrl;
+    DWORD ret;
+    char classname[20];
+
+    for( ctrl = GetWindow( hDlg, GW_CHILD);
+            ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT)) {
+        GetClassName( ctrl, classname, 10);
+        classname[7] = '\0';
+        if( !strcmp( classname, "Toolbar")) break;
+    }
+    ok( ctrl != NULL, "could not get the toolbar control\n");
+    ret = SendMessage( ctrl, TB_ADDSTRING, 0, (LPARAM)"winetestwinetest\0\0");
+    ok( ret == 0, "addstring returned %d (expected 0)\n", ret);
+    maxtextrows = SendMessage( ctrl, TB_GETTEXTROWS, 0, 0);
+    ok( maxtextrows == 0, "Get(Max)TextRows returned %d (expected 0)\n", maxtextrows);
+}
+
+
 static UINT_PTR CALLBACK OFNHookProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     LPNMHDR nmh;
@@ -49,6 +72,7 @@ static UINT_PTR CALLBACK OFNHookProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM
             ok(ret > 0, "CMD_GETFOLDERIDLIST not implemented\n");
             if (ret > 5)
                 ok(buf[0] == 0x66 && buf[1] == 0x66, "CMD_GETFOLDERIDLIST: The buffer was touched on failure\n");
+            toolbarcheck( GetParent(hDlg));
         }
     }
 




More information about the wine-cvs mailing list