diff --git a/controls/listbox.c b/controls/listbox.c index 042f131168a..65de3f18d04 100644 --- a/controls/listbox.c +++ b/controls/listbox.c @@ -1136,7 +1136,7 @@ static LRESULT LISTBOX_GetItemHeight( LB_DESCR *descr, INT index ) * LISTBOX_SetItemHeight */ static LRESULT LISTBOX_SetItemHeight( HWND hwnd, LB_DESCR *descr, INT index, - INT height ) + INT height, BOOL repaint ) { if (!height) height = 1; @@ -1146,7 +1146,8 @@ static LRESULT LISTBOX_SetItemHeight( HWND hwnd, LB_DESCR *descr, INT index, TRACE("[%04x]: item %d height = %d\n", hwnd, index, height ); descr->items[index].height = height; LISTBOX_UpdateScroll( hwnd, descr ); - LISTBOX_InvalidateItems( hwnd, descr, index ); + if (repaint) + LISTBOX_InvalidateItems( hwnd, descr, index ); } else if (height != descr->item_height) { @@ -1154,7 +1155,8 @@ static LRESULT LISTBOX_SetItemHeight( HWND hwnd, LB_DESCR *descr, INT index, descr->item_height = height; LISTBOX_UpdatePage( hwnd, descr ); LISTBOX_UpdateScroll( hwnd, descr ); - InvalidateRect( hwnd, 0, TRUE ); + if (repaint) + InvalidateRect( hwnd, 0, TRUE ); } return LB_OKAY; } @@ -1238,7 +1240,7 @@ static INT LISTBOX_SetFont( HWND hwnd, LB_DESCR *descr, HFONT font ) if (oldFont) SelectObject( hdc, oldFont ); ReleaseDC( hwnd, hdc ); if (!IS_OWNERDRAW(descr)) - LISTBOX_SetItemHeight( hwnd, descr, 0, tm.tmHeight ); + LISTBOX_SetItemHeight( hwnd, descr, 0, tm.tmHeight, FALSE ); return tm.tmHeight ; } @@ -2620,7 +2622,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg, lParam = LOWORD(lParam); /* fall through */ case LB_SETITEMHEIGHT: - return LISTBOX_SetItemHeight( hwnd, descr, wParam, lParam ); + return LISTBOX_SetItemHeight( hwnd, descr, wParam, lParam, TRUE ); case LB_ITEMFROMPOINT: { diff --git a/controls/scroll.c b/controls/scroll.c index 6f83cd3d9e8..9190eb628b9 100644 --- a/controls/scroll.c +++ b/controls/scroll.c @@ -1172,7 +1172,16 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam, { case WM_CREATE: { + SCROLLBAR_INFO *infoPtr; CREATESTRUCTW *lpCreat = (CREATESTRUCTW *)lParam; + + if (!(infoPtr = SCROLL_GetScrollInfo( hwnd, SB_CTL ))) return -1; + if (lpCreat->style & WS_DISABLED) + { + TRACE("Created WS_DISABLED scrollbar\n"); + infoPtr->flags = ESB_DISABLE_BOTH; + } + if (lpCreat->style & SBS_SIZEBOX) { FIXME("Unimplemented style SBS_SIZEBOX.\n" ); @@ -1204,7 +1213,18 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam, if (!hUpArrow) SCROLL_LoadBitmaps(); TRACE("ScrollBar creation, hwnd=%04x\n", hwnd ); return 0; - + + case WM_ENABLE: + { + SCROLLBAR_INFO *infoPtr; + if ((infoPtr = SCROLL_GetScrollInfo( hwnd, SB_CTL ))) + { + infoPtr->flags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH; + SCROLL_RefreshScrollBar(hwnd, SB_CTL, TRUE, TRUE); + } + } + return 0; + case WM_LBUTTONDOWN: { POINT pt; diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 48e9f79c7e0..e2b68b676b3 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -1579,13 +1579,20 @@ REFIID _ILGetGUIDPointer(LPCITEMIDLIST pidl) { LPPIDLDATA pdata =_ILGetDataPointer(pidl); + TRACE("%p\n", pidl); + if (pdata) { + TRACE("pdata->type 0x%04x\n", pdata->type); switch (pdata->type) { case PT_SPECIAL: case PT_MYCOMP: return (REFIID) &(pdata->u.mycomp.guid); + + default: + TRACE("Unknown pidl type 0x%04x\n", pdata->type); + break; } } return NULL; diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index a0de41d09ed..cd929c2535b 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -21,6 +21,7 @@ #include "undocshell.h" #include "pidl.h" #include "shlwapi.h" +#include "commdlg.h" DEFAULT_DEBUG_CHANNEL(shell); DECLARE_DEBUG_CHANNEL(pidl); @@ -96,14 +97,39 @@ BOOL WINAPI GetFileNameFromBrowse( LPCSTR lpstrFilter, LPCSTR lpstrTitle) { - FIXME("(%04x,%s,%ld,%s,%s,%s,%s):stub.\n", + HMODULE hmodule; + FARPROC pGetOpenFileNameA; + OPENFILENAMEA ofn; + BOOL ret; + + TRACE("%04x, %s, %ld, %s, %s, %s, %s)\n", hwndOwner, lpstrFile, nMaxFile, lpstrInitialDir, lpstrDefExt, lpstrFilter, lpstrTitle); - /* puts up a Open Dialog and requests input into targetbuf */ - /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */ - strcpy(lpstrFile,"x:\\dummy.exe"); - return 1; + hmodule = LoadLibraryA("comdlg32.dll"); + if(!hmodule) return FALSE; + pGetOpenFileNameA = GetProcAddress(hmodule, "GetOpenFileNameA"); + if(!pGetOpenFileNameA) + { + FreeLibrary(hmodule); + return FALSE; + } + + memset(&ofn, 0, sizeof(ofn)); + + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hwndOwner; + ofn.lpstrFilter = lpstrFilter; + ofn.lpstrFile = lpstrFile; + ofn.nMaxFile = nMaxFile; + ofn.lpstrInitialDir = lpstrInitialDir; + ofn.lpstrTitle = lpstrTitle; + ofn.lpstrDefExt = lpstrDefExt; + ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; + ret = pGetOpenFileNameA(&ofn); + + FreeLibrary(hmodule); + return ret; } /************************************************************************* diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 316b968f43b..12b8c94d460 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -760,18 +760,13 @@ static HRESULT WINAPI IShellFolder_fnBindToObject( IShellFolder2 * iface, LPCITE return E_FAIL; } } - else if(_ILIsFolder(pidl)) + else { LPITEMIDLIST pidltemp = ILCloneFirst(pidl); pShellFolder = IShellFolder_Constructor(iface, pidltemp); ILFree(pidltemp); } - else - { - ERR("can't bind to a file\n"); - return E_FAIL; - } - + if (_ILIsPidlSimple(pidl)) { if(IsEqualIID(riid, &IID_IShellFolder))