Fixed several bugs and typos.
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 463b07f..5330830 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c
@@ -30,7 +30,6 @@ #include "trackbar.h" #include "treeview.h" #include "updown.h" -#include "winversion.h" #include "debug.h" #include "winerror.h" @@ -76,8 +75,8 @@ HEADER_Register (); HOTKEY_Register (); LISTVIEW_Register (); - PROPSHEET_Register (); PROGRESS_Register (); + PROPSHEET_Register (); STATUS_Register (); TAB_Register (); TOOLBAR_Register (); @@ -104,8 +103,8 @@ MONTHCAL_Unregister (); NATIVEFONT_Unregister (); PAGER_Unregister (); - PROPSHEET_UnRegister (); PROGRESS_Unregister (); + PROPSHEET_UnRegister (); REBAR_Unregister (); STATUS_Unregister (); TAB_Unregister (); @@ -137,11 +136,11 @@ * MenuHelp [COMCTL32.2] * * PARAMS - * uMsg [I] - * wParam [I] - * lParam [I] - * hMainMenu [I] handle to the applications main menu - * hInst [I] + * uMsg [I] message (WM_MENUSELECT) (see NOTES) + * wParam [I] wParam of the message uMsg + * lParam [I] lParam of the message uMsg + * hMainMenu [I] handle to the application's main menu + * hInst [I] handle to the module that contains string resources * hwndStatus [I] handle to the status bar window * lpwIDs [I] pointer to an array of intergers (see NOTES) * @@ -150,6 +149,14 @@ * * NOTES * The official documentation is incomplete! + * This is the correct documentation: + * + * uMsg: + * MenuHelp() does NOT handle WM_COMMAND messages! It only handes + * WM_MENUSELECT messages. + * + * lpwIDs: + * (will be written ...) */ VOID WINAPI @@ -214,11 +221,18 @@ * Failure: FALSE * * NOTES - * The official documentation is incomplete! This has been fixed. + * The official documentation is incomplete! + * This is the correct documentation: + * + * hwnd + * Handle to the window that contains the menu and controls. + * + * uFlags + * Identifier of the menu item to receive or loose a check mark. * * lpInfo * The array of integers contains pairs of values. BOTH values of - * the first pair must be the handles to application's main menu. + * the first pair must be the handles to the application's main menu. * Each subsequent pair consists of a menu id and control id. */ @@ -269,13 +283,17 @@ * PARAMS * hwnd [I] handle to the client window. * lpRect [O] pointer to the rectangle of the client window - * lpInfo [I] pointer to an array of integers + * lpInfo [I] pointer to an array of integers (see NOTES) * * RETURNS * No return value. * * NOTES * The official documentation is incomplete! + * This is the correct documentation: + * + * lpInfo + * (will be written...) */ VOID WINAPI @@ -309,7 +327,7 @@ /*********************************************************************** - * DrawStatusText32A [COMCTL32.5] + * DrawStatusText32A [COMCTL32.5][COMCTL32.27] * * Draws text with borders, like in a status bar. * @@ -317,10 +335,14 @@ * hdc [I] handle to the window's display context * lprc [I] pointer to a rectangle * text [I] pointer to the text - * style [I] + * style [I] drawing style * * RETURNS * No return value. + * + * NOTES + * The style variable can have one of the following values: + * (will be written ...) */ VOID WINAPI @@ -357,7 +379,7 @@ * hdc [I] handle to the window's display context * lprc [I] pointer to a rectangle * text [I] pointer to the text - * style [I] + * style [I] drawing style * * RETURNS * No return value. @@ -373,45 +395,18 @@ /*********************************************************************** - * DrawStatusText32AW [COMCTL32.27] - * - * Draws text with borders, like in a status bar. - * - * PARAMS - * hdc [I] handle to the window's display context - * lprc [I] pointer to a rectangle - * text [I] pointer to the text - * style [I] - * - * RETURNS - * No return value. - * - * NOTES - * Calls DrawStatusText32A() or DrawStatusText32W(). - */ - -VOID WINAPI -DrawStatusText32AW (HDC32 hdc, LPRECT32 lprc, LPVOID text, UINT32 style) -{ - if (VERSION_OsIsUnicode()) - DrawStatusText32W (hdc, lprc, (LPCWSTR)text, style); - DrawStatusText32A (hdc, lprc, (LPCSTR)text, style); -} - - -/*********************************************************************** - * CreateStatusWindow32A [COMCTL32.6] + * CreateStatusWindow32A [COMCTL32.6][COMCTL32.21] * * Creates a status bar * * PARAMS - * style [I] - * text [I] + * style [I] window style + * text [I] pointer to the window text * parent [I] handle to the parent window * wid [I] control id of the status bar * * RETURNS - * Success: handle to the control + * Success: handle to the status window * Failure: 0 */ @@ -429,13 +424,13 @@ * CreateStatusWindow32W [COMCTL32.22] Creates a status bar control * * PARAMS - * style [I] - * text [I] + * style [I] window style + * text [I] pointer to the window text * parent [I] handle to the parent window * wid [I] control id of the status bar * * RETURNS - * Success: handle to the control + * Success: handle to the status window * Failure: 0 */ @@ -450,47 +445,24 @@ /*********************************************************************** - * CreateStatusWindow32AW [COMCTL32.21] Creates a status bar control + * CreateUpDownControl [COMCTL32.16] Creates an up-down control * * PARAMS - * style [I] - * text [I] + * style [I] window styles + * x [I] horizontal position of the control + * y [I] vertical position of the control + * cx [I] with of the control + * cy [I] height of the control * parent [I] handle to the parent window - * wid [I] control id of the status bar + * id [I] the control's identifier + * inst [I] handle to the application's module instance + * buddy [I] handle to the buddy window, can be NULL + * maxVal [I] upper limit of the control + * minVal [I] lower limit of the control + * curVal [I] current value of the control * * RETURNS - * Success: handle to the control - * Failure: 0 - */ - -HWND32 WINAPI -CreateStatusWindow32AW (INT32 style, LPVOID text, HWND32 parent, UINT32 wid) -{ - if (VERSION_OsIsUnicode()) - return CreateStatusWindow32W (style, (LPCWSTR)text, parent, wid); - return CreateStatusWindow32A (style, (LPCSTR)text, parent, wid); -} - - -/*********************************************************************** - * CreateUpDownControl [COMCTL32.16] Creates an Up-Down control - * - * PARAMS - * style - * x - * y - * cx - * cy - * parent - * id - * inst - * buddy - * maxVal [I] - * minVal [I] - * curVal [I] - * - * RETURNS - * Success: handle to the control + * Success: handle to the updown control * Failure: 0 */ @@ -526,7 +498,7 @@ * NOTES * This function is just a dummy. * The Win95 controls are registered at the DLL's initialization. - * To register other controls InitCommonControlsEx must be used. + * To register other controls InitCommonControlsEx() must be used. */ VOID WINAPI @@ -697,14 +669,14 @@ * CreateMappedBitmap [COMCTL32.8] * * PARAMS - * hInstance - * idBitmap - * wFlags - * lpColorMap - * iNumMaps + * hInstance [I] + * idBitmap [I] + * wFlags [I] + * lpColorMap [I] + * iNumMaps [I] * * RETURNS - * Success: bitmap handle + * Success: handle to the new bitmap * Failure: 0 */
diff --git a/dlls/comctl32/flatsb.c b/dlls/comctl32/flatsb.c index c61eb08..1813ff0 100644 --- a/dlls/comctl32/flatsb.c +++ b/dlls/comctl32/flatsb.c
@@ -2,6 +2,7 @@ * Flat Scrollbar control * * Copyright 1998 Eric Kohl + * Copyright 1998 Alex Priem * * NOTES * This is just a dummy control. An author is needed! Any volunteers?
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 70404fd..e09dc5e 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c
@@ -31,7 +31,6 @@ #include "windows.h" -#include "winversion.h" #include "wine/obj_base.h" #include "wine/obj_storage.h" #include "imagelist.h" @@ -1384,7 +1383,7 @@ /************************************************************************* - * ImageList_LoadImage32A [COMCTL32.63] + * ImageList_LoadImage32A [COMCTL32.63][COMCTL32.62] * * Creates an image list from a bitmap, icon or cursor. * @@ -1398,7 +1397,7 @@ * uFlags [I] loading flags * * RETURNS - * Success: handle to image list + * Success: handle to the loaded image list * Failure: NULL * * SEE @@ -1462,7 +1461,7 @@ * uFlags [I] loading flags * * RETURNS - * Success: handle to image list + * Success: handle to the loaded image list * Failure: NULL * * SEE @@ -1512,41 +1511,6 @@ /************************************************************************* - * ImageList_LoadImage32AW [COMCTL32.62] - * - * Creates an image list from a bitmap, icon or cursor. - * - * PARAMS - * hi [I] instance handle - * lpbmp [I] name or id of the image - * cx [I] width of each image - * cGrow [I] number of images to expand - * clrMask [I] mask color - * uType [I] type of image to load - * uFlags [I] loading flags - * - * RETURNS - * Success: handle to image list - * Failure: NULL - * - * SEE - * LoadImage () - */ - -HIMAGELIST WINAPI -ImageList_LoadImage32AW (HINSTANCE32 hi, const LPVOID lpbmp, INT32 cx, - INT32 cGrow, COLORREF clrMask, UINT32 uType, - UINT32 uFlags) -{ - if (VERSION_OsIsUnicode()) - return ImageList_LoadImage32W (hi, (LPCWSTR)lpbmp, cx, cGrow, - clrMask, uType, uFlags); - return ImageList_LoadImage32A (hi, (LPCSTR)lpbmp, cx, cGrow, - clrMask, uType, uFlags); -} - - -/************************************************************************* * ImageList_Merge [COMCTL32.65] * * Creates a new image list that contains a merged image from the specified
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 6758a92..ddb002a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c
@@ -659,6 +659,10 @@ } +/* + << LISTVIEW_Scroll >> +*/ + static LRESULT LISTVIEW_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) @@ -676,6 +680,12 @@ } +/* + << LISTVIEW_SetBkImage >> + << LISTVIEW_SetCallbackMask >> +*/ + + static LRESULT LISTVIEW_SetColumn32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { @@ -733,6 +743,16 @@ } +/* + << LISTVIEW_SetColumn32W >> + << LISTVIEW_SetColumnOrderArray >> + << LISTVIEW_SetColumnWidth >> + << LISTVIEW_SetExtendedListviewStyle >> + << LISTVIEW_SetHotCursor >> + << LISTVIEW_SetHotItem >> + << LISTVIEW_SetHoverTime >> + << LISTVIEW_SetIconSpacing >> +*/ static LRESULT @@ -764,7 +784,6 @@ } - static LRESULT LISTVIEW_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { @@ -863,6 +882,56 @@ } +/* + << LISTVIEW_SetItemPosition32 >> + << LISTVIEW_SetItemState >> +*/ + + +static LRESULT +LISTVIEW_SetItemText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr); + LPLVITEM32A lpItem = (LPLVITEM32A)lParam; + INT32 nItem = (INT32)wParam; + LISTVIEW_ITEM *lpRow, *lpSubItem; + + TRACE (listview, "(%d %p)\n", nItem, lpItem); + + lpRow = DPA_GetPtr (infoPtr->hdpaItems, lpItem->iItem); + if (!lpRow) + return FALSE; + + lpSubItem = &lpRow[lpItem->iSubItem]; + if (!lpSubItem) + return FALSE; + + if (lpSubItem->pszText) { + if (lpSubItem->pszText != LPSTR_TEXTCALLBACK32A) + COMCTL32_Free (lpSubItem->pszText); + lpSubItem->pszText = NULL; + } + if (lpItem->pszText) { + if (lpItem->pszText == LPSTR_TEXTCALLBACK32A) { + lpItem->pszText = LPSTR_TEXTCALLBACK32A; + } + else { + INT32 len = lstrlen32A (lpItem->pszText); + lpSubItem->pszText = (LPWSTR)COMCTL32_Alloc ((len + 1)*sizeof(WCHAR)); + lstrcpy32A (lpSubItem->pszText, lpItem->pszText); + } + } + + return TRUE; +} + + +/* + << LISTVIEW_SetItemText32W >> + << LISTVIEW_SetSelectionMark >> +*/ + + static LRESULT LISTVIEW_SetTextBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { @@ -895,6 +964,12 @@ } +/* + << LISTVIEW_SetTooltips >> + << LISTVIEW_SetUnicodeFormat >> + << LISTVIEW_SetWorkAreas >> +*/ + static LRESULT LISTVIEW_SortItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) @@ -908,6 +983,11 @@ } +/* + << LISTVIEW_SubItemHitTest >> + << LISTVIEW_Update >> +*/ + static LRESULT @@ -1436,7 +1516,11 @@ /* case LVM_SETITEMPOSITION32: */ /* case LVM_SETITEMSTATE: */ -/* case LVM_SETITEMTEXT: */ + + case LVM_SETITEMTEXT32A: + return LISTVIEW_SetItemText32A (wndPtr, wParam, lParam); + +/* case LVM_SETITEMTEXT32W: */ /* case LVM_SETSELECTIONMARK: */ case LVM_SETTEXTBKCOLOR:
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 19341bf..44ff994 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c
@@ -9,12 +9,12 @@ */ #include "windows.h" -#include "winversion.h" #include "commctrl.h" #include "propsheet.h" #include "win.h" #include "debug.h" + LRESULT WINAPI PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam); @@ -22,21 +22,10 @@ -/***************************************************************** - * PropertySheet32AW (COMCTL32.83) - */ -INT32 WINAPI PropertySheet32AW(LPVOID propertySheetHeader) -{ - if (VERSION_OsIsUnicode()) - return PropertySheet32W ((LPCPROPSHEETHEADER32W) propertySheetHeader); - return PropertySheet32A ((LPCPROPSHEETHEADER32A) propertySheetHeader); -} - - /***************************************************************** - * PropertySheet32A (COMCTL32.84) + * PropertySheet32A (COMCTL32.84)(COMCTL32.83) */ INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A lppsh) { @@ -70,19 +59,7 @@ /***************************************************************** - * CreatePropertySheet32AW (COMCTL32.83) - */ -HPROPSHEETPAGE WINAPI CreatePropertySheetPage32AW (LPVOID lpPropSheetPage) -{ - if (VERSION_OsIsUnicode()) - return CreatePropertySheetPage32W((LPCPROPSHEETPAGE32W) lpPropSheetPage); - return CreatePropertySheetPage32A((LPCPROPSHEETPAGE32A) lpPropSheetPage); - -} - - -/***************************************************************** - * CreatePropertySheetPage32A (COMCTL32.19) + * CreatePropertySheetPage32A (COMCTL32.19)(COMCTL32.18) */ HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheetPage) { @@ -116,9 +93,9 @@ LRESULT WINAPI PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) { - WND *wndPtr = WIN_FindWndPtr(hwnd); + WND *wndPtr = WIN_FindWndPtr(hwnd); - switch (uMsg) { + switch (uMsg) { case PSM_SETCURSEL: FIXME (propsheet, "Unimplemented msg PSM_SETCURSEL\n"); return 0; @@ -180,14 +157,12 @@ FIXME (propsheet, "Unimplemented msg PSM_GETCURRENTPAGEHWND\n"); return 0; - default: + default: if (uMsg >= WM_USER) - ERR (propsheet, "unknown msg %04x wp=%08x lp=%08lx\n", - uMsg, wParam, lParam); - return DefWindowProc32A (hwnd, uMsg, wParam, lParam); - } - - + ERR (propsheet, "unknown msg %04x wp=%08x lp=%08lx\n", + uMsg, wParam, lParam); + return DefWindowProc32A (hwnd, uMsg, wParam, lParam); + } } @@ -215,6 +190,5 @@ PROPSHEET_UnRegister (VOID) { if (GlobalFindAtom32A (WC_PROPSHEET32A)) - UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL); + UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL); } -
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 2efee9d..e32c30a 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c
@@ -365,7 +365,7 @@ else { result = part->text ? lstrlen32W (part->text) : 0; result |= (part->style << 16); - if (lParam) + if (lParam && LOWORD(result)) lstrcpyWtoA ((LPSTR)lParam, part->text); } return result;