[ros-diffs] [dchapyshev] 40798: - Sync comctl32 with Wine 1.1.20 (without listview.c) - Sync comdlg32 with Wine 1.1.20

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Tue May 5 18:26:57 CEST 2009


Author: dchapyshev
Date: Tue May  5 20:26:56 2009
New Revision: 40798

URL: http://svn.reactos.org/svn/reactos?rev=40798&view=rev
Log:
- Sync comctl32 with Wine 1.1.20 (without listview.c)
- Sync comdlg32 with Wine 1.1.20

Modified:
    trunk/reactos/dll/win32/comctl32/comboex.c
    trunk/reactos/dll/win32/comctl32/imagelist.c
    trunk/reactos/dll/win32/comctl32/ipaddress.c
    trunk/reactos/dll/win32/comctl32/tab.c
    trunk/reactos/dll/win32/comctl32/toolbar.c
    trunk/reactos/dll/win32/comctl32/trackbar.c
    trunk/reactos/dll/win32/comctl32/treeview.c
    trunk/reactos/dll/win32/comctl32/updown.c
    trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc
    trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc
    trunk/reactos/dll/win32/comdlg32/filedlg.c
    trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c
    trunk/reactos/dll/win32/comdlg32/printdlg.c

Modified: trunk/reactos/dll/win32/comctl32/comboex.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comboex.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comboex.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/comboex.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -1669,6 +1669,14 @@
 }
 
 
+static LRESULT COMBOEX_SetRedraw(COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
+{
+    LRESULT ret = DefWindowProcW( infoPtr->hwndSelf, WM_SETREDRAW, wParam, lParam );
+    if (wParam) RedrawWindow( infoPtr->hwndSelf, NULL, 0, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN );
+    return ret;
+}
+
+
 static LRESULT COMBOEX_WindowPosChanging (COMBOEX_INFO *infoPtr, WINDOWPOS *wp)
 {
     RECT cbx_wrect, cbx_crect, cb_wrect;
@@ -2302,6 +2310,9 @@
 	case WM_SIZE:
 	    return COMBOEX_Size (infoPtr, LOWORD(lParam), HIWORD(lParam));
 
+        case WM_SETREDRAW:
+            return COMBOEX_SetRedraw(infoPtr, wParam, lParam);
+
         case WM_WINDOWPOSCHANGING:
 	    return COMBOEX_WindowPosChanging (infoPtr, (WINDOWPOS *)lParam);
 

Modified: trunk/reactos/dll/win32/comctl32/imagelist.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imagelist.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -155,7 +155,7 @@
  *     This function CANNOT be used to reduce the number of images.
  */
 static void
-IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cy)
+IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT nImageCount, INT cx, INT cy)
 {
     HDC     hdcBitmap;
     HBITMAP hbmNewBitmap, hbmNull;
@@ -166,14 +166,15 @@
         && (himl->cy >= cy))
 	return;
 
+    if (cx == 0) cx = himl->cx;
     nNewCount = himl->cCurImage + nImageCount + himl->cGrow;
 
-    imagelist_get_bitmap_size(himl, nNewCount, himl->cx, &sz);
+    imagelist_get_bitmap_size(himl, nNewCount, cx, &sz);
 
     TRACE("Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n", himl, sz.cx, cy, nNewCount);
     hdcBitmap = CreateCompatibleDC (0);
 
-    hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, himl->cx);
+    hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, cx);
 
     if (hbmNewBitmap == 0)
         ERR("creating new image bitmap (x=%d y=%d)!\n", sz.cx, cy);
@@ -247,7 +248,7 @@
 
     nImageCount = bmp.bmWidth / himl->cx;
 
-    IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmHeight);
+    IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmWidth, bmp.bmHeight);
 
     hdcBitmap = CreateCompatibleDC(0);
 
@@ -349,7 +350,7 @@
     else
 	nImageCount = 0;
 
-    IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmHeight);
+    IMAGELIST_InternalExpandBitmaps (himl, nImageCount, bmp.bmWidth, bmp.bmHeight);
 
     nIndex = himl->cCurImage;
     himl->cCurImage += nImageCount;
@@ -2303,7 +2304,7 @@
 
     if (nIndex == -1) {
         if (himl->cCurImage + 1 > himl->cMaxImage)
-            IMAGELIST_InternalExpandBitmaps (himl, 1, 0);
+            IMAGELIST_InternalExpandBitmaps (himl, 1, 0, 0);
 
         nIndex = himl->cCurImage;
         himl->cCurImage++;

Modified: trunk/reactos/dll/win32/comctl32/ipaddress.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/ipaddress.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/ipaddress.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/ipaddress.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -76,6 +76,29 @@
 
 static LRESULT CALLBACK
 IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+static void IPADDRESS_UpdateText (const IPADDRESS_INFO *infoPtr)
+{
+    static const WCHAR zero[2] = {'0', 0};
+    static const WCHAR dot[2]  = {'.', 0};
+    WCHAR field[4];
+    WCHAR ip[16];
+    INT i;
+
+    ip[0] = 0;
+
+    for (i = 0; i < 4; i++) {
+        if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4))
+            strcatW(ip, field);
+        else
+            /* empty edit treated as zero */
+            strcatW(ip, zero);
+        if (i != 3)
+            strcatW(ip, dot);
+    }
+
+    SetWindowTextW(infoPtr->Self, ip);
+}
 
 static LRESULT IPADDRESS_Notify (const IPADDRESS_INFO *infoPtr, UINT command)
 {
@@ -219,6 +242,8 @@
         EnableWindow(part->EditHwnd, infoPtr->Enabled);
     }
 
+    IPADDRESS_UpdateText (infoPtr);
+
     return 0;
 }
 
@@ -483,7 +508,7 @@
 		    return return_val;
 		} else if (len == 3 && startsel==endsel && endsel==len)
 		    IPADDRESS_GotoNextField (infoPtr, index, POS_SELALL);
-		else if (len < 3) break;
+		else if (len < 3 || startsel != endsel) break;
 	    } else if(c == '.' || c == ' ') {
 		if(len && startsel==endsel && startsel != 0) {
 		    IPADDRESS_GotoNextField(infoPtr, index, POS_SELALL);
@@ -561,6 +586,7 @@
 	case WM_COMMAND:
 	    switch(wParam >> 16) {
 		case EN_CHANGE:
+		    IPADDRESS_UpdateText(infoPtr);
 		    IPADDRESS_Notify(infoPtr, EN_CHANGE);
 		    break;
 		case EN_KILLFOCUS:

Modified: trunk/reactos/dll/win32/comctl32/tab.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -32,7 +32,7 @@
  * TODO:
  *
  *  Styles:
- *   TCS_MULTISELECT
+ *   TCS_MULTISELECT - implement for VK_SPACE selection
  *   TCS_RIGHT
  *   TCS_RIGHTJUSTIFY
  *   TCS_SCROLLOPPOSITE
@@ -40,23 +40,13 @@
  *   TCIF_RTLREADING
  *
  *  Extended Styles:
- *   TCS_EX_FLATSEPARATORS
  *   TCS_EX_REGISTERDROP
- *
- *  States:
- *   TCIS_BUTTONPRESSED
  *
  *  Notifications:
  *   NM_RELEASEDCAPTURE
  *   TCN_FOCUSCHANGE
  *   TCN_GETOBJECT
  *   TCN_KEYDOWN
- *
- *  Messages:
- *   TCM_REMOVEIMAGE
- *   TCM_DESELECTALL
- *   TCM_GETEXTENDEDSTYLE
- *   TCM_SETEXTENDEDSTYLE
  *
  *  Macros:
  *   TabCtrl_AdjustRect
@@ -127,6 +117,9 @@
   BOOL       bUnicode;        /* Unicode control? */
   HWND       hwndUpDown;      /* Updown control used for scrolling */
   INT        cbInfo;          /* Number of bytes of caller supplied info per tab */
+
+  DWORD      exStyle;         /* Extended style used, currently:
+                                 TCS_EX_FLATSEPARATORS, TCS_EX_REGISTERDROP */
 } TAB_INFO;
 
 /******************************************************************************
@@ -166,6 +159,7 @@
 static void TAB_InvalidateTabArea(const TAB_INFO *);
 static void TAB_EnsureSelectionVisible(TAB_INFO *);
 static void TAB_DrawItemInterior(const TAB_INFO *, HDC, INT, RECT*);
+static LRESULT TAB_DeselectAll(TAB_INFO *, BOOL);
 
 static BOOL
 TAB_SendSimpleNotify (const TAB_INFO *infoPtr, UINT code)
@@ -253,6 +247,9 @@
       return -1;
   else {
       if (infoPtr->iSelected != iItem) {
+          TAB_GetItem(infoPtr, prevItem)->dwState &= ~TCIS_BUTTONPRESSED;
+          TAB_GetItem(infoPtr, iItem)->dwState |= TCIS_BUTTONPRESSED;
+
           infoPtr->iSelected=iItem;
           infoPtr->uFocus=iItem;
           TAB_EnsureSelectionVisible(infoPtr);
@@ -490,12 +487,8 @@
   {
     if (!TAB_SendSimpleNotify(infoPtr, TCN_SELCHANGING))
     {
-      infoPtr->iSelected = newItem;
-      infoPtr->uFocus    = newItem;
+      TAB_SetCurSel(infoPtr, newItem);
       TAB_SendSimpleNotify(infoPtr, TCN_SELCHANGE);
-
-      TAB_EnsureSelectionVisible(infoPtr);
-      TAB_InvalidateTabArea(infoPtr);
     }
   }
 
@@ -592,6 +585,7 @@
   POINT pt;
   INT newItem;
   UINT dummy;
+  LONG lStyle = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
 
   if (infoPtr->hwndToolTip)
     TAB_RelayEvent (infoPtr->hwndToolTip, infoPtr->hwnd,
@@ -612,19 +606,43 @@
 
   TRACE("On Tab, item %d\n", newItem);
 
-  if (newItem != -1 && infoPtr->iSelected != newItem)
-  {
-    if (!TAB_SendSimpleNotify(infoPtr, TCN_SELCHANGING))
-    {
-      infoPtr->iSelected = newItem;
-      infoPtr->uFocus    = newItem;
+  if ((newItem != -1) && (infoPtr->iSelected != newItem))
+  {
+    if ((lStyle & TCS_BUTTONS) && (lStyle & TCS_MULTISELECT) &&
+        (wParam & MK_CONTROL))
+    {
+      RECT r;
+
+      /* toggle multiselection */
+      TAB_GetItem(infoPtr, newItem)->dwState ^= TCIS_BUTTONPRESSED;
+      if (TAB_InternalGetItemRect (infoPtr, newItem, &r, NULL))
+        InvalidateRect (infoPtr->hwnd, &r, TRUE);
+    }
+    else
+    {
+      INT i;
+      BOOL pressed = FALSE;
+
+      /* any button pressed ? */
+      for (i = 0; i < infoPtr->uNumItem; i++)
+        if ((TAB_GetItem (infoPtr, i)->dwState & TCIS_BUTTONPRESSED) &&
+            (infoPtr->iSelected != i))
+        {
+          pressed = TRUE;
+          break;
+        }
+
+      TAB_SendSimpleNotify(infoPtr, TCN_SELCHANGING);
+
+      if (pressed)
+        TAB_DeselectAll (infoPtr, FALSE);
+      else
+        TAB_SetCurSel(infoPtr, newItem);
+
       TAB_SendSimpleNotify(infoPtr, TCN_SELCHANGE);
-
-      TAB_EnsureSelectionVisible(infoPtr);
-
-      TAB_InvalidateTabArea(infoPtr);
-    }
-  }
+    }
+  }
+
   return 0;
 }
 
@@ -1434,7 +1452,6 @@
     BOOL     deleteBrush = TRUE;
     RECT     rTemp = *drawRect;
 
-    InflateRect(&rTemp, -2, -2);
     if (lStyle & TCS_BUTTONS)
     {
 	if (iItem == infoPtr->iSelected)
@@ -1463,9 +1480,10 @@
 	{
 	    if (lStyle & TCS_FLATBUTTONS)
 	    {
-		FillRect(hdc, drawRect, hbr);
+		InflateRect(&rTemp, 2, 2);
+		FillRect(hdc, &rTemp, hbr);
 		if (iItem == infoPtr->iHotTracked)
-		    DrawEdge(hdc, drawRect, EDGE_RAISED, BF_SOFT|BF_RECT);
+		    DrawEdge(hdc, &rTemp, BDR_RAISEDINNER, BF_RECT);
 	    }
 	    else
 		FillRect(hdc, &rTemp, hbr);
@@ -1474,8 +1492,21 @@
     }
     else /* !TCS_BUTTONS */
     {
+        InflateRect(&rTemp, -2, -2);
         if (!GetWindowTheme (infoPtr->hwnd))
 	    FillRect(hdc, &rTemp, hbr);
+    }
+
+    /* highlighting is drawn on top of previous fills */
+    if (TAB_GetItem(infoPtr, iItem)->dwState & TCIS_HIGHLIGHTED)
+    {
+        if (deleteBrush)
+        {
+            DeleteObject(hbr);
+            deleteBrush = FALSE;
+        }
+        hbr = GetSysColorBrush(COLOR_HIGHLIGHT);
+        FillRect(hdc, &rTemp, hbr);
     }
 
     /* Cleanup */
@@ -1536,7 +1567,22 @@
 	drawRect->left   += 4;
 	drawRect->top    += 4;
 	drawRect->right  -= 4;
-	drawRect->bottom -= 1;
+
+	if (lStyle & TCS_VERTICAL)
+	{
+	  if (!(lStyle & TCS_BOTTOM)) drawRect->right  += 1;
+	  drawRect->bottom   -= 4;
+	}
+	else
+	{
+	  if (lStyle & TCS_BOTTOM)
+	  {
+	    drawRect->top    -= 2;
+	    drawRect->bottom -= 4;
+	  }
+	  else
+	    drawRect->bottom -= 1;
+	}
       }
       else
       {
@@ -1631,10 +1677,15 @@
   */
   oldBkMode = SetBkMode(hdc, TRANSPARENT);
   if (!GetWindowTheme (infoPtr->hwnd) || (lStyle & TCS_BUTTONS))
-      SetTextColor(hdc, (((lStyle & TCS_HOTTRACK) && (iItem == infoPtr->iHotTracked) 
-                          && !(lStyle & TCS_FLATBUTTONS)) 
-                        | (TAB_GetItem(infoPtr, iItem)->dwState & TCIS_HIGHLIGHTED)) ?
-                        comctl32_color.clrHighlight : comctl32_color.clrBtnText);
+  {
+    if ((lStyle & TCS_HOTTRACK) && (iItem == infoPtr->iHotTracked) &&
+        !(lStyle & TCS_FLATBUTTONS))
+      SetTextColor(hdc, comctl32_color.clrHighlight);
+    else if (TAB_GetItem(infoPtr, iItem)->dwState & TCIS_HIGHLIGHTED)
+      SetTextColor(hdc, comctl32_color.clrHighlightText);
+    else
+      SetTextColor(hdc, comctl32_color.clrBtnText);
+  }
 
   /*
    * if owner draw, tell the owner to draw
@@ -1948,7 +1999,7 @@
       r = itemRect;
 
       /* Separators between flat buttons */
-      if (lStyle & TCS_FLATBUTTONS)
+      if ((lStyle & TCS_FLATBUTTONS) && (infoPtr->exStyle & TCS_EX_FLATSEPARATORS))
       {
 	r1 = r;
 	r1.right += (FLAT_BTN_SPACINGX -2);
@@ -1963,8 +2014,13 @@
       }
       else  /* ! selected */
       {
-	if (!(lStyle & TCS_FLATBUTTONS))
-	  DrawEdge(hdc, &r, EDGE_RAISED, BF_SOFT|BF_RECT);
+        DWORD state = TAB_GetItem(infoPtr, iItem)->dwState;
+
+        if (state & TCIS_BUTTONPRESSED)
+          DrawEdge(hdc, &r, EDGE_SUNKEN, BF_SOFT|BF_RECT);
+        else
+          if (!(lStyle & TCS_FLATBUTTONS))
+            DrawEdge(hdc, &r, EDGE_RAISED, BF_SOFT|BF_RECT);
       }
     }
     else /* !TCS_BUTTONS */
@@ -2675,6 +2731,8 @@
 TAB_HighlightItem (TAB_INFO *infoPtr, INT iItem, BOOL fHighlight)
 {
   LPDWORD lpState;
+  DWORD oldState;
+  RECT r;
 
   TRACE("(%p,%d,%s)\n", infoPtr, iItem, fHighlight ? "true" : "false");
 
@@ -2682,12 +2740,16 @@
     return FALSE;
   
   lpState = &TAB_GetItem(infoPtr, iItem)->dwState;
+  oldState = *lpState;
 
   if (fHighlight)
     *lpState |= TCIS_HIGHLIGHTED;
   else
     *lpState &= ~TCIS_HIGHLIGHTED;
 
+  if ((oldState != *lpState) && TAB_InternalGetItemRect (infoPtr, iItem, &r, NULL))
+    InvalidateRect (infoPtr->hwnd, &r, TRUE);
+
   return TRUE;
 }
 
@@ -2715,7 +2777,8 @@
     FIXME("TCIF_RTLREADING\n");
 
   if (tabItem->mask & TCIF_STATE)
-    wineItem->dwState = tabItem->dwState;
+    wineItem->dwState = (wineItem->dwState & ~tabItem->dwStateMask) |
+                        ( tabItem->dwState &  tabItem->dwStateMask);
 
   if (tabItem->mask & TCIF_TEXT)
   {
@@ -2762,7 +2825,7 @@
     FIXME("TCIF_RTLREADING\n");
 
   if (tabItem->mask & TCIF_STATE)
-    tabItem->dwState = wineItem->dwState;
+    tabItem->dwState = wineItem->dwState & tabItem->dwStateMask;
 
   if (tabItem->mask & TCIF_TEXT)
   {
@@ -2979,6 +3042,8 @@
   dwStyle = GetWindowLongW(hwnd, GWL_STYLE);
   SetWindowLongW(hwnd, GWL_STYLE, dwStyle|WS_CLIPSIBLINGS);
 
+  infoPtr->exStyle = (dwStyle & TCS_FLATBUTTONS) ? TCS_EX_FLATSEPARATORS : 0;
+
   if (dwStyle & TCS_TOOLTIPS) {
     /* Create tooltip control */
     infoPtr->hwndToolTip =
@@ -3099,6 +3164,103 @@
   return TRUE;
 }
 
+static LRESULT TAB_RemoveImage (TAB_INFO *infoPtr, INT image)
+{
+  if (!infoPtr)
+    return 0;
+
+  if (ImageList_Remove (infoPtr->himl, image))
+  {
+    INT i, *idx;
+    RECT r;
+
+    /* shift indices, repaint items if needed */
+    for (i = 0; i < infoPtr->uNumItem; i++)
+    {
+      idx = &TAB_GetItem(infoPtr, i)->iImage;
+      if (*idx >= image)
+      {
+        if (*idx == image)
+          *idx = -1;
+        else
+          (*idx)--;
+
+        /* repaint item */
+        if (TAB_InternalGetItemRect (infoPtr, i, &r, NULL))
+          InvalidateRect (infoPtr->hwnd, &r, TRUE);
+      }
+    }
+  }
+
+  return 0;
+}
+
+static LRESULT
+TAB_SetExtendedStyle (TAB_INFO *infoPtr, DWORD exMask, DWORD exStyle)
+{
+  DWORD prevstyle = infoPtr->exStyle;
+
+  /* zero mask means all styles */
+  if (exMask == 0) exMask = ~0;
+
+  if (exMask & TCS_EX_REGISTERDROP)
+  {
+    FIXME("TCS_EX_REGISTERDROP style unimplemented\n");
+    exMask  &= ~TCS_EX_REGISTERDROP;
+    exStyle &= ~TCS_EX_REGISTERDROP;
+  }
+
+  if (exMask & TCS_EX_FLATSEPARATORS)
+  {
+    if ((prevstyle ^ exStyle) & TCS_EX_FLATSEPARATORS)
+    {
+        infoPtr->exStyle ^= TCS_EX_FLATSEPARATORS;
+        TAB_InvalidateTabArea(infoPtr);
+    }
+  }
+
+  return prevstyle;
+}
+
+static inline LRESULT
+TAB_GetExtendedStyle (TAB_INFO *infoPtr)
+{
+  return infoPtr->exStyle;
+}
+
+static LRESULT
+TAB_DeselectAll (TAB_INFO *infoPtr, BOOL excludesel)
+{
+  LONG style = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
+  BOOL paint = FALSE;
+  INT i, selected = infoPtr->iSelected;
+
+  if (!(style & TCS_BUTTONS))
+    return 0;
+
+  for (i = 0; i < infoPtr->uNumItem; i++)
+  {
+    if ((TAB_GetItem(infoPtr, i)->dwState & TCIS_BUTTONPRESSED) &&
+        (selected != i))
+    {
+      TAB_GetItem(infoPtr, i)->dwState &= ~TCIS_BUTTONPRESSED;
+      paint = TRUE;
+    }
+  }
+
+  if (!excludesel && (selected != -1))
+  {
+    TAB_GetItem(infoPtr, selected)->dwState &= ~TCIS_BUTTONPRESSED;
+    infoPtr->iSelected = -1;
+    paint = TRUE;
+  }
+
+  if (paint)
+    TAB_InvalidateTabArea (infoPtr);
+
+  return 0;
+}
+
 static LRESULT WINAPI
 TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
@@ -3159,8 +3321,7 @@
       return TAB_SetItemSize (infoPtr, lParam);
 
     case TCM_REMOVEIMAGE:
-      FIXME("Unimplemented msg TCM_REMOVEIMAGE\n");
-      return 0;
+      return TAB_RemoveImage (infoPtr, wParam);
 
     case TCM_SETPADDING:
       return TAB_SetPadding (infoPtr, lParam);
@@ -3193,16 +3354,13 @@
       return TAB_SetMinTabWidth(infoPtr, (INT)lParam);
 
     case TCM_DESELECTALL:
-      FIXME("Unimplemented msg TCM_DESELECTALL\n");
-      return 0;
+      return TAB_DeselectAll (infoPtr, (BOOL)wParam);
 
     case TCM_GETEXTENDEDSTYLE:
-      FIXME("Unimplemented msg TCM_GETEXTENDEDSTYLE\n");
-      return 0;
+      return TAB_GetExtendedStyle (infoPtr);
 
     case TCM_SETEXTENDEDSTYLE:
-      FIXME("Unimplemented msg TCM_SETEXTENDEDSTYLE\n");
-      return 0;
+      return TAB_SetExtendedStyle (infoPtr, wParam, lParam);
 
     case WM_GETFONT:
       return TAB_GetFont (infoPtr);

Modified: trunk/reactos/dll/win32/comctl32/toolbar.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -492,9 +492,9 @@
 
 
 /***********************************************************************
-* 		TOOLBAR_DrawDDFlatSeparator
+* 		TOOLBAR_DrawFlatHorizontalSeparator
 *
-* This function draws the separator that was flagged as BTNS_DROPDOWN.
+* This function draws horizontal separator for toolbars having CCS_VERT style.
 * In this case, the separator is a pixel high line of COLOR_BTNSHADOW,
 * followed by a pixel high line of COLOR_BTNHIGHLIGHT. These separators
 * are horizontal as opposed to the vertical separators for not dropdown
@@ -503,7 +503,7 @@
 * FIXME: It is possible that the height of each line is really SM_CYBORDER.
 */
 static void
-TOOLBAR_DrawDDFlatSeparator (const RECT *lpRect, HDC hdc,
+TOOLBAR_DrawFlatHorizontalSeparator (const RECT *lpRect, HDC hdc,
                              const TOOLBAR_INFO *infoPtr)
 {
     RECT myrect;
@@ -855,8 +855,8 @@
         /* empirical tests show that iBitmap can/will be non-zero    */
         /* when drawing the vertical bar...      */
         if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) {
-	    if (btnPtr->fsStyle & BTNS_DROPDOWN)
-		TOOLBAR_DrawDDFlatSeparator (&rc, hdc, infoPtr);
+            if (dwStyle & CCS_VERT)
+               TOOLBAR_DrawFlatHorizontalSeparator (&rc, hdc, infoPtr);
 	    else
 		TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr);
 	}
@@ -1326,18 +1326,14 @@
 	if (btnPtr[i].fsState & TBSTATE_HIDDEN)
 	    continue;
 
-	/* UNDOCUMENTED: If a separator has a non zero bitmap index, */
-	/* it is the actual width of the separator. This is used for */
-	/* custom controls in toolbars.                              */
-	/*                                                           */
-	/* BTNS_DROPDOWN separators are treated as buttons for    */
-	/* width.  - GA 8/01                                         */
-	if ((btnPtr[i].fsStyle & BTNS_SEP) &&
-	    !(btnPtr[i].fsStyle & BTNS_DROPDOWN))
-	    cx = (btnPtr[i].iBitmap > 0) ?
-			btnPtr[i].iBitmap : SEPARATOR_WIDTH;
+        if (btnPtr[i].cx > 0)
+            cx = btnPtr[i].cx;
+        /* horizontal separators are treated as buttons for width    */
+	else if ((btnPtr[i].fsStyle & BTNS_SEP) &&
+            !(infoPtr->dwStyle & CCS_VERT))
+            cx = (btnPtr[i].iBitmap > 0) ? btnPtr[i].iBitmap : SEPARATOR_WIDTH;
 	else
-	    cx = (btnPtr[i].cx) ? btnPtr[i].cx : infoPtr->nButtonWidth;
+	    cx = infoPtr->nButtonWidth;
 
 	/* Two or more adjacent separators form a separator group.   */
 	/* The first separator in a group should be wrapped to the   */
@@ -1685,18 +1681,14 @@
 
 	cy = infoPtr->nButtonHeight;
 
-	/* UNDOCUMENTED: If a separator has a non zero bitmap index, */
-	/* it is the actual width of the separator. This is used for */
-	/* custom controls in toolbars.                              */
 	if (btnPtr->fsStyle & BTNS_SEP) {
-	    if (btnPtr->fsStyle & BTNS_DROPDOWN) {
-		cy = (btnPtr->iBitmap > 0) ?
-		     btnPtr->iBitmap : SEPARATOR_WIDTH;
-		cx = infoPtr->nButtonWidth;
+	    if (infoPtr->dwStyle & CCS_VERT) {
+                cy = (btnPtr->iBitmap > 0) ? btnPtr->iBitmap : SEPARATOR_WIDTH;
+                cx = (btnPtr->cx > 0) ? btnPtr->cx : infoPtr->nWidth;
 	    }
 	    else
-		cx = (btnPtr->iBitmap > 0) ?
-		     btnPtr->iBitmap : SEPARATOR_WIDTH;
+                cx = (btnPtr->cx > 0) ? btnPtr->cx :
+                    (btnPtr->iBitmap > 0) ? btnPtr->iBitmap : SEPARATOR_WIDTH;
 	}
 	else
 	{
@@ -1759,12 +1751,9 @@
 	        y += cy;
 	    else
 	    {
-		/* UNDOCUMENTED: If a separator has a non zero bitmap index, */
-		/* it is the actual width of the separator. This is used for */
-		/* custom controls in toolbars. 			     */
-		if ( !(btnPtr->fsStyle & BTNS_DROPDOWN))
-		    y += cy + ( (btnPtr->iBitmap > 0 ) ?
-				btnPtr->iBitmap : SEPARATOR_WIDTH) * 2 /3;
+               if ( !(infoPtr->dwStyle & CCS_VERT))
+                    y += cy + ( (btnPtr->cx > 0 ) ?
+                                btnPtr->cx : SEPARATOR_WIDTH) * 2 /3;
 		else
 		    y += cy;
 
@@ -1843,9 +1832,10 @@
     for (iButton = 0; iButton < nAddButtons; iButton++) {
         TBUTTON_INFO *btnPtr = &infoPtr->buttons[iIndex + iButton];
 
-        TOOLBAR_DumpTBButton(lpTbb, fUnicode);
+        TOOLBAR_DumpTBButton(lpTbb + iButton, fUnicode);
 
         ZeroMemory(btnPtr, sizeof(*btnPtr));
+
         btnPtr->iBitmap   = lpTbb[iButton].iBitmap;
         btnPtr->idCommand = lpTbb[iButton].idCommand;
         btnPtr->fsState   = lpTbb[iButton].fsState;
@@ -3401,7 +3391,11 @@
     if (lpTbInfo->dwMask & TBIF_LPARAM)
 	lpTbInfo->lParam = btnPtr->dwData;
     if (lpTbInfo->dwMask & TBIF_SIZE)
-	lpTbInfo->cx = (WORD)(btnPtr->rect.right - btnPtr->rect.left);
+        /* tests show that for separators TBIF_SIZE returns not calculated width,
+           but cx property, that differs from 0 only if application have
+           specifically set it */
+        lpTbInfo->cx = (btnPtr->fsStyle & BTNS_SEP)
+            ? btnPtr->cx : (WORD)(btnPtr->rect.right - btnPtr->rect.left);
     if (lpTbInfo->dwMask & TBIF_STATE)
 	lpTbInfo->fsState = btnPtr->fsState;
     if (lpTbInfo->dwMask & TBIF_STYLE)
@@ -4241,7 +4235,9 @@
                 {
                     /* separator */
                     nmtbr.tbButton.fsStyle = TBSTYLE_SEP;
-                    nmtbr.tbButton.iBitmap = SEPARATOR_WIDTH;
+                    /* when inserting separators, iBitmap controls it's size.
+                       0 sets default size (width) */
+                    nmtbr.tbButton.iBitmap = 0;
                 }
                 else if (*nmtbr.pCurrent == (DWORD)-2)
                     /* hidden button */
@@ -4535,7 +4531,7 @@
      * 22 high. Demonstarted in ControlSpy Toolbar. GLA 3/02
      */
     if (cx == 0) cx = 24;
-    if (cy == 0) cx = 22;
+    if (cy == 0) cy = 22;
     
     cx = max(cx, infoPtr->szPadding.cx + infoPtr->nBitmapWidth);
     cy = max(cy, infoPtr->szPadding.cy + infoPtr->nBitmapHeight);
@@ -4781,6 +4777,8 @@
     HIMAGELIST himlTemp;
     HIMAGELIST himl = (HIMAGELIST)lParam;
     INT oldButtonWidth = infoPtr->nButtonWidth;
+    INT oldBitmapWidth = infoPtr->nBitmapWidth;
+    INT oldBitmapHeight = infoPtr->nBitmapHeight;
     INT i, id = 0;
 
     if (infoPtr->iVersion >= 5)
@@ -4799,9 +4797,12 @@
         infoPtr->nBitmapWidth = 1;
         infoPtr->nBitmapHeight = 1;
     }
-    TOOLBAR_CalcToolbar(hwnd);
-    if (infoPtr->nButtonWidth < oldButtonWidth)
-        TOOLBAR_SetButtonSize(hwnd, MAKELONG(oldButtonWidth, infoPtr->nButtonHeight));
+    if ((oldBitmapWidth != infoPtr->nBitmapWidth) || (oldBitmapHeight != infoPtr->nBitmapHeight))
+    {
+        TOOLBAR_CalcToolbar(hwnd);
+        if (infoPtr->nButtonWidth < oldButtonWidth)
+            TOOLBAR_SetButtonSize(hwnd, MAKELONG(oldButtonWidth, infoPtr->nButtonHeight));
+    }
 
     TRACE("hwnd %p, new himl=%p, id = %d, count=%d, bitmap w=%d, h=%d\n",
 	  hwnd, infoPtr->himlDef, id, infoPtr->nNumBitmaps,

Modified: trunk/reactos/dll/win32/comctl32/trackbar.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/trackbar.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -80,6 +80,8 @@
 #define TB_REFRESH_DELAY	500
 
 #define TOOLTIP_OFFSET		2     /* distance from ctrl edge to tooltip */
+
+#define TB_DEFAULTPAGESIZE	20
 
 /* Used by TRACKBAR_Refresh to find out which parts of the control
    need to be recalculated */
@@ -1128,7 +1130,10 @@
 {
     LONG lTemp = infoPtr->lPageSize;
 
-    infoPtr->lPageSize = lPageSize;
+    if (lPageSize != -1)
+        infoPtr->lPageSize = lPageSize;
+    else
+        infoPtr->lPageSize = TB_DEFAULTPAGESIZE;
 
     return lTemp;
 }
@@ -1405,7 +1410,7 @@
     infoPtr->lRangeMin = 0;
     infoPtr->lRangeMax = 100;
     infoPtr->lLineSize = 1;
-    infoPtr->lPageSize = 20;
+    infoPtr->lPageSize = TB_DEFAULTPAGESIZE;
     infoPtr->lSelMin   = 0;
     infoPtr->lSelMax   = 0;
     infoPtr->lPos      = 0;

Modified: trunk/reactos/dll/win32/comctl32/treeview.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treeview.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -2837,7 +2837,7 @@
     }
 
     //
-    // This is correct, but it causes an infinite loop of WM_PAINT messages, resulting
+    // This is correct, but is causes and infinite loop of WM_PAINT messages, resulting
     // in continuous painting of the scroll bar in reactos. Comment out until the real
     // bug is found
     // 
@@ -3297,56 +3297,59 @@
     if (bExpandPartial)
 	FIXME("TVE_EXPANDPARTIAL not implemented\n");
 
-    TREEVIEW_RecalculateVisibleOrder(infoPtr, wineItem);
-    TREEVIEW_UpdateSubTree(infoPtr, wineItem);
-    TREEVIEW_UpdateScrollBars(infoPtr);
-
-    scrollRect.left = 0;
-    scrollRect.bottom = infoPtr->treeHeight;
-    scrollRect.right = infoPtr->clientWidth;
-    if (nextItem)
-    {
-        scrollDist = nextItem->rect.top - orgNextTop;
-        scrollRect.top = orgNextTop;
-
-        ScrollWindowEx (infoPtr->hwnd, 0, scrollDist, &scrollRect, NULL,
-                       NULL, NULL, SW_ERASE | SW_INVALIDATE);
-        TREEVIEW_Invalidate (infoPtr, wineItem);
-    } else {
-        scrollRect.top = wineItem->rect.top;
-        InvalidateRect(infoPtr->hwnd, &scrollRect, FALSE);
-    }
-
-    /* Scroll up so that as many children as possible are visible.
-     * This fails when expanding causes an HScroll bar to appear, but we
-     * don't know that yet, so the last item is obscured. */
-    if (wineItem->firstChild != NULL)
-    {
-	int nChildren = wineItem->lastChild->visibleOrder
-	    - wineItem->firstChild->visibleOrder + 1;
-
-	int visible_pos = wineItem->visibleOrder
-	    - infoPtr->firstVisible->visibleOrder;
-
-	int rows_below = TREEVIEW_GetVisibleCount(infoPtr) - visible_pos - 1;
-
-	if (visible_pos > 0 && nChildren > rows_below)
-	{
-	    int scroll = nChildren - rows_below;
-
-	    if (scroll > visible_pos)
-		scroll = visible_pos;
-
-	    if (scroll > 0)
-	    {
-		TREEVIEW_ITEM *newFirstVisible
-		    = TREEVIEW_GetListItem(infoPtr, infoPtr->firstVisible,
-					   scroll);
-
-
-		TREEVIEW_SetFirstVisible(infoPtr, newFirstVisible, TRUE);
-	    }
-	}
+    if (ISVISIBLE(wineItem))
+    {
+        TREEVIEW_RecalculateVisibleOrder(infoPtr, wineItem);
+        TREEVIEW_UpdateSubTree(infoPtr, wineItem);
+        TREEVIEW_UpdateScrollBars(infoPtr);
+
+        scrollRect.left = 0;
+        scrollRect.bottom = infoPtr->treeHeight;
+        scrollRect.right = infoPtr->clientWidth;
+        if (nextItem)
+        {
+            scrollDist = nextItem->rect.top - orgNextTop;
+            scrollRect.top = orgNextTop;
+
+            ScrollWindowEx (infoPtr->hwnd, 0, scrollDist, &scrollRect, NULL,
+                        NULL, NULL, SW_ERASE | SW_INVALIDATE);
+            TREEVIEW_Invalidate (infoPtr, wineItem);
+        } else {
+            scrollRect.top = wineItem->rect.top;
+            InvalidateRect(infoPtr->hwnd, &scrollRect, FALSE);
+        }
+
+        /* Scroll up so that as many children as possible are visible.
+        * This fails when expanding causes an HScroll bar to appear, but we
+        * don't know that yet, so the last item is obscured. */
+        if (wineItem->firstChild != NULL)
+        {
+            int nChildren = wineItem->lastChild->visibleOrder
+                - wineItem->firstChild->visibleOrder + 1;
+
+            int visible_pos = wineItem->visibleOrder
+                - infoPtr->firstVisible->visibleOrder;
+
+            int rows_below = TREEVIEW_GetVisibleCount(infoPtr) - visible_pos - 1;
+
+            if (visible_pos > 0 && nChildren > rows_below)
+            {
+                int scroll = nChildren - rows_below;
+
+                if (scroll > visible_pos)
+                    scroll = visible_pos;
+
+                if (scroll > 0)
+                {
+                    TREEVIEW_ITEM *newFirstVisible
+                        = TREEVIEW_GetListItem(infoPtr, infoPtr->firstVisible,
+                                            scroll);
+
+
+                    TREEVIEW_SetFirstVisible(infoPtr, newFirstVisible, TRUE);
+                }
+            }
+        }
     }
 
     return TRUE;

Modified: trunk/reactos/dll/win32/comctl32/updown.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/updown.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/updown.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/updown.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -470,6 +470,27 @@
 }
 
 /***********************************************************************
+ * UPDOWN_SetRange
+ *
+ * Handle UDM_SETRANGE, UDM_SETRANGE32
+ *
+ * FIXME: handle Max == Min properly:
+ *        - arrows should be disabled (without WS_DISABLED set),
+ *          visually they can't be pressed and don't respond;
+ *        - all input messages should still pass in.
+ */
+static LRESULT UPDOWN_SetRange(UPDOWN_INFO *infoPtr, INT Max, INT Min)
+{
+    infoPtr->MaxVal = Max;
+    infoPtr->MinVal = Min;
+
+    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%p\n",
+           infoPtr->MinVal, infoPtr->MaxVal, infoPtr->Self);
+
+    return 0;
+}
+
+/***********************************************************************
  * UPDOWN_MouseWheel
  *
  * Handle mouse wheel scrolling
@@ -507,6 +528,7 @@
         HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND);
 
 	UPDOWN_KeyPressed(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam);
+	if ((wParam == VK_UP) || (wParam == VK_DOWN)) return 0;
     }
     else if (uMsg == WM_MOUSEWHEEL) {
         HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND);
@@ -1044,12 +1066,11 @@
 	    return MAKELONG(infoPtr->MaxVal, infoPtr->MinVal);
 
 	case UDM_SETRANGE:
-                                                     /* we must have:     */
-	    infoPtr->MaxVal = (short)(lParam);       /* UD_MINVAL <= Max <= UD_MAXVAL */
-	    infoPtr->MinVal = (short)HIWORD(lParam); /* UD_MINVAL <= Min <= UD_MAXVAL */
-                                                     /* |Max-Min| <= UD_MAXVAL        */
-	    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%p\n",
-		  infoPtr->MinVal, infoPtr->MaxVal, hwnd);
+	    /* we must have:
+	    UD_MINVAL <= Max <= UD_MAXVAL
+	    UD_MINVAL <= Min <= UD_MAXVAL
+	    |Max-Min| <= UD_MAXVAL */
+	    UPDOWN_SetRange(infoPtr, (short)lParam, (short)HIWORD(lParam));
 	    break;
 
 	case UDM_GETRANGE32:
@@ -1058,12 +1079,7 @@
 	    break;
 
 	case UDM_SETRANGE32:
-	    infoPtr->MinVal = (INT)wParam;
-	    infoPtr->MaxVal = (INT)lParam;
-	    if (infoPtr->MaxVal <= infoPtr->MinVal)
-		infoPtr->MaxVal = infoPtr->MinVal + 1;
-	    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%p\n",
-		  infoPtr->MinVal, infoPtr->MaxVal, hwnd);
+	    UPDOWN_SetRange(infoPtr, (INT)lParam, (INT)wParam);
 	    break;
 
 	case UDM_GETPOS32:

Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc [iso-8859-1] Tue May  5 20:26:56 2009
@@ -186,10 +186,10 @@
 
 FINDDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Rasti"
-FONT 8, "MS Shell Dlg"
-{
- LTEXT "&Ieškoti ko:", -1, 4, 8, 42, 8
+CAPTION "Ieškoti"
+FONT 8, "MS Shell Dlg"
+{
+ LTEXT "Ko &ieškoti:", -1, 4, 8, 42, 8
  EDITTEXT edt1, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
  CHECKBOX "Tenkina tik &visas žodis", chx1, 4, 26, 82, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
  CHECKBOX "Skirti raidžių &dydį", chx2, 4, 42, 70, 12, BS_AUTOCHECKBOX | WS_TABSTOP
@@ -197,7 +197,7 @@
  CONTROL "&Aukštyn", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 93, 38, 40, 12
  CONTROL "&Žemyn", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 134, 38, 36, 12
 
- DEFPUSHBUTTON "&Rasti kitÄ
", IDOK, 182,  5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
+ DEFPUSHBUTTON "Ieškoti &kito", IDOK, 182,  5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
  PUSHBUTTON "Atsisakyti", IDCANCEL	 , 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
  PUSHBUTTON "&Žinynas", pshHelp	 , 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
 }
@@ -208,14 +208,14 @@
 CAPTION "Pakeisti"
 FONT 8, "MS Shell Dlg"
 {
- LTEXT "&Ieškoti ko:", -1, 4, 9, 48, 8
+ LTEXT "Ko &ieškoti:", -1, 4, 9, 48, 8
  EDITTEXT edt1, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
- LTEXT "Pa&keisti kuo:", -1, 4, 26, 48, 8
+ LTEXT "Kuo pa&keisti:", -1, 4, 26, 48, 8
  EDITTEXT edt2, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
  CHECKBOX "Tenkina tik &visas žodis", chx1, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
  CHECKBOX "Skirti raidžių &dydį", chx2, 5, 62, 70, 12, BS_AUTOCHECKBOX | WS_TABSTOP
 
- DEFPUSHBUTTON "&Rasti kitÄ
", IDOK, 174,  4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
+ DEFPUSHBUTTON "Ieškoti &kito", IDOK, 174,  4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
  PUSHBUTTON "&Pakeisti", psh1	 , 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
  PUSHBUTTON "P&akeisti visus", psh2 , 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
  PUSHBUTTON "Atsisakyti", IDCANCEL	 , 174, 55, 50, 14, WS_GROUP | WS_TABSTOP

Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc [iso-8859-1] Tue May  5 20:26:56 2009
@@ -316,13 +316,13 @@
   AUTORADIOBUTTON "&Landscape", rad2, 16, 190, 52, 12, BS_AUTORADIOBUTTON
   GROUPBOX "Borders", grp4, 80, 156, 152, 56, BS_GROUPBOX
   LTEXT "L&eft:", stc15, 88, 172, 21, 8
-  EDITTEXT edt4, 111, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER
+  EDITTEXT edt4, 111, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER
   LTEXT "&Right:", stc16, 159, 172, 27, 8
-  EDITTEXT edt6, 187, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER
+  EDITTEXT edt6, 187, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER
   LTEXT "T&op:", stc17, 88, 192, 21, 8
-  EDITTEXT edt5, 111, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER
+  EDITTEXT edt5, 111, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER
   LTEXT "&Bottom:", stc18, 159, 192, 23, 8
-  EDITTEXT edt7, 187, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER
+  EDITTEXT edt7, 187, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER
   DEFPUSHBUTTON "OK", IDOK, 71, 220, 50, 14, BS_PUSHBUTTON
   PUSHBUTTON "Zruši", IDCANCEL, 126, 220, 50, 14
   PUSHBUTTON "P&rinter...", psh3, 184, 220, 48, 14

Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -37,7 +37,7 @@
  * FIXME: add to recent docs
  *
  * FIXME: flags not implemented: OFN_DONTADDTORECENT,
- * OFN_ENABLEINCLUDENOTIFY, OFN_ENABLESIZING,
+ * OFN_ENABLESIZING,
  * OFN_NODEREFERENCELINKS, OFN_NOREADONLYRETURN,
  * OFN_NOTESTFILECREATE, OFN_USEMONIKERS
  *
@@ -82,8 +82,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 #define UNIMPLEMENTED_FLAGS \
-(OFN_DONTADDTORECENT |\
-OFN_ENABLEINCLUDENOTIFY | OFN_ENABLESIZING |\
+(OFN_DONTADDTORECENT | OFN_ENABLESIZING |\
 OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN |\
 OFN_NOTESTFILECREATE /*| OFN_USEMONIKERS*/)
 
@@ -2788,6 +2787,8 @@
 
       iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB);
 
+      if( iItem == CB_ERR) return FALSE;
+
       if(!(tmpFolder = (LPSFOLDER) CBGetItemDataPtr(fodInfos->DlgInfos.hwndLookInCB,
                                                iItem)))
 	return FALSE;

Modified: trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -846,6 +846,47 @@
     return NOERROR;
 }
 
+/*         send_includeitem_notification
+ *
+ * Sends a CDN_INCLUDEITEM notification for "pidl" to hwndParentDlg
+ */
+static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
+{
+    LRESULT hook_result = 0;
+    FileOpenDlgInfos *fodInfos = GetPropA(hwndParentDlg, FileOpenDlgInfosStr);
+
+    if(!fodInfos) return 0;
+
+    if(fodInfos->DlgInfos.hwndCustomDlg)
+    {
+        TRACE("call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
+        if(fodInfos->unicode)
+        {
+                OFNOTIFYEXW ofnNotify;
+                ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
+                ofnNotify.pidl = (LPITEMIDLIST)pidl;
+                ofnNotify.hdr.hwndFrom = hwndParentDlg;
+                ofnNotify.hdr.idFrom = 0;
+                ofnNotify.hdr.code = CDN_INCLUDEITEM;
+                ofnNotify.lpOFN = fodInfos->ofnInfos;
+                hook_result = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
+        }
+        else
+        {
+                OFNOTIFYEXA ofnNotify;
+                ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
+                ofnNotify.pidl = (LPITEMIDLIST)pidl;
+                ofnNotify.hdr.hwndFrom = hwndParentDlg;
+                ofnNotify.hdr.idFrom = 0;
+                ofnNotify.hdr.code = CDN_INCLUDEITEM;
+                ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos;
+                hook_result = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
+        }
+    }
+    TRACE("Retval: 0x%08lx\n", hook_result);
+    return hook_result;
+}
+
 /**************************************************************************
 *  IShellBrowserImpl_ICommDlgBrowser_IncludeObject
 */
@@ -873,6 +914,11 @@
 
     /* always include directories and links */
     if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
+        return S_OK;
+
+    /* if the application takes care of including the item we are done */
+    if(fodInfos->ofnInfos->Flags & OFN_ENABLEINCLUDENOTIFY &&
+       send_includeitem_notification(This->hwndOwner, pidl))
         return S_OK;
 
     /* Check if there is a mask to apply if not */

Modified: trunk/reactos/dll/win32/comdlg32/printdlg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/printdlg.c?rev=40798&r1=40797&r2=40798&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/printdlg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/printdlg.c [iso-8859-1] Tue May  5 20:26:56 2009
@@ -3414,8 +3414,7 @@
  */
 static LRESULT CALLBACK pagesetup_margin_editproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
 {
-    switch(msg)
-    case WM_CHAR:
+    if (msg == WM_CHAR)
     {
         WCHAR decimal = get_decimal_sep();
         WCHAR wc = (WCHAR)wparam;



More information about the Ros-diffs mailing list