Module: wine Branch: master Commit: 4b34260a73a249b59b52a41f64e90a2b3ce2b411 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4b34260a73a249b59b52a41f64...
Author: Guy Albertelli galberte@neo.rr.com Date: Tue Jun 24 22:58:14 2008 -0400
comctl32: listview: Change header control create act like native for LVS_NOCOLUMNHEAD.
The native control issues the CreateWindowEx call with the HDS_HIDDEN as part of the style and not by issuing the SetWindowLong call.
---
dlls/comctl32/listview.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 5501d1f..d85c3b8 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7998,6 +7998,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) { LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0); UINT uView = lpcs->style & LVS_TYPEMASK; + DWORD dFlags = WS_CHILD | HDS_HORZ | HDS_FULLDRAG | HDS_DRAGDROP;
TRACE("(lpcs=%p)\n", lpcs);
@@ -8005,9 +8006,12 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->notifyFormat = SendMessageW(infoPtr->hwndNotify, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY);
+ /* setup creation flags */ + dFlags |= (LVS_NOSORTHEADER & lpcs->style) ? 0 : HDS_BUTTONS; + dFlags |= (LVS_NOCOLUMNHEADER & lpcs->style) ? HDS_HIDDEN : 0; + /* create header */ - infoPtr->hwndHeader = CreateWindowW(WC_HEADERW, NULL, - WS_CHILD | HDS_HORZ | HDS_FULLDRAG | (DWORD)((LVS_NOSORTHEADER & lpcs->style)?0:HDS_BUTTONS), + infoPtr->hwndHeader = CreateWindowW(WC_HEADERW, NULL, dFlags, 0, 0, 0, 0, hwnd, NULL, lpcs->hInstance, NULL); if (!infoPtr->hwndHeader) return -1; @@ -8027,12 +8031,8 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) { ShowWindow(infoPtr->hwndHeader, SW_SHOWNORMAL); } - else - { - /* set HDS_HIDDEN flag to hide the header bar */ - SetWindowLongW(infoPtr->hwndHeader, GWL_STYLE, - GetWindowLongW(infoPtr->hwndHeader, GWL_STYLE) | HDS_HIDDEN); - } + LISTVIEW_UpdateSize(infoPtr); + LISTVIEW_UpdateScroll(infoPtr); }
OpenThemeData(hwnd, themeClass);