Index: trunk/src/comctl32/propsheet.c
===================================================================
--- trunk/src/comctl32/propsheet.c	(revision 1775)
+++ trunk/src/comctl32/propsheet.c	(revision 1776)
@@ -1,3 +1,3 @@
-/* $Id: propsheet.c,v 1.13 1999-11-14 10:58:38 achimha Exp $ */
+/* $Id: propsheet.c,v 1.14 1999-11-19 16:16:38 achimha Exp $ */
 /*
  * Property Sheets
@@ -13,5 +13,5 @@
  */
 
-/* WINE 991031 level */
+/* WINE 991114 level */
 
 /* CB: Odin problems:
@@ -1015,4 +1015,8 @@
                                                     PropSheetInfoStr);
 
+  if (psInfo->active_page <= 0)
+     return FALSE;
+
+  hdr.hwndFrom = hwndDlg;
   hdr.code = PSN_WIZBACK;
 
@@ -1022,5 +1026,9 @@
     return FALSE;
 
-  res = PROPSHEET_SetCurSel(hwndDlg, psInfo->active_page - 1, 0);
+  res = PROPSHEET_CanSetCurSel(hwndDlg);
+  if(res != FALSE)
+  {
+    res = PROPSHEET_SetCurSel(hwndDlg, psInfo->active_page - 1, 0);
+  }
 
   /* if we went to page 0, disable Back button */
@@ -1042,4 +1050,7 @@
                                                     PropSheetInfoStr);
 
+  if (psInfo->active_page < 0 || psInfo->active_page == psInfo->nPages - 1)
+     return FALSE;
+
   hdr.hwndFrom = hwndDlg;
   hdr.code = PSN_WIZNEXT;
@@ -1072,4 +1083,7 @@
   PropSheetInfo* psInfo = (PropSheetInfo*) GetPropA(hwndDlg,
                                                     PropSheetInfoStr);
+
+  if (psInfo->active_page < 0)
+     return FALSE;
 
   hdr.hwndFrom = hwndDlg;
@@ -1105,4 +1119,7 @@
                                                     PropSheetInfoStr);
 
+  if (psInfo->active_page < 0)
+     return FALSE;
+
   hdr.hwndFrom = hwndDlg;
 
@@ -1141,7 +1158,11 @@
   PropSheetInfo* psInfo = (PropSheetInfo*) GetPropA(hwndDlg,
                                                     PropSheetInfoStr);
-  HWND hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
+  HWND hwndPage;
   NMHDR hdr;
 
+  if (psInfo->active_page < 0)
+     return;
+
+  hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
   hdr.hwndFrom = hwndDlg;
   hdr.code = PSN_QUERYCANCEL;
@@ -1167,7 +1188,11 @@
   PropSheetInfo* psInfo = (PropSheetInfo*) GetPropA(hwndDlg,
                                                     PropSheetInfoStr);
-  HWND hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
+  HWND hwndPage;
   NMHDR hdr;
 
+  if (psInfo->active_page < 0)
+     return;
+
+  hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
   hdr.hwndFrom = hwndDlg;
   hdr.code = PSN_HELP;
@@ -1288,7 +1313,6 @@
   NMHDR hdr;
 
-  if (!psInfo)
-    return FALSE;
-
+  if (!psInfo || psInfo->active_page < 0)
+     return FALSE;
   /*
    * Notify the current page.
@@ -1315,4 +1339,7 @@
   NMHDR hdr;
 
+  if (psInfo->active_page < 0)
+     return FALSE;
+
   hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
 
@@ -1322,12 +1349,10 @@
    */
   if (hpage != NULL)
-  {
     index = PROPSHEET_GetPageIndex(hpage, psInfo);
 
-    if (index == -1)
-    {
-      TRACE("Could not find page to remove!\n");
-      return FALSE;
-    }
+  if (index < 0 || index >= psInfo->nPages)
+  {
+    TRACE("Could not find page to select!\n");
+    return FALSE;
   }
 
@@ -1367,8 +1392,15 @@
 static void PROPSHEET_SetTitleA(HWND hwndDlg, DWORD dwStyle, LPCSTR lpszText)
 {
+  PropSheetInfo*	psInfo = (PropSheetInfo*) GetPropA(hwndDlg, PropSheetInfoStr);
+  char 				szTitle[256];
+
+  if (HIWORD(lpszText) == 0) {
+    if (!LoadStringA(psInfo->ppshheader->hInstance, 
+                     LOWORD(lpszText), szTitle, sizeof(szTitle)-1))
+      return;
+    lpszText = szTitle;
+  }
   if (dwStyle & PSH_PROPTITLE)
   {
-    PropSheetInfo* psInfo = (PropSheetInfo*) GetPropA(hwndDlg,
-                                                      PropSheetInfoStr);
     char* dest;
     int lentitle = strlen(lpszText);
@@ -1782,4 +1814,6 @@
       LPCPROPSHEETPAGEA ppshpage;
 
+      SetPropA(hwnd, PropSheetInfoStr, (HANDLE)psInfo);
+
       /*
        * Small icon in the title bar.
@@ -1846,7 +1880,4 @@
         SendMessageA(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0);
 
-      SetPropA(hwnd, PropSheetInfoStr, (HANDLE)psInfo);
-
-
       if (!HIWORD(psInfo->ppshheader->pszCaption) &&
               psInfo->ppshheader->hInstance)
Index: trunk/src/comctl32/toolbar.c
===================================================================
--- trunk/src/comctl32/toolbar.c	(revision 1775)
+++ trunk/src/comctl32/toolbar.c	(revision 1776)
@@ -1,3 +1,3 @@
-/* $Id: toolbar.c,v 1.17 1999-11-02 21:44:03 achimha Exp $ */
+/* $Id: toolbar.c,v 1.18 1999-11-19 16:19:22 achimha Exp $ */
 /*
  * Toolbar control
@@ -27,5 +27,5 @@
  */
 
-/* WINE 991031 level */
+/* WINE 991114 level */
 
 /* CB: Odin32/WINE bugs
@@ -4035,5 +4035,7 @@
             return TOOLBAR_IsButtonPressed (hwnd, wParam, lParam);
 
-/*      case TB_LOADIMAGES:                     */ /* 4.70 */
+      case TB_LOADIMAGES:                      /* 4.70 */
+//        FIXME("missing standard imagelists\n");
+        return 0;
 /*      case TB_MAPACCELERATORA:                */ /* 4.71 */
 /*      case TB_MAPACCELERATORW:                */ /* 4.71 */
Index: trunk/src/comctl32/treeview.c
===================================================================
--- trunk/src/comctl32/treeview.c	(revision 1775)
+++ trunk/src/comctl32/treeview.c	(revision 1776)
@@ -1,3 +1,3 @@
-/* $Id: treeview.c,v 1.15 1999-11-09 17:09:27 cbratschi Exp $ */
+/* $Id: treeview.c,v 1.16 1999-11-19 16:22:01 achimha Exp $ */
 /* Treeview control
  *
@@ -42,5 +42,5 @@
  */
 
-/* WINE 991031 level */
+/* WINE 991114 level */
 
 #include <string.h>
@@ -927,4 +927,6 @@
    }
 
+  wineItem->mask |= tvItem->mask;
+
   return TRUE;
 }
@@ -2462,4 +2464,5 @@
   tvdi.item.lParam      = wineItem->lParam;
   tvdi.item.pszText = COMCTL32_Alloc (128*sizeof(char));
+  tvdi.item.cchTextMax = 128;
   buf = tvdi.item.pszText;
 
