CodeWeavers
Minor fixes.
diff --git a/controls/listbox.c b/controls/listbox.c
index 042f131..65de3f1 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -1136,7 +1136,7 @@
* 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 @@
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 @@
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 @@
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 @@
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 6f83cd3..9190eb6 100644
--- a/controls/scroll.c
+++ b/controls/scroll.c
@@ -1172,7 +1172,16 @@
{
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 @@
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 48e9f79..e2b68b6 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -1579,13 +1579,20 @@
{
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 a0de41d..cd929c2 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 @@
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 316b968..12b8c94 100644
--- a/dlls/shell32/shlfolder.c
+++ b/dlls/shell32/shlfolder.c
@@ -760,18 +760,13 @@
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))