From 2b5f93358aa6d7939dd2581b501055c21b133b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 12 Feb 2005 20:51:20 +0000 Subject: [PATCH] Sync to Wine-20050211 Francois Gouget - Assorted spelling fixes. Dimitrie O. Paun - Use the LVCFMT_{LEFT,RIGHT,CENTER} enumeration flags properly. Alexandre Julliard - Store the "managed" flag as a window property instead of the Wine-specific WS_EX_MANAGED style bit. Paul Vriens - Remove needless check for horizontal or vertical pager. Paul Vriens - Remove the checking/setting of the defaults in TRACKBAR_Create. svn path=/trunk/; revision=13513 --- reactos/lib/comctl32/datetime.c | 1 - reactos/lib/comctl32/listview.c | 10 +++++----- reactos/lib/comctl32/pager.c | 10 ---------- reactos/lib/comctl32/status.c | 8 ++++---- reactos/lib/comctl32/toolbar.c | 4 ++-- reactos/lib/comctl32/trackbar.c | 15 +++------------ 6 files changed, 14 insertions(+), 34 deletions(-) diff --git a/reactos/lib/comctl32/datetime.c b/reactos/lib/comctl32/datetime.c index daa068591b0..8b8af308a8d 100644 --- a/reactos/lib/comctl32/datetime.c +++ b/reactos/lib/comctl32/datetime.c @@ -1085,7 +1085,6 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) uMsg, wParam, lParam); return DefWindowProcW (hwnd, uMsg, wParam, lParam); } - return 0; } diff --git a/reactos/lib/comctl32/listview.c b/reactos/lib/comctl32/listview.c index b774e853bee..23875cf9df0 100644 --- a/reactos/lib/comctl32/listview.c +++ b/reactos/lib/comctl32/listview.c @@ -254,7 +254,7 @@ typedef struct tagLISTVIEW_INFO BOOL bRedraw; /* Turns on/off repaints & invalidations */ BOOL bAutoarrange; /* Autoarrange flag when NOT in LVS_AUTOARRANGE */ BOOL bFocus; - BOOL bDoChangeNotify; /* send change notification messages? */ + BOOL bDoChangeNotify; /* send change notification messages? */ INT nFocusedItem; RECT rcFocus; DWORD dwStyle; /* the cached window GWL_STYLE */ @@ -4145,7 +4145,7 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr) for (i = infoPtr->nItemCount - 1; i >= 0; i--) { - /* send LVN_DELETEITEM notification, if not supressed */ + /* send LVN_DELETEITEM notification, if not suppressed */ if (!bSuppress) notify_deleteitem(infoPtr, i); if (!(infoPtr->dwStyle & LVS_OWNERDATA)) { @@ -6296,11 +6296,11 @@ static void column_fill_hditem(LISTVIEW_INFO *infoPtr, HDITEMW *lphdi, INT nColu lphdi->mask |= HDI_FORMAT; /* set text alignment (leftmost column must be left-aligned) */ - if (nColumn == 0 || lpColumn->fmt & LVCFMT_LEFT) + if (nColumn == 0 || (lpColumn->fmt & LVCFMT_JUSTIFYMASK) == LVCFMT_LEFT) lphdi->fmt |= HDF_LEFT; - else if (lpColumn->fmt & LVCFMT_RIGHT) + else if ((lpColumn->fmt & LVCFMT_JUSTIFYMASK) == LVCFMT_RIGHT) lphdi->fmt |= HDF_RIGHT; - else if (lpColumn->fmt & LVCFMT_CENTER) + else if ((lpColumn->fmt & LVCFMT_JUSTIFYMASK) == LVCFMT_CENTER) lphdi->fmt |= HDF_CENTER; if (lpColumn->fmt & LVCFMT_BITMAP_ON_RIGHT) diff --git a/reactos/lib/comctl32/pager.c b/reactos/lib/comctl32/pager.c index 0cd5e67b8a3..bde664dd3bd 100644 --- a/reactos/lib/comctl32/pager.c +++ b/reactos/lib/comctl32/pager.c @@ -836,16 +836,6 @@ PAGER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) if (dwStyle & PGS_DRAGNDROP) FIXME("[%p] Drag and Drop style is not implemented yet.\n", hwnd); - /* - * If neither horizontal nor vertical style specified, default to vertical. - * This is probably not necessary, since the style may be set later on as - * the control is initialized, but just in case it isn't, set it here. - */ - if (!(dwStyle & PGS_HORZ) && !(dwStyle & PGS_VERT)) - { - dwStyle |= PGS_VERT; - SetWindowLongA(hwnd, GWL_STYLE, dwStyle); - } return 0; } diff --git a/reactos/lib/comctl32/status.c b/reactos/lib/comctl32/status.c index 4ee0b9c44fd..d5b94c44ae2 100644 --- a/reactos/lib/comctl32/status.c +++ b/reactos/lib/comctl32/status.c @@ -650,7 +650,7 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style, { STATUSWINDOWPART *part=NULL; BOOL changed = FALSE; - INT oldStyle; + INT oldStyle; if (style & SBT_OWNERDRAW) { TRACE("part %d, text %p\n",nPart,text); @@ -890,9 +890,9 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate) dwStyle = GetWindowLongW (hwnd, GWL_STYLE); /* statusbars on managed windows should not have SIZEGRIP style */ - if ((dwStyle & SBARS_SIZEGRIP) && lpCreate->hwndParent) - if (GetWindowLongW (lpCreate->hwndParent, GWL_EXSTYLE) & WS_EX_MANAGED) - SetWindowLongW (hwnd, GWL_STYLE, dwStyle & ~SBARS_SIZEGRIP); + if ((dwStyle & SBARS_SIZEGRIP) && lpCreate->hwndParent && + GetPropA( lpCreate->hwndParent, "__wine_x11_managed" )) + SetWindowLongW (hwnd, GWL_STYLE, dwStyle & ~SBARS_SIZEGRIP); if ((hdc = GetDC (hwnd))) { TEXTMETRICW tm; diff --git a/reactos/lib/comctl32/toolbar.c b/reactos/lib/comctl32/toolbar.c index 58f8b0e105c..0056c21655c 100644 --- a/reactos/lib/comctl32/toolbar.c +++ b/reactos/lib/comctl32/toolbar.c @@ -64,7 +64,7 @@ * enablebtn.exe, getbmp.exe, getbtn.exe, getflags.exe, hidebtn.exe, * indetbtn.exe, insbtn.exe, pressbtn.exe, setbtnsz.exe, setcmdid.exe, * setparnt.exe, setrows.exe, toolwnd.exe. - * - Microsofts controlspy examples. + * - Microsoft's controlspy examples. * - Charles Petzold's 'Programming Windows': gadgets.exe */ @@ -6080,7 +6080,7 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACKMOUSEEVENT trackinfo; INT nHit; TBUTTON_INFO *btnPtr; - + if (infoPtr->dwStyle & TBSTYLE_FLAT) { /* fill in the TRACKMOUSEEVENT struct */ trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); diff --git a/reactos/lib/comctl32/trackbar.c b/reactos/lib/comctl32/trackbar.c index 8a364d9a5e4..6c291e55c1f 100644 --- a/reactos/lib/comctl32/trackbar.c +++ b/reactos/lib/comctl32/trackbar.c @@ -1336,7 +1336,7 @@ static LRESULT TRACKBAR_Create (HWND hwnd, LPCREATESTRUCTW lpcs) { TRACKBAR_INFO *infoPtr; - DWORD oldStyle, newStyle; + DWORD dwStyle; infoPtr = (TRACKBAR_INFO *)Alloc (sizeof(TRACKBAR_INFO)); if (!infoPtr) return -1; @@ -1359,19 +1359,10 @@ TRACKBAR_Create (HWND hwnd, LPCREATESTRUCTW lpcs) TRACKBAR_InitializeThumb (infoPtr); - oldStyle = newStyle = GetWindowLongW (hwnd, GWL_STYLE); - if (oldStyle & TBS_VERT) { - if (! (oldStyle & (TBS_LEFT | TBS_RIGHT | TBS_BOTH)) ) - newStyle |= TBS_RIGHT; - } else { - if (! (oldStyle & (TBS_TOP | TBS_BOTTOM | TBS_BOTH)) ) - newStyle |= TBS_BOTTOM; - } - if (newStyle != oldStyle) - SetWindowLongW (hwnd, GWL_STYLE, newStyle); + dwStyle = GetWindowLongW (hwnd, GWL_STYLE); /* Create tooltip control */ - if (newStyle & TBS_TOOLTIPS) { + if (dwStyle & TBS_TOOLTIPS) { infoPtr->hwndToolTip = CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, 0,