Fixed several bugs and typos.

This commit is contained in:
Eric Kohl 1999-01-24 19:14:58 +00:00 committed by Alexandre Julliard
parent 50d489282b
commit d68d50142f
7 changed files with 167 additions and 171 deletions

View File

@ -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 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
HEADER_Register ();
HOTKEY_Register ();
LISTVIEW_Register ();
PROPSHEET_Register ();
PROGRESS_Register ();
PROPSHEET_Register ();
STATUS_Register ();
TAB_Register ();
TOOLBAR_Register ();
@ -104,8 +103,8 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
MONTHCAL_Unregister ();
NATIVEFONT_Unregister ();
PAGER_Unregister ();
PROPSHEET_UnRegister ();
PROGRESS_Unregister ();
PROPSHEET_UnRegister ();
REBAR_Unregister ();
STATUS_Unregister ();
TAB_Unregister ();
@ -137,11 +136,11 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
* 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 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
* 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 @@ MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
* 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 @@ ShowHideMenuCtl (HWND32 hwnd, UINT32 uFlags, LPINT32 lpInfo)
* 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 @@ GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
/***********************************************************************
* DrawStatusText32A [COMCTL32.5]
* DrawStatusText32A [COMCTL32.5][COMCTL32.27]
*
* Draws text with borders, like in a status bar.
*
@ -317,10 +335,14 @@ GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
* 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 @@ DrawStatusText32A (HDC32 hdc, LPRECT32 lprc, LPCSTR text, UINT32 style)
* 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 @@ DrawStatusText32W (HDC32 hdc, LPRECT32 lprc, LPCWSTR text, UINT32 style)
/***********************************************************************
* 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 @@ CreateStatusWindow32A (INT32 style, LPCSTR text, HWND32 parent, UINT32 wid)
* 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 @@ CreateStatusWindow32W (INT32 style, LPCWSTR text, HWND32 parent, UINT32 wid)
/***********************************************************************
* 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 @@ CreateUpDownControl (DWORD style, INT32 x, INT32 y, INT32 cx, INT32 cy,
* 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 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
* 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
*/

View File

@ -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?

View File

@ -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_GetImageRect (HIMAGELIST himl, INT32 i, LPRECT32 lpRect)
/*************************************************************************
* ImageList_LoadImage32A [COMCTL32.63]
* ImageList_LoadImage32A [COMCTL32.63][COMCTL32.62]
*
* Creates an image list from a bitmap, icon or cursor.
*
@ -1398,7 +1397,7 @@ ImageList_GetImageRect (HIMAGELIST himl, INT32 i, LPRECT32 lpRect)
* uFlags [I] loading flags
*
* RETURNS
* Success: handle to image list
* Success: handle to the loaded image list
* Failure: NULL
*
* SEE
@ -1462,7 +1461,7 @@ ImageList_LoadImage32A (HINSTANCE32 hi, LPCSTR lpbmp, INT32 cx, INT32 cGrow,
* uFlags [I] loading flags
*
* RETURNS
* Success: handle to image list
* Success: handle to the loaded image list
* Failure: NULL
*
* SEE
@ -1511,41 +1510,6 @@ ImageList_LoadImage32W (HINSTANCE32 hi, LPCWSTR lpbmp, INT32 cx, INT32 cGrow,
}
/*************************************************************************
* 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]
*

View File

@ -659,6 +659,10 @@ LISTVIEW_RedrawItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/*
<< LISTVIEW_Scroll >>
*/
static LRESULT
LISTVIEW_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
@ -676,6 +680,12 @@ LISTVIEW_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/*
<< LISTVIEW_SetBkImage >>
<< LISTVIEW_SetCallbackMask >>
*/
static LRESULT
LISTVIEW_SetColumn32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
@ -733,6 +743,16 @@ LISTVIEW_SetColumn32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/*
<< LISTVIEW_SetColumn32W >>
<< LISTVIEW_SetColumnOrderArray >>
<< LISTVIEW_SetColumnWidth >>
<< LISTVIEW_SetExtendedListviewStyle >>
<< LISTVIEW_SetHotCursor >>
<< LISTVIEW_SetHotItem >>
<< LISTVIEW_SetHoverTime >>
<< LISTVIEW_SetIconSpacing >>
*/
static LRESULT
@ -764,7 +784,6 @@ LISTVIEW_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
LISTVIEW_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
@ -863,6 +882,56 @@ LISTVIEW_SetItemPosition (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/*
<< 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_SetTextColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/*
<< LISTVIEW_SetTooltips >>
<< LISTVIEW_SetUnicodeFormat >>
<< LISTVIEW_SetWorkAreas >>
*/
static LRESULT
LISTVIEW_SortItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
@ -908,6 +983,11 @@ LISTVIEW_SortItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/*
<< LISTVIEW_SubItemHitTest >>
<< LISTVIEW_Update >>
*/
static LRESULT
@ -1436,7 +1516,11 @@ LISTVIEW_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
/* 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:

View File

@ -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 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam);
/*****************************************************************
* 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 @@ INT32 WINAPI PropertySheet32W(LPCPROPSHEETHEADER32W propertySheetHeader)
/*****************************************************************
* 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 @@ BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
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 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
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 @@ VOID
PROPSHEET_UnRegister (VOID)
{
if (GlobalFindAtom32A (WC_PROPSHEET32A))
UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL);
UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL);
}

View File

@ -365,7 +365,7 @@ STATUSBAR_GetText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
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;

View File

@ -1,7 +1,8 @@
/*
* Date and time picker class extra info
* Flat scroll bar class extra info
*
* Copyright 1998 Eric Kohl
* Copyright 1999 Alex Priem
*/
#ifndef __WINE_FLATSB_H