mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 16:11:42 +00:00
Sync to Wine-20040615:
Maxime Bellenge <maxime.bellenge@laposte.net> - Implemented PSH_WIZARD97_OLD and PSH_WIZARD97_NEW property sheet styles. - Add DT_END_ELLIPSIS as defaut style for text. Ilya Korniyko <k_ilya@ukr.net> - Encoding fixes in Ukrainian translation. Filip Navara <xnavara@volny.cz> - Let the subclassing stack grow the opposite way to make the code more transparent. - Remove SubclassWndProc and move its logic to DefSubclassProc. Dimitrie O. Paun <dpaun@rogers.com> - Clear the state image bits only if LVS_EX_CHECKBOXES is set. - Fix obvious logical error in focus handling. - Indentation and formatting fixes. - (based on a patch by Krishna Murthy). Ulrich Czekalla <ulrich@codeweavers.com> - Handle case where iterator range contains 0 elements. - Handle case when item text is empty. According to MSDN, length should be returned when lParam is NULL. Patrik Stridvall <ps@leissner.se> - StrSpnW doesn't exist in comctl32.dll but StrCSpnW does. Jon Griffiths <jon_p_griffiths@yahoo.com> - Implemented TCM_SETITEMEXTRA. Robert Shearman <R.J.Shearman@warwick.ac.uk> - Don't draw whole button pressed when separate dropdown pressed, just the separate dropdown itself. - TBN_DRAGOUT and NM_RDBLCLK notifications. - Remove unneeded member of private toolbar struct. svn path=/trunk/; revision=9677
This commit is contained in:
parent
dc9dfeec01
commit
11761ed436
24 changed files with 475 additions and 225 deletions
|
@ -48,6 +48,7 @@ extern HBRUSH COMCTL32_hPattern55AABrush;
|
|||
#define IDC_NEXT_BUTTON 12324
|
||||
#define IDC_FINISH_BUTTON 12325
|
||||
#define IDC_SUNKEN_LINE 12326
|
||||
#define IDC_SUNKEN_LINEHEADER 12327
|
||||
|
||||
#define IDS_CLOSE 4160
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
361 stdcall -noname StrCmpNIW(wstr wstr long)
|
||||
362 stdcall -noname StrStrW(wstr wstr)
|
||||
363 stdcall -noname StrStrIW(wstr wstr)
|
||||
364 stdcall -noname StrSpnW(wstr wstr)
|
||||
364 stdcall -noname StrCSpnW(wstr wstr)
|
||||
365 stdcall -noname StrToIntW(wstr)
|
||||
366 stdcall -noname StrChrIA(str long)
|
||||
367 stdcall -noname StrChrIW(wstr long)
|
||||
|
|
|
@ -44,6 +44,7 @@ BEGIN
|
|||
PUSHBUTTON "°ïÖú", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ BEGIN
|
|||
PUSHBUTTON "&Hilfe", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "Help", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "Ayuda", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ BEGIN
|
|||
PUSHBUTTON "Aide", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2003 Ivan Leo Murray-Smith
|
||||
* Copyright 2003 Ivan Leo Puoti
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -44,6 +44,7 @@ BEGIN
|
|||
PUSHBUTTON "Aiuto", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Linguetta", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "ヘルプ", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "도움말", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ BEGIN
|
|||
PUSHBUTTON "Help", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tabblad", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ BEGIN
|
|||
PUSHBUTTON "Pomoc", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "Ajuda", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ BEGIN
|
|||
PUSHBUTTON "&Ñïðàâêà", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "Pomoè", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ BEGIN
|
|||
PUSHBUTTON "ªèÇÂàËÅÕÍ", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -22,67 +22,68 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
|||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "÷ÌÁÓÔÉ×ÏÓÔі ÄÌÑ "
|
||||
CAPTION "Âëàñòèâîñò³ äëÿ "
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "&÷іÄÍіÎÁ", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&úÁÓÔÏÓÕ×ÁÔÉ", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&äÏ×іÄËÁ", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
PUSHBUTTON "&³äì³íà", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Çàñòîñóâàòè", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Äîâ³äêà", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "íÁÓÔÅÒ"
|
||||
CAPTION "Ìàñòåð"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&úÁ×ÅÒÛÉÔÉ", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&äÁÌі >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &îÁÚÁÄ", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "&÷іÄÍіÎÁ", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "&äÏ×іÄËÁ", IDHELP,235,138,50,14,WS_GROUP
|
||||
DEFPUSHBUTTON "&Çàâåðøèòè", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Äàë³ >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Íàçàä", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "&³äì³íà", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "&Äîâ³äêà", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "îÁÓÔÒÏÊËÁ ÐÁÎÅÌі іÎÓÔÒÕÍÅÎÔі×"
|
||||
CAPTION "Íàñòðîéêà ïàíåë³ ³íñòðóìåíò³â"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&úÁËÒÉÔÉ", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&óËÉÎÕÔÉ", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&äÏ×іÄËÁ", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "ðÅÒÅÓÕÎÕÔÉ ×&ÇÏÒÕ", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "ðÅÒÅÓÕÎÕÔÉ ÄÏ&ÎÉÚÕ", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "îÁ&Ñ×Îі ËÎÏÐËÉ:", -1,4,5,84,10
|
||||
DEFPUSHBUTTON "&Çàêðèòè", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Ñêèíóòè", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Äîâ³äêà", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Ïåðåñóíóòè â&ãîðó", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Ïåðåñóíóòè äî&íèçó", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Íà&ÿâí³ êíîïêè:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&äÏÄÁÔÉ ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &ðÒÉÂÒÁÔÉ", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&ëÎÏÐËÉ ÐÁÎÅÌі іÎÓÔÒÕÍÅÎÔі×:", -1,182,5,78,10
|
||||
PUSHBUTTON "&Äîäàòè ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Ïðèáðàòè", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Êíîïêè ïàíåë³ ³íñòðóìåíò³â:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "úÁËÒÉÔÉ"
|
||||
IDS_CLOSE "Çàêðèòè"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "óØÏÇÏÄÎі:"
|
||||
IDM_GOTODAY "ðÏÔÏÞÎÁ ÄÁÔÁ"
|
||||
IDM_TODAY "Ñüîãîäí³:"
|
||||
IDM_GOTODAY "Ïîòî÷íà äàòà"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "òÏÚÄіÌØÎÉË"
|
||||
IDS_SEPARATOR "Ðîçä³ëüíèê"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "îÅÍÁ"
|
||||
HKY_NONE "Íåìà"
|
||||
}
|
||||
|
|
|
@ -1084,7 +1084,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
|||
UINT_PTR uIDSubclass, DWORD_PTR dwRef)
|
||||
{
|
||||
LPSUBCLASS_INFO stack;
|
||||
int newnum, n;
|
||||
int n;
|
||||
|
||||
TRACE ("(%p, %p, %x, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
|
||||
|
||||
|
@ -1275,7 +1275,6 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
|
|||
LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LPSUBCLASS_INFO stack;
|
||||
int stackpos;
|
||||
LRESULT ret;
|
||||
|
||||
/* retrieve our little stack from the Properties */
|
||||
|
|
|
@ -1114,8 +1114,13 @@ static RANGE iterator_range(ITERATOR* i)
|
|||
|
||||
if (!i->ranges) return i->range;
|
||||
|
||||
range.lower = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, 0)).lower;
|
||||
range.upper = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, DPA_GetPtrCount(i->ranges->hdpa) - 1)).upper;
|
||||
if (DPA_GetPtrCount(i->ranges->hdpa) > 0)
|
||||
{
|
||||
range.lower = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, 0)).lower;
|
||||
range.upper = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, DPA_GetPtrCount(i->ranges->hdpa) - 1)).upper;
|
||||
}
|
||||
else range.lower = range.upper = 0;
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
|
@ -3313,7 +3318,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
|
|||
ranges_delitem(infoPtr->selectionRanges, lpLVItem->iItem);
|
||||
|
||||
/* if we are asked to change focus, and we manage it, do it */
|
||||
if (lpLVItem->state & lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED)
|
||||
if (lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED)
|
||||
{
|
||||
if (lpLVItem->state & LVIS_FOCUSED)
|
||||
{
|
||||
|
@ -6037,7 +6042,7 @@ static INT WINAPI LISTVIEW_InsertCompare( LPVOID first, LPVOID second, LPARAM
|
|||
}
|
||||
|
||||
/***
|
||||
* nESCRIPTION:
|
||||
* DESCRIPTION:
|
||||
* Inserts a new item in the listview control.
|
||||
*
|
||||
* PARAMETER(S):
|
||||
|
@ -6068,8 +6073,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
|
|||
|
||||
if (!is_assignable_item(lpLVItem, infoPtr->dwStyle)) return -1;
|
||||
|
||||
if ( !(lpItem = (ITEM_INFO *)Alloc(sizeof(ITEM_INFO))) )
|
||||
return -1;
|
||||
if (!(lpItem = (ITEM_INFO *)Alloc(sizeof(ITEM_INFO)))) return -1;
|
||||
|
||||
/* insert item in listview control data structure */
|
||||
if ( !(hdpaSubItems = DPA_Create(8)) ) goto fail;
|
||||
|
@ -6090,21 +6094,21 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
|
|||
/* set the item attributes */
|
||||
if (lpLVItem->mask & (LVIF_GROUPID|LVIF_COLUMNS))
|
||||
{
|
||||
/* full size structure expected - _WIN32IE >= 0x560 */
|
||||
item = *lpLVItem;
|
||||
/* full size structure expected - _WIN32IE >= 0x560 */
|
||||
item = *lpLVItem;
|
||||
}
|
||||
else if (lpLVItem->mask & LVIF_INDENT)
|
||||
{
|
||||
/* indent member expected - _WIN32IE >= 0x300 */
|
||||
memcpy(&item, lpLVItem, offsetof( LVITEMW, iGroupId ));
|
||||
/* indent member expected - _WIN32IE >= 0x300 */
|
||||
memcpy(&item, lpLVItem, offsetof( LVITEMW, iGroupId ));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* minimal structure expected */
|
||||
memcpy(&item, lpLVItem, offsetof( LVITEMW, iIndent ));
|
||||
/* minimal structure expected */
|
||||
memcpy(&item, lpLVItem, offsetof( LVITEMW, iIndent ));
|
||||
}
|
||||
item.iItem = nItem;
|
||||
item.state &= ~LVIS_STATEIMAGEMASK;
|
||||
if (infoPtr->dwLvExStyle & LVS_EX_CHECKBOXES) item.state &= ~LVIS_STATEIMAGEMASK;
|
||||
if (!set_main_item(infoPtr, &item, TRUE, isW, &has_changed)) goto undo;
|
||||
|
||||
/* if we're sorted, sort the list, and update the index */
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
*
|
||||
* Copyright 1998 Francis Beaudet
|
||||
* Copyright 1999 Thuy Nguyen
|
||||
* Copyright 2004 Maxime Bellenge
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -94,6 +95,8 @@ typedef struct tagPropSheetInfo
|
|||
BOOL rebootSystem;
|
||||
BOOL activeValid;
|
||||
PropPageInfo* proppage;
|
||||
HFONT hFont;
|
||||
HFONT hFontBold;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
|
@ -217,15 +220,9 @@ static VOID PROPSHEET_UnImplementedFlags(DWORD dwFlags)
|
|||
add_flag(PSH_RTLREADING);
|
||||
add_flag(PSH_WIZARDCONTEXTHELP);
|
||||
add_flag(PSH_WIZARD97_OLD);
|
||||
add_flag(PSH_WATERMARK);
|
||||
add_flag(PSH_USEHBMWATERMARK);
|
||||
add_flag(PSH_USEHPLWATERMARK);
|
||||
add_flag(PSH_STRETCHWATERMARK);
|
||||
add_flag(PSH_HEADER);
|
||||
add_flag(PSH_USEHBMHEADER);
|
||||
add_flag(PSH_USEPAGELANG);
|
||||
add_flag(PSH_WIZARD_LITE);
|
||||
add_flag(PSH_WIZARD97_NEW);
|
||||
add_flag(PSH_NOCONTEXTHELP);
|
||||
if (string[0] != '\0')
|
||||
FIXME("%s\n", string);
|
||||
|
@ -886,7 +883,11 @@ static BOOL PROPSHEET_AdjustSizeWizard(HWND hwndDlg, PropSheetInfo* psInfo)
|
|||
|
||||
/* Make room */
|
||||
rc.right += (padding.x * 2);
|
||||
rc.bottom += (buttonHeight + (5 * padding.y) + lineHeight);
|
||||
rc.bottom += (buttonHeight + lineHeight);
|
||||
if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW))
|
||||
rc.bottom += (4 * padding.y);
|
||||
else
|
||||
rc.bottom += (5 * padding.y);
|
||||
|
||||
/*
|
||||
* Resize the property sheet.
|
||||
|
@ -1003,6 +1004,7 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent,
|
|||
{
|
||||
HWND hwndButton = GetDlgItem(hwndParent, IDCANCEL);
|
||||
HWND hwndLine = GetDlgItem(hwndParent, IDC_SUNKEN_LINE);
|
||||
HWND hwndLineHeader = GetDlgItem(hwndParent, IDC_SUNKEN_LINEHEADER);
|
||||
RECT rcSheet;
|
||||
int x, y;
|
||||
int num_buttons = 3;
|
||||
|
@ -1084,18 +1086,29 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent,
|
|||
else
|
||||
ShowWindow(hwndButton, SW_HIDE);
|
||||
|
||||
if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW))
|
||||
padding.x = 0;
|
||||
|
||||
/*
|
||||
* Position and resize the sunken line.
|
||||
*/
|
||||
x = padding.x;
|
||||
y = rcSheet.bottom - ((padding.y * 2) + buttonHeight + lineHeight);
|
||||
|
||||
GetClientRect(hwndParent, &rcSheet);
|
||||
lineWidth = rcSheet.right - (padding.x * 2);
|
||||
|
||||
SetWindowPos(hwndLine, 0, x, y, lineWidth, 2,
|
||||
SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
|
||||
/*
|
||||
* Position and resize the header sunken line.
|
||||
*/
|
||||
|
||||
SetWindowPos(hwndLineHeader, 0, 0, 0, rcSheet.right, 2,
|
||||
SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
|
||||
if (!(psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)))
|
||||
ShowWindow(hwndLineHeader, SW_HIDE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1497,10 +1510,12 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
|||
|
||||
psInfo->proppage[index].hwndPage = hwndPage;
|
||||
|
||||
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {
|
||||
/* FIXME: This code may no longer be correct.
|
||||
* It was not for the non-wizard path. (GLA 6/02)
|
||||
*/
|
||||
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {
|
||||
int offsetx = 0;
|
||||
int offsety = 0;
|
||||
HWND hwndChild;
|
||||
RECT r;
|
||||
|
||||
rc.left = psInfo->x;
|
||||
rc.top = psInfo->y;
|
||||
rc.right = psInfo->width;
|
||||
|
@ -1515,10 +1530,58 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
|||
TRACE("setting page %08lx, rc (%ld,%ld)-(%ld,%ld) w=%d, h=%d, padx=%d, pady=%d\n",
|
||||
(DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom,
|
||||
pageWidth, pageHeight, padding.x, padding.y);
|
||||
|
||||
/* If there is a watermark, offset the dialog items */
|
||||
if ( (psInfo->ppshheader.dwFlags & (PSH_WATERMARK | PSH_WIZARD97_NEW | PSH_WIZARD97_OLD)) &&
|
||||
((index == 0) || (index == psInfo->nPages - 1)) )
|
||||
{
|
||||
BITMAP bm;
|
||||
|
||||
/* if PSH_USEHBMWATERMARK is not set, load the resource from pszbmWatermark
|
||||
and put the HBITMAP in hbmWatermark. Thus all the rest of the code always
|
||||
considers hbmWatermark as valid. */
|
||||
if (!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK))
|
||||
{
|
||||
((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark =
|
||||
CreateMappedBitmap(ppshpage->hInstance, (INT)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0);
|
||||
}
|
||||
|
||||
/* Compute the offset x */
|
||||
GetObjectA(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
|
||||
offsetx = bm.bmWidth;
|
||||
}
|
||||
|
||||
if (psInfo->ppshheader.dwFlags & (PSH_HEADER | PSH_WIZARD97_NEW | PSH_WIZARD97_OLD))
|
||||
{
|
||||
/* Same behavior as for watermarks */
|
||||
if (!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER))
|
||||
{
|
||||
((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader =
|
||||
CreateMappedBitmap(ppshpage->hInstance, (INT)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0);
|
||||
}
|
||||
|
||||
hwndChild = GetDlgItem(hwndParent, IDC_SUNKEN_LINEHEADER);
|
||||
|
||||
GetClientRect(hwndChild, &r);
|
||||
MapWindowPoints(hwndChild, hwndParent, (LPPOINT) &r, 2);
|
||||
offsety = (ppshpage->dwFlags & PSP_HIDEHEADER)?0:r.bottom + 1;
|
||||
}
|
||||
|
||||
hwndChild = GetWindow(hwndPage, GW_CHILD);
|
||||
while((offsetx!=0) && (hwndChild)) {
|
||||
GetWindowRect(hwndChild, &r);
|
||||
MapWindowPoints(0, hwndPage, (LPPOINT)&r, 2);
|
||||
OffsetRect(&r, -offsetx, 0);
|
||||
SetWindowPos(hwndChild, 0, r.left, r.top,
|
||||
0, 0, SWP_NOSIZE | SWP_NOZORDER);
|
||||
|
||||
hwndChild = GetWindow(hwndChild, GW_HWNDNEXT);
|
||||
}
|
||||
|
||||
SetWindowPos(hwndPage, HWND_TOP,
|
||||
rc.left + padding.x/2,
|
||||
rc.top + padding.y/2,
|
||||
pageWidth, pageHeight, 0);
|
||||
rc.left + padding.x/2 + offsetx,
|
||||
rc.top + padding.y/2 + offsety,
|
||||
pageWidth - offsetx, pageHeight - offsety, 0);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
|
@ -1547,6 +1610,8 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
|||
static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
|
||||
{
|
||||
HWND hwndTabCtrl;
|
||||
HWND hwndLineHeader;
|
||||
LPCPROPSHEETPAGEW ppshpage;
|
||||
|
||||
TRACE("active_page %d, index %d\n", psInfo->active_page, index);
|
||||
if (index == psInfo->active_page)
|
||||
|
@ -1558,8 +1623,6 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
|
|||
|
||||
if (psInfo->proppage[index].hwndPage == 0)
|
||||
{
|
||||
LPCPROPSHEETPAGEW ppshpage;
|
||||
|
||||
ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage;
|
||||
PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage);
|
||||
}
|
||||
|
@ -1580,6 +1643,20 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
|
|||
psInfo->active_page = index;
|
||||
psInfo->activeValid = TRUE;
|
||||
|
||||
if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW) )
|
||||
{
|
||||
hwndLineHeader = GetDlgItem(hwndDlg, IDC_SUNKEN_LINEHEADER);
|
||||
ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage;
|
||||
|
||||
if ((ppshpage->dwFlags & PSP_HIDEHEADER) || (!(psInfo->ppshheader.dwFlags & PSH_HEADER)) )
|
||||
ShowWindow(hwndLineHeader, SW_HIDE);
|
||||
else
|
||||
ShowWindow(hwndLineHeader, SW_SHOW);
|
||||
|
||||
InvalidateRgn(hwndDlg, NULL, TRUE);
|
||||
UpdateWindow(hwndDlg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2469,6 +2546,16 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
|
|||
}
|
||||
}
|
||||
|
||||
DeleteObject(psInfo->hFont);
|
||||
DeleteObject(psInfo->hFontBold);
|
||||
/* If we created the bitmaps, destroy them */
|
||||
if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) &&
|
||||
(!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) )
|
||||
DeleteObject(psInfo->ppshheader.u4.hbmWatermark);
|
||||
if ((psInfo->ppshheader.dwFlags & PSH_HEADER) &&
|
||||
(!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)) )
|
||||
DeleteObject(psInfo->ppshheader.u5.hbmHeader);
|
||||
|
||||
Free(psInfo->proppage);
|
||||
Free(psInfo->strPropertiesFor);
|
||||
ImageList_Destroy(psInfo->hImageList);
|
||||
|
@ -2813,6 +2900,129 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* PROPSHEET_Paint
|
||||
*/
|
||||
static LRESULT PROPSHEET_Paint(HWND hwnd)
|
||||
{
|
||||
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc, hdcSrc;
|
||||
BITMAP bm;
|
||||
HBITMAP hbmp;
|
||||
HPALETTE hOldPal = 0;
|
||||
int offsety = 0;
|
||||
HBRUSH hbr;
|
||||
RECT r;
|
||||
LPCPROPSHEETPAGEW ppshpage;
|
||||
|
||||
hdc = BeginPaint(hwnd, &ps);
|
||||
if (!hdc) return 1;
|
||||
|
||||
hdcSrc = CreateCompatibleDC(0);
|
||||
ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[psInfo->active_page].hpage;
|
||||
|
||||
if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK)
|
||||
hOldPal = SelectPalette(hdc, psInfo->ppshheader.hplWatermark, FALSE);
|
||||
|
||||
if ( (!(ppshpage->dwFlags & PSP_HIDEHEADER)) &&
|
||||
(psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_HEADER)) )
|
||||
{
|
||||
RECT rzone;
|
||||
HWND hwndLineHeader = GetDlgItem(hwnd, IDC_SUNKEN_LINEHEADER);
|
||||
HFONT hOldFont;
|
||||
COLORREF clrOld = 0;
|
||||
int oldBkMode = 0;
|
||||
|
||||
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u5.hbmHeader);
|
||||
hOldFont = SelectObject(hdc, psInfo->hFontBold);
|
||||
|
||||
GetClientRect(hwndLineHeader, &r);
|
||||
MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
|
||||
SetRect(&rzone, 0, 0, r.right, r.top - 1);
|
||||
hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0));
|
||||
FillRect(hdc, &rzone, hbr);
|
||||
DeleteObject(hbr);
|
||||
|
||||
GetObjectA(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm);
|
||||
|
||||
clrOld = SetTextColor (hdc, 0x00000000);
|
||||
oldBkMode = SetBkMode (hdc, TRANSPARENT);
|
||||
|
||||
if (ppshpage->dwFlags & PSP_USEHEADERTITLE) {
|
||||
SetRect(&r, 20, 10, rzone.right - bm.bmWidth, 18);
|
||||
if (psInfo->unicode)
|
||||
DrawTextW(hdc, (LPWSTR)ppshpage->pszHeaderTitle,
|
||||
-1, &r, DT_LEFT | DT_SINGLELINE | DT_NOCLIP);
|
||||
else
|
||||
DrawTextA(hdc, (LPCSTR)ppshpage->pszHeaderTitle,
|
||||
-1, &r, DT_LEFT | DT_SINGLELINE | DT_NOCLIP);
|
||||
}
|
||||
|
||||
if (ppshpage->dwFlags & PSP_USEHEADERSUBTITLE) {
|
||||
SelectObject(hdc, psInfo->hFont);
|
||||
SetRect(&r, 40, 25, rzone.right - bm.bmWidth, 43);
|
||||
if (psInfo->unicode)
|
||||
DrawTextW(hdc, (LPWSTR)ppshpage->pszHeaderSubTitle,
|
||||
-1, &r, DT_LEFT | DT_SINGLELINE);
|
||||
else
|
||||
DrawTextA(hdc, (LPCSTR)ppshpage->pszHeaderSubTitle,
|
||||
-1, &r, DT_LEFT | DT_SINGLELINE);
|
||||
}
|
||||
|
||||
BitBlt(hdc, rzone.right - bm.bmWidth, (rzone.bottom - bm.bmHeight)/2,
|
||||
bm.bmWidth, bm.bmHeight,
|
||||
hdcSrc, 0, 0, SRCCOPY);
|
||||
offsety = rzone.bottom + 2;
|
||||
|
||||
SetTextColor(hdc, clrOld);
|
||||
SetBkMode(hdc, oldBkMode);
|
||||
SelectObject(hdc, hOldFont);
|
||||
SelectObject(hdcSrc, hbmp);
|
||||
}
|
||||
|
||||
if ( ((psInfo->active_page == 0) || (psInfo->active_page == psInfo->nPages - 1)) &&
|
||||
(psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_WATERMARK)) )
|
||||
{
|
||||
if (psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK )
|
||||
{
|
||||
HWND hwndLine = GetDlgItem(hwnd, IDC_SUNKEN_LINE);
|
||||
|
||||
GetClientRect(hwndLine, &r);
|
||||
MapWindowPoints(hwndLine, hwnd, (LPPOINT) &r, 2);
|
||||
|
||||
GetObjectA(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
|
||||
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark);
|
||||
|
||||
BitBlt(hdc, 0, offsety, bm.bmWidth, bm.bmHeight,
|
||||
hdcSrc, 0, 0, SRCCOPY);
|
||||
|
||||
/* If the bitmap is not big enough, fill the remaining area
|
||||
with the color of pixel (0,0) of bitmap - see MSDN */
|
||||
if (r.top > bm.bmHeight) {
|
||||
r.bottom = r.top - 1;
|
||||
r.top = bm.bmHeight;
|
||||
r.left = 0;
|
||||
r.right = bm.bmWidth;
|
||||
hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0));
|
||||
FillRect(hdc, &r, hbr);
|
||||
DeleteObject(hbr);
|
||||
}
|
||||
|
||||
SelectObject(hdcSrc, hbmp);
|
||||
}
|
||||
}
|
||||
|
||||
if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK)
|
||||
SelectPalette(hdc, hOldPal, FALSE);
|
||||
|
||||
DeleteDC(hdcSrc);
|
||||
|
||||
EndPaint(hwnd, &ps);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* PROPSHEET_DialogProc
|
||||
*/
|
||||
|
@ -2831,6 +3041,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL);
|
||||
LPCPROPSHEETPAGEW ppshpage;
|
||||
int idx;
|
||||
LOGFONTA logFont;
|
||||
|
||||
/* Using PropSheetInfoStr to store extra data doesn't match the native
|
||||
* common control: native uses TCM_[GS]ETITEM
|
||||
|
@ -2849,6 +3060,12 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
/* set up the Next and Back buttons by default */
|
||||
PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
|
||||
|
||||
/* Set up fonts */
|
||||
SystemParametersInfoA (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||
psInfo->hFont = CreateFontIndirectA (&logFont);
|
||||
logFont.lfWeight = FW_BOLD;
|
||||
psInfo->hFontBold = CreateFontIndirectA (&logFont);
|
||||
|
||||
/*
|
||||
* Small icon in the title bar.
|
||||
*/
|
||||
|
@ -2882,6 +3099,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD)
|
||||
{
|
||||
ShowWindow(hwndTabCtrl, SW_HIDE);
|
||||
if (PROPSHEET_IsTooSmallWizard(hwnd, psInfo))
|
||||
{
|
||||
PROPSHEET_AdjustSizeWizard(hwnd, psInfo);
|
||||
|
@ -2930,6 +3148,10 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_PAINT:
|
||||
PROPSHEET_Paint(hwnd);
|
||||
return TRUE;
|
||||
|
||||
case WM_DESTROY:
|
||||
PROPSHEET_CleanUp(hwnd);
|
||||
return TRUE;
|
||||
|
|
|
@ -763,19 +763,7 @@ LPWSTR WINAPI StrRChrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
|
|||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrSpnW [COMCTL32.364]
|
||||
*
|
||||
* See StrSpnA.
|
||||
*/
|
||||
int WINAPI StrSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
|
||||
{
|
||||
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
|
||||
|
||||
return COMCTL32_StrSpnHelperW(lpszStr, lpszMatch, StrChrW, FALSE);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrCSpnW [COMCTL32.@]
|
||||
* StrCSpnW [COMCTL32.364]
|
||||
*
|
||||
* See StrCSpnA.
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
* TCIF_RTLREADING
|
||||
*
|
||||
* Messages:
|
||||
* TCM_SETITEMEXTRA
|
||||
* TCM_REMOVEIMAGE
|
||||
* TCM_DESELECTALL
|
||||
* TCM_GETEXTENDEDSTYLE
|
||||
|
@ -56,15 +55,18 @@ typedef struct
|
|||
DWORD dwState;
|
||||
LPWSTR pszText;
|
||||
INT iImage;
|
||||
LPARAM lParam;
|
||||
RECT rect; /* bounding rectangle of the item relative to the
|
||||
* leftmost item (the leftmost item, 0, would have a
|
||||
* "left" member of 0 in this rectangle)
|
||||
*
|
||||
* additionally the top member hold the row number
|
||||
* and bottom is unused and should be 0 */
|
||||
RECT rect; /* bounding rectangle of the item relative to the
|
||||
* leftmost item (the leftmost item, 0, would have a
|
||||
* "left" member of 0 in this rectangle)
|
||||
*
|
||||
* additionally the top member hold the row number
|
||||
* and bottom is unused and should be 0 */
|
||||
BYTE extra[1]; /* Space for caller supplied info, variable size */
|
||||
} TAB_ITEM;
|
||||
|
||||
/* The size of a tab item depends on how much extra data is requested */
|
||||
#define TAB_ITEM_SIZE(infoPtr) (sizeof(TAB_ITEM) - sizeof(BYTE) + infoPtr->cbInfo)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HWND hwndNotify; /* notification window (parent) */
|
||||
|
@ -82,17 +84,18 @@ typedef struct
|
|||
HIMAGELIST himl; /* handle to a image list (may be 0) */
|
||||
HWND hwndToolTip; /* handle to tab's tooltip */
|
||||
INT leftmostVisible; /* Used for scrolling, this member contains
|
||||
* the index of the first visible item */
|
||||
* the index of the first visible item */
|
||||
INT iSelected; /* the currently selected item */
|
||||
INT iHotTracked; /* the highlighted item under the mouse */
|
||||
INT uFocus; /* item which has the focus */
|
||||
TAB_ITEM* items; /* pointer to an array of TAB_ITEM's */
|
||||
BOOL DoRedraw; /* flag for redrawing when tab contents is changed*/
|
||||
BOOL needsScrolling; /* TRUE if the size of the tabs is greater than
|
||||
* the size of the control */
|
||||
* the size of the control */
|
||||
BOOL fHeightSet; /* was the height of the tabs explicitly set? */
|
||||
BOOL bUnicode; /* Unicode control? */
|
||||
HWND hwndUpDown; /* Updown control used for scrolling */
|
||||
INT cbInfo; /* Number of bytes of caller supplied info per tab */
|
||||
} TAB_INFO;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -190,8 +193,8 @@ TAB_DumpItemInternal(TAB_INFO *infoPtr, UINT iItem)
|
|||
TRACE("tab %d, mask=0x%08x, dwState=0x%08lx, pszText=%s, iImage=%d\n",
|
||||
iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText),
|
||||
ti->iImage);
|
||||
TRACE("tab %d, lParam=0x%08lx, rect.left=%ld, rect.top(row)=%ld\n",
|
||||
iItem, ti->lParam, ti->rect.left, ti->rect.top);
|
||||
TRACE("tab %d, rect.left=%ld, rect.top(row)=%ld\n",
|
||||
iItem, ti->rect.left, ti->rect.top);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1654,7 +1657,8 @@ TAB_DrawItemInterior
|
|||
dis.hwndItem = hwnd; /* */
|
||||
dis.hDC = hdc;
|
||||
CopyRect(&dis.rcItem,drawRect);
|
||||
dis.itemData = infoPtr->items[iItem].lParam;
|
||||
dis.itemData = 0;
|
||||
memcpy( &dis.itemData, infoPtr->items[iItem].extra, min(sizeof(dis.itemData),infoPtr->cbInfo) );
|
||||
|
||||
/*
|
||||
* send the draw message
|
||||
|
@ -2520,7 +2524,7 @@ TAB_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
|
||||
if (infoPtr->uNumItem == 0) {
|
||||
infoPtr->items = Alloc (sizeof (TAB_ITEM));
|
||||
infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr));
|
||||
infoPtr->uNumItem++;
|
||||
infoPtr->iSelected = 0;
|
||||
}
|
||||
|
@ -2528,18 +2532,18 @@ TAB_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
TAB_ITEM *oldItems = infoPtr->items;
|
||||
|
||||
infoPtr->uNumItem++;
|
||||
infoPtr->items = Alloc (sizeof (TAB_ITEM) * infoPtr->uNumItem);
|
||||
infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr) * infoPtr->uNumItem);
|
||||
|
||||
/* pre insert copy */
|
||||
if (iItem > 0) {
|
||||
memcpy (&infoPtr->items[0], &oldItems[0],
|
||||
iItem * sizeof(TAB_ITEM));
|
||||
iItem * TAB_ITEM_SIZE(infoPtr));
|
||||
}
|
||||
|
||||
/* post insert copy */
|
||||
if (iItem < infoPtr->uNumItem - 1) {
|
||||
memcpy (&infoPtr->items[iItem+1], &oldItems[iItem],
|
||||
(infoPtr->uNumItem - iItem - 1) * sizeof(TAB_ITEM));
|
||||
(infoPtr->uNumItem - iItem - 1) * TAB_ITEM_SIZE(infoPtr));
|
||||
|
||||
}
|
||||
|
||||
|
@ -2557,8 +2561,10 @@ TAB_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
infoPtr->items[iItem].iImage = pti->iImage;
|
||||
|
||||
if (pti->mask & TCIF_PARAM)
|
||||
infoPtr->items[iItem].lParam = pti->lParam;
|
||||
|
||||
memcpy(infoPtr->items[iItem].extra, &pti->lParam, infoPtr->cbInfo);
|
||||
else
|
||||
memset(infoPtr->items[iItem].extra, 0, infoPtr->cbInfo);
|
||||
|
||||
TAB_SetItemBounds(hwnd);
|
||||
if (infoPtr->uNumItem > 1)
|
||||
TAB_InvalidateTabArea(hwnd, infoPtr);
|
||||
|
@ -2566,7 +2572,7 @@ TAB_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
|
||||
TRACE("[%p]: added item %d %s\n",
|
||||
hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
|
||||
hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
|
||||
|
||||
return iItem;
|
||||
}
|
||||
|
@ -2594,7 +2600,7 @@ TAB_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
TAB_DumpItemExternalW(pti, iItem);
|
||||
|
||||
if (infoPtr->uNumItem == 0) {
|
||||
infoPtr->items = Alloc (sizeof (TAB_ITEM));
|
||||
infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr));
|
||||
infoPtr->uNumItem++;
|
||||
infoPtr->iSelected = 0;
|
||||
}
|
||||
|
@ -2602,18 +2608,18 @@ TAB_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
TAB_ITEM *oldItems = infoPtr->items;
|
||||
|
||||
infoPtr->uNumItem++;
|
||||
infoPtr->items = Alloc (sizeof (TAB_ITEM) * infoPtr->uNumItem);
|
||||
infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr) * infoPtr->uNumItem);
|
||||
|
||||
/* pre insert copy */
|
||||
if (iItem > 0) {
|
||||
memcpy (&infoPtr->items[0], &oldItems[0],
|
||||
iItem * sizeof(TAB_ITEM));
|
||||
iItem * TAB_ITEM_SIZE(infoPtr));
|
||||
}
|
||||
|
||||
/* post insert copy */
|
||||
if (iItem < infoPtr->uNumItem - 1) {
|
||||
memcpy (&infoPtr->items[iItem+1], &oldItems[iItem],
|
||||
(infoPtr->uNumItem - iItem - 1) * sizeof(TAB_ITEM));
|
||||
(infoPtr->uNumItem - iItem - 1) * TAB_ITEM_SIZE(infoPtr));
|
||||
|
||||
}
|
||||
|
||||
|
@ -2631,7 +2637,9 @@ TAB_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
infoPtr->items[iItem].iImage = pti->iImage;
|
||||
|
||||
if (pti->mask & TCIF_PARAM)
|
||||
infoPtr->items[iItem].lParam = pti->lParam;
|
||||
memcpy(infoPtr->items[iItem].extra, &pti->lParam, infoPtr->cbInfo);
|
||||
else
|
||||
memset(infoPtr->items[iItem].extra, 0, infoPtr->cbInfo);
|
||||
|
||||
TAB_SetItemBounds(hwnd);
|
||||
if (infoPtr->uNumItem > 1)
|
||||
|
@ -2640,7 +2648,7 @@ TAB_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
|
||||
TRACE("[%p]: added item %d %s\n",
|
||||
hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
|
||||
hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
|
||||
|
||||
return iItem;
|
||||
}
|
||||
|
@ -2739,7 +2747,7 @@ TAB_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
wineItem->iImage = tabItem->iImage;
|
||||
|
||||
if (tabItem->mask & TCIF_PARAM)
|
||||
wineItem->lParam = tabItem->lParam;
|
||||
memcpy(wineItem->extra, &tabItem->lParam, infoPtr->cbInfo);
|
||||
|
||||
if (tabItem->mask & TCIF_RTLREADING)
|
||||
FIXME("TCIF_RTLREADING\n");
|
||||
|
@ -2780,7 +2788,7 @@ TAB_SetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
wineItem->iImage = tabItem->iImage;
|
||||
|
||||
if (tabItem->mask & TCIF_PARAM)
|
||||
wineItem->lParam = tabItem->lParam;
|
||||
memcpy(wineItem->extra, &tabItem->lParam, infoPtr->cbInfo);
|
||||
|
||||
if (tabItem->mask & TCIF_RTLREADING)
|
||||
FIXME("TCIF_RTLREADING\n");
|
||||
|
@ -2828,7 +2836,7 @@ TAB_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
tabItem->iImage = wineItem->iImage;
|
||||
|
||||
if (tabItem->mask & TCIF_PARAM)
|
||||
tabItem->lParam = wineItem->lParam;
|
||||
memcpy(&tabItem->lParam, wineItem->extra, infoPtr->cbInfo);
|
||||
|
||||
if (tabItem->mask & TCIF_RTLREADING)
|
||||
FIXME("TCIF_RTLREADING\n");
|
||||
|
@ -2865,7 +2873,7 @@ TAB_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
tabItem->iImage = wineItem->iImage;
|
||||
|
||||
if (tabItem->mask & TCIF_PARAM)
|
||||
tabItem->lParam = wineItem->lParam;
|
||||
memcpy(&tabItem->lParam, wineItem->extra, infoPtr->cbInfo);
|
||||
|
||||
if (tabItem->mask & TCIF_RTLREADING)
|
||||
FIXME("TCIF_RTLREADING\n");
|
||||
|
@ -2896,14 +2904,14 @@ TAB_DeleteItem (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
TAB_InvalidateTabArea(hwnd, infoPtr);
|
||||
|
||||
infoPtr->uNumItem--;
|
||||
infoPtr->items = Alloc(sizeof (TAB_ITEM) * infoPtr->uNumItem);
|
||||
infoPtr->items = Alloc(TAB_ITEM_SIZE(infoPtr) * infoPtr->uNumItem);
|
||||
|
||||
if (iItem > 0)
|
||||
memcpy(&infoPtr->items[0], &oldItems[0], iItem * sizeof(TAB_ITEM));
|
||||
memcpy(&infoPtr->items[0], &oldItems[0], iItem * TAB_ITEM_SIZE(infoPtr));
|
||||
|
||||
if (iItem < infoPtr->uNumItem)
|
||||
memcpy(&infoPtr->items[iItem], &oldItems[iItem + 1],
|
||||
(infoPtr->uNumItem - iItem) * sizeof(TAB_ITEM));
|
||||
(infoPtr->uNumItem - iItem) * TAB_ITEM_SIZE(infoPtr));
|
||||
|
||||
Free(oldItems);
|
||||
|
||||
|
@ -3081,7 +3089,8 @@ TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
infoPtr->hwndUpDown = 0;
|
||||
infoPtr->leftmostVisible = 0;
|
||||
infoPtr->fHeightSet = FALSE;
|
||||
infoPtr->bUnicode = IsWindowUnicode (hwnd);
|
||||
infoPtr->bUnicode = IsWindowUnicode (hwnd);
|
||||
infoPtr->cbInfo = sizeof(LPARAM);
|
||||
|
||||
TRACE("Created tab control, hwnd [%p]\n", hwnd);
|
||||
|
||||
|
@ -3174,6 +3183,25 @@ TAB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TAB_SetItemExtra (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
|
||||
INT cbInfo = wParam;
|
||||
|
||||
if (!infoPtr || cbInfo <= 0)
|
||||
return FALSE;
|
||||
|
||||
if (infoPtr->uNumItem)
|
||||
{
|
||||
/* FIXME: MSDN says this is not allowed, but this hasn't been verified */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
infoPtr->cbInfo = cbInfo;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT WINAPI
|
||||
TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -3231,8 +3259,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return TAB_InsertItemW (hwnd, wParam, lParam);
|
||||
|
||||
case TCM_SETITEMEXTRA:
|
||||
FIXME("Unimplemented msg TCM_SETITEMEXTRA\n");
|
||||
return 0;
|
||||
return TAB_SetItemExtra (hwnd, wParam, lParam);
|
||||
|
||||
case TCM_ADJUSTRECT:
|
||||
return TAB_AdjustRect (hwnd, (BOOL)wParam, (LPRECT)lParam);
|
||||
|
|
|
@ -52,8 +52,6 @@
|
|||
* - Notifications:
|
||||
* - NM_CHAR
|
||||
* - NM_KEYDOWN
|
||||
* - NM_RDBLCLICK
|
||||
* - TBN_DRAGOUT
|
||||
* - TBN_GETOBJECT
|
||||
* - TBN_RESTORE
|
||||
* - TBN_SAVE
|
||||
|
@ -100,9 +98,10 @@ typedef struct
|
|||
INT idCommand;
|
||||
BYTE fsState;
|
||||
BYTE fsStyle;
|
||||
BYTE bHot;
|
||||
BYTE bDropDownPressed;
|
||||
DWORD dwData;
|
||||
INT iString;
|
||||
BOOL bHot;
|
||||
INT nRow;
|
||||
RECT rect;
|
||||
INT cx; /* manually set size */
|
||||
|
@ -163,12 +162,12 @@ typedef struct
|
|||
HWND hwndToolTip; /* handle to tool tip control */
|
||||
HWND hwndNotify; /* handle to the window that gets notifications */
|
||||
HWND hwndSelf; /* my own handle */
|
||||
BOOL bTransparent; /* background transparency flag */
|
||||
BOOL bBtnTranspnt; /* button transparency flag */
|
||||
BOOL bAutoSize; /* auto size deadlock indicator */
|
||||
BOOL bAnchor; /* anchor highlight enabled */
|
||||
BOOL bNtfUnicode; /* TRUE if NOTIFYs use {W} */
|
||||
BOOL bDoRedraw; /* Redraw status */
|
||||
BOOL bDragOutSent; /* has TBN_DRAGOUT notification been sent for this drag? */
|
||||
DWORD dwStyle; /* regular toolbar style */
|
||||
DWORD dwExStyle; /* extended toolbar style */
|
||||
DWORD dwDTFlags; /* DrawText flags */
|
||||
|
@ -788,14 +787,16 @@ TOOLBAR_DrawFrame(const TOOLBAR_INFO *infoPtr, BOOL flat, const NMTBCUSTOMDRAW *
|
|||
}
|
||||
|
||||
static void
|
||||
TOOLBAR_DrawSepDDArrow(const TOOLBAR_INFO *infoPtr, BOOL flat, const NMTBCUSTOMDRAW *tbcd, RECT *rcArrow)
|
||||
TOOLBAR_DrawSepDDArrow(const TOOLBAR_INFO *infoPtr, const NMTBCUSTOMDRAW *tbcd, RECT *rcArrow, BOOL bDropDownPressed)
|
||||
{
|
||||
HDC hdc = tbcd->nmcd.hdc;
|
||||
int offset = 0;
|
||||
BOOL pressed = bDropDownPressed ||
|
||||
(tbcd->nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED));
|
||||
|
||||
if (flat)
|
||||
if (infoPtr->dwStyle & TBSTYLE_FLAT)
|
||||
{
|
||||
if ((tbcd->nmcd.uItemState & CDIS_SELECTED) || (tbcd->nmcd.uItemState & CDIS_CHECKED))
|
||||
if (pressed)
|
||||
DrawEdge (hdc, rcArrow, BDR_SUNKENOUTER, BF_RECT);
|
||||
else if ( (tbcd->nmcd.uItemState & CDIS_HOT) &&
|
||||
!(tbcd->nmcd.uItemState & CDIS_DISABLED) &&
|
||||
|
@ -804,14 +805,14 @@ TOOLBAR_DrawSepDDArrow(const TOOLBAR_INFO *infoPtr, BOOL flat, const NMTBCUSTOMD
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((tbcd->nmcd.uItemState & CDIS_SELECTED) || (tbcd->nmcd.uItemState & CDIS_CHECKED))
|
||||
if (pressed)
|
||||
DrawEdge (hdc, rcArrow, EDGE_SUNKEN, BF_RECT | BF_MIDDLE);
|
||||
else
|
||||
DrawEdge (hdc, rcArrow, EDGE_RAISED,
|
||||
BF_SOFT | BF_RECT | BF_MIDDLE);
|
||||
}
|
||||
|
||||
if (tbcd->nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED))
|
||||
if (pressed)
|
||||
offset = (infoPtr->dwItemCDFlag & TBCDRF_NOOFFSET) ? 0 : 1;
|
||||
|
||||
if (tbcd->nmcd.uItemState & (CDIS_DISABLED | CDIS_INDETERMINATE))
|
||||
|
@ -997,7 +998,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
|
|||
TOOLBAR_DrawFrame(infoPtr, dwStyle & TBSTYLE_FLAT, &tbcd);
|
||||
|
||||
if (drawSepDropDownArrow)
|
||||
TOOLBAR_DrawSepDDArrow(infoPtr, dwStyle & TBSTYLE_FLAT, &tbcd, &rcArrow);
|
||||
TOOLBAR_DrawSepDDArrow(infoPtr, &tbcd, &rcArrow, btnPtr->bDropDownPressed);
|
||||
|
||||
if (!(infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || (btnPtr->fsStyle & BTNS_SHOWTEXT))
|
||||
TOOLBAR_DrawString (infoPtr, &rcText, lpText, &tbcd);
|
||||
|
@ -3296,9 +3297,7 @@ TOOLBAR_GetButtonTextW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||
INT nIndex;
|
||||
LPWSTR lpText;
|
||||
|
||||
if (lParam == 0)
|
||||
return -1;
|
||||
LRESULT ret = 0;
|
||||
|
||||
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
|
||||
if (nIndex == -1)
|
||||
|
@ -3306,9 +3305,15 @@ TOOLBAR_GetButtonTextW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
lpText = TOOLBAR_GetText(infoPtr,&infoPtr->buttons[nIndex]);
|
||||
|
||||
strcpyW ((LPWSTR)lParam, lpText);
|
||||
if (lpText)
|
||||
{
|
||||
ret = strlenW (lpText);
|
||||
|
||||
return strlenW (lpText);
|
||||
if (lParam)
|
||||
strcpyW ((LPWSTR)lParam, lpText);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5106,10 +5111,10 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
infoPtr->nOldHit = -1;
|
||||
infoPtr->nHotItem = -1;
|
||||
infoPtr->hwndNotify = ((LPCREATESTRUCTW)lParam)->hwndParent;
|
||||
infoPtr->bTransparent = (dwStyle & TBSTYLE_TRANSPARENT);
|
||||
infoPtr->bBtnTranspnt = (dwStyle & (TBSTYLE_FLAT | TBSTYLE_LIST));
|
||||
infoPtr->dwDTFlags = (dwStyle & TBSTYLE_LIST) ? DT_LEFT | DT_VCENTER | DT_SINGLELINE : DT_CENTER;
|
||||
infoPtr->dwDTFlags = (dwStyle & TBSTYLE_LIST) ? DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS: DT_CENTER | DT_END_ELLIPSIS;
|
||||
infoPtr->bAnchor = FALSE; /* no anchor highlighting */
|
||||
infoPtr->bDragOutSent = FALSE;
|
||||
infoPtr->iVersion = 0;
|
||||
infoPtr->hwndSelf = hwnd;
|
||||
infoPtr->bDoRedraw = TRUE;
|
||||
|
@ -5232,7 +5237,7 @@ TOOLBAR_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
/* If the toolbar is "transparent" then pass the WM_ERASEBKGND up
|
||||
* to my parent for processing.
|
||||
*/
|
||||
if (infoPtr->bTransparent) {
|
||||
if (infoPtr->dwStyle & TBSTYLE_TRANSPARENT) {
|
||||
POINT pt, ptorig;
|
||||
HDC hdc = (HDC)wParam;
|
||||
HWND parent;
|
||||
|
@ -5352,7 +5357,10 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
LRESULT res;
|
||||
|
||||
/* draw in pressed state */
|
||||
btnPtr->fsState |= TBSTATE_PRESSED;
|
||||
if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN)
|
||||
btnPtr->fsState |= TBSTATE_PRESSED;
|
||||
else
|
||||
btnPtr->bDropDownPressed = TRUE;
|
||||
RedrawWindow(hwnd,&btnPtr->rect,0,
|
||||
RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW);
|
||||
|
||||
|
@ -5370,7 +5378,10 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
MSG msg;
|
||||
|
||||
/* redraw button in unpressed state */
|
||||
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
||||
if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN)
|
||||
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
||||
else
|
||||
btnPtr->bDropDownPressed = FALSE;
|
||||
InvalidateRect(hwnd, &btnPtr->rect, TRUE);
|
||||
|
||||
/* find and set hot item
|
||||
|
@ -5380,9 +5391,10 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
nHit = TOOLBAR_InternalHitTest(hwnd, &pt);
|
||||
TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE | HICF_LMOUSE);
|
||||
|
||||
/* remove any left mouse button down messages so that we can
|
||||
* get a toggle effect on the button */
|
||||
while (PeekMessageW(&msg, hwnd, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE))
|
||||
/* remove any left mouse button down or double-click messages
|
||||
* so that we can get a toggle effect on the button */
|
||||
while (PeekMessageW(&msg, hwnd, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE) ||
|
||||
PeekMessageW(&msg, hwnd, WM_LBUTTONDBLCLK, WM_LBUTTONDBLCLK, PM_REMOVE))
|
||||
;
|
||||
|
||||
return 0;
|
||||
|
@ -5391,6 +5403,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
infoPtr->bCaptured = TRUE;
|
||||
infoPtr->nButtonDown = nHit;
|
||||
infoPtr->bDragOutSent = FALSE;
|
||||
|
||||
btnPtr->fsState |= TBSTATE_PRESSED;
|
||||
|
||||
|
@ -5565,7 +5578,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
MAKEWPARAM(infoPtr->buttons[nHit].idCommand, 0), (LPARAM)hwnd);
|
||||
|
||||
/* !!! Undocumented - toolbar at 4.71 level and above sends
|
||||
* either NMRCLICK or NM_CLICK with the NMMOUSE structure.
|
||||
* either NM_RCLICK or NM_CLICK with the NMMOUSE structure.
|
||||
* Only NM_RCLICK is documented.
|
||||
*/
|
||||
nmmouse.dwItemSpec = btnPtr->idCommand;
|
||||
|
@ -5586,7 +5599,7 @@ TOOLBAR_RButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
pt.x = LOWORD(lParam);
|
||||
pt.y = HIWORD(lParam);
|
||||
|
||||
|
||||
nmmouse.dwHitInfo = TOOLBAR_InternalHitTest(hwnd, &pt);
|
||||
|
||||
if (nmmouse.dwHitInfo < 0) {
|
||||
|
@ -5604,6 +5617,34 @@ TOOLBAR_RButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TOOLBAR_RButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||
|
||||
NMMOUSE nmmouse;
|
||||
POINT pt;
|
||||
|
||||
pt.x = LOWORD(lParam);
|
||||
pt.y = HIWORD(lParam);
|
||||
|
||||
nmmouse.dwHitInfo = TOOLBAR_InternalHitTest(hwnd, &pt);
|
||||
|
||||
if (nmmouse.dwHitInfo < 0)
|
||||
nmmouse.dwItemSpec = -1;
|
||||
else {
|
||||
nmmouse.dwItemSpec = infoPtr->buttons[nmmouse.dwHitInfo].idCommand;
|
||||
nmmouse.dwItemData = infoPtr->buttons[nmmouse.dwHitInfo].dwData;
|
||||
}
|
||||
|
||||
ClientToScreen(hwnd, &pt);
|
||||
memcpy(&nmmouse.pt, &pt, sizeof(POINT));
|
||||
|
||||
TOOLBAR_SendNotify((LPNMHDR)&nmmouse, infoPtr, NM_RDBLCLK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TOOLBAR_CaptureChanged(HWND hwnd)
|
||||
{
|
||||
|
@ -5629,20 +5670,24 @@ static LRESULT
|
|||
TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||
TBUTTON_INFO *hotBtnPtr, *btnPtr;
|
||||
RECT rc1;
|
||||
TBUTTON_INFO *hotBtnPtr;
|
||||
|
||||
TOOLBAR_SetHotItemEx(infoPtr, -1, HICF_MOUSE);
|
||||
hotBtnPtr = &infoPtr->buttons[infoPtr->nOldHit];
|
||||
|
||||
/* don't remove hot effects when in drop-down */
|
||||
if (infoPtr->nOldHit < 0 || !hotBtnPtr->bDropDownPressed)
|
||||
TOOLBAR_SetHotItemEx(infoPtr, -1, HICF_MOUSE);
|
||||
|
||||
if (infoPtr->nOldHit < 0)
|
||||
return TRUE;
|
||||
|
||||
hotBtnPtr = &infoPtr->buttons[infoPtr->nOldHit];
|
||||
|
||||
/* If the last button we were over is depressed then make it not */
|
||||
/* depressed and redraw it */
|
||||
if(infoPtr->nOldHit == infoPtr->nButtonDown)
|
||||
{
|
||||
TBUTTON_INFO *btnPtr;
|
||||
RECT rc1;
|
||||
|
||||
btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
|
||||
|
||||
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
||||
|
@ -5652,6 +5697,15 @@ TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
InvalidateRect (hwnd, &rc1, TRUE);
|
||||
}
|
||||
|
||||
if (infoPtr->bCaptured && !infoPtr->bDragOutSent)
|
||||
{
|
||||
NMTOOLBARW nmt;
|
||||
ZeroMemory(&nmt, sizeof(nmt));
|
||||
nmt.iItem = infoPtr->buttons[infoPtr->nButtonDown].idCommand;
|
||||
TOOLBAR_SendNotify(&nmt.hdr, infoPtr, TBN_DRAGOUT);
|
||||
infoPtr->bDragOutSent = TRUE;
|
||||
}
|
||||
|
||||
infoPtr->nOldHit = -1; /* reset the old hit index as we've left the toolbar */
|
||||
|
||||
return TRUE;
|
||||
|
@ -5699,6 +5753,15 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
if (infoPtr->bCaptured)
|
||||
{
|
||||
if (!infoPtr->bDragOutSent)
|
||||
{
|
||||
NMTOOLBARW nmt;
|
||||
ZeroMemory(&nmt, sizeof(nmt));
|
||||
nmt.iItem = infoPtr->buttons[infoPtr->nButtonDown].idCommand;
|
||||
TOOLBAR_SendNotify(&nmt.hdr, infoPtr, TBN_DRAGOUT);
|
||||
infoPtr->bDragOutSent = TRUE;
|
||||
}
|
||||
|
||||
btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
|
||||
if (infoPtr->nOldHit == infoPtr->nButtonDown) {
|
||||
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
||||
|
@ -6251,12 +6314,11 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, LPSTYLESTRUCT lpStyle)
|
|||
|
||||
if (nType == GWL_STYLE) {
|
||||
if (lpStyle->styleNew & TBSTYLE_LIST) {
|
||||
infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE;
|
||||
infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS;
|
||||
}
|
||||
else {
|
||||
infoPtr->dwDTFlags = DT_CENTER;
|
||||
infoPtr->dwDTFlags = DT_CENTER | DT_END_ELLIPSIS;
|
||||
}
|
||||
infoPtr->bTransparent = (lpStyle->styleNew & TBSTYLE_TRANSPARENT);
|
||||
infoPtr->bBtnTranspnt = (lpStyle->styleNew &
|
||||
(TBSTYLE_FLAT | TBSTYLE_LIST));
|
||||
TOOLBAR_CheckStyle (hwnd, lpStyle->styleNew);
|
||||
|
@ -6619,6 +6681,9 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_RBUTTONUP:
|
||||
return TOOLBAR_RButtonUp (hwnd, wParam, lParam);
|
||||
|
||||
case WM_RBUTTONDBLCLK:
|
||||
return TOOLBAR_RButtonDblClk (hwnd, wParam, lParam);
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
return TOOLBAR_MouseMove (hwnd, wParam, lParam);
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
Index: comctl32.spec
|
||||
===================================================================
|
||||
RCS file: /home/wine/wine/dlls/comctl32/comctl32.spec,v
|
||||
retrieving revision 1.43
|
||||
diff -u -r1.43 comctl32.spec
|
||||
--- comctl32.spec 20 Feb 2004 05:16:37 -0000 1.43
|
||||
+++ comctl32.spec 8 May 2004 11:49:39 -0000
|
||||
retrieving revision 1.44
|
||||
diff -u -r1.44 comctl32.spec
|
||||
--- comctl32.spec 17 May 2004 20:51:27 -0000 1.44
|
||||
+++ comctl32.spec 16 Jun 2004 06:51:02 -0000
|
||||
@@ -106,13 +106,13 @@
|
||||
412 stdcall RemoveWindowSubclass(long ptr long)
|
||||
413 stdcall DefSubclassProc(long long long long)
|
||||
|
@ -26,84 +26,13 @@ diff -u -r1.43 comctl32.spec
|
|||
|
||||
# Functions imported by name
|
||||
|
||||
Index: commctrl.c
|
||||
===================================================================
|
||||
RCS file: /home/wine/wine/dlls/comctl32/commctrl.c,v
|
||||
retrieving revision 1.76
|
||||
diff -u -r1.76 commctrl.c
|
||||
--- commctrl.c 11 Mar 2004 22:38:22 -0000 1.76
|
||||
+++ commctrl.c 8 May 2004 11:49:41 -0000
|
||||
@@ -114,7 +114,6 @@
|
||||
extern void UPDOWN_Register(void);
|
||||
extern void UPDOWN_Unregister(void);
|
||||
|
||||
-static LRESULT WINAPI SubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
LPSTR COMCTL32_aSubclass = NULL;
|
||||
HMODULE COMCTL32_hModule = 0;
|
||||
@@ -1109,10 +1108,10 @@
|
||||
/* set window procedure to our own and save the current one */
|
||||
if (IsWindowUnicode (hWnd))
|
||||
stack->origproc = (WNDPROC)SetWindowLongW (hWnd, GWL_WNDPROC,
|
||||
- (LONG)SubclassWndProc);
|
||||
+ (LONG)DefSubclassProc);
|
||||
else
|
||||
stack->origproc = (WNDPROC)SetWindowLongA (hWnd, GWL_WNDPROC,
|
||||
- (LONG)SubclassWndProc);
|
||||
+ (LONG)DefSubclassProc);
|
||||
} else {
|
||||
WNDPROC current;
|
||||
if (IsWindowUnicode (hWnd))
|
||||
@@ -1120,7 +1119,7 @@
|
||||
else
|
||||
current = (WNDPROC)GetWindowLongA (hWnd, GWL_WNDPROC);
|
||||
|
||||
- if (current != SubclassWndProc) {
|
||||
+ if (current != DefSubclassProc) {
|
||||
ERR ("Application has subclassed with our procedure, then manually, then with us again. The current implementation can't handle this.\n");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1260,33 +1259,6 @@
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * SubclassWndProc (internal)
|
||||
- *
|
||||
- * Window procedure for all subclassed windows.
|
||||
- * Saves the current subclassing stack position to support nested messages
|
||||
- */
|
||||
-
|
||||
-static LRESULT WINAPI SubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
-{
|
||||
- LPSUBCLASS_INFO stack;
|
||||
- int stackpos;
|
||||
- LRESULT ret;
|
||||
-
|
||||
- /* retrieve our little stack from the Properties */
|
||||
- stack = (LPSUBCLASS_INFO)GetPropA (hWnd, COMCTL32_aSubclass);
|
||||
- if (!stack) {
|
||||
- ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
|
||||
- return 0;
|
||||
- }
|
||||
- stackpos = stack->stackpos;
|
||||
- stack->stackpos = stack->stacknum;
|
||||
- ret = DefSubclassProc(hWnd,uMsg,wParam,lParam);
|
||||
- stack->stackpos = stackpos;
|
||||
- return ret;
|
||||
}
|
||||
|
||||
|
||||
Index: imagelist.c
|
||||
===================================================================
|
||||
RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v
|
||||
retrieving revision 1.85
|
||||
diff -u -r1.85 imagelist.c
|
||||
--- imagelist.c 27 Feb 2004 04:40:08 -0000 1.85
|
||||
+++ imagelist.c 8 May 2004 11:49:43 -0000
|
||||
+++ imagelist.c 16 Jun 2004 06:51:02 -0000
|
||||
@@ -1146,11 +1146,13 @@
|
||||
PatBlt(hBlendMaskDC, 0, 0, cx, cy, PATCOPY);
|
||||
SelectObject(hBlendMaskDC, hOldBrush);
|
||||
|
@ -121,10 +50,10 @@ diff -u -r1.85 imagelist.c
|
|||
Index: listview.c
|
||||
===================================================================
|
||||
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
|
||||
retrieving revision 1.387
|
||||
diff -u -r1.387 listview.c
|
||||
--- listview.c 21 Apr 2004 22:25:04 -0000 1.387
|
||||
+++ listview.c 8 May 2004 11:49:47 -0000
|
||||
retrieving revision 1.389
|
||||
diff -u -r1.389 listview.c
|
||||
--- listview.c 4 Jun 2004 17:58:29 -0000 1.389
|
||||
+++ listview.c 16 Jun 2004 06:51:06 -0000
|
||||
@@ -147,6 +147,7 @@
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
@ -136,10 +65,10 @@ diff -u -r1.387 listview.c
|
|||
Index: string.c
|
||||
===================================================================
|
||||
RCS file: /home/wine/wine/dlls/comctl32/string.c,v
|
||||
retrieving revision 1.3
|
||||
diff -u -r1.3 string.c
|
||||
--- string.c 20 Feb 2004 19:58:39 -0000 1.3
|
||||
+++ string.c 8 May 2004 11:49:52 -0000
|
||||
retrieving revision 1.4
|
||||
diff -u -r1.4 string.c
|
||||
--- string.c 17 May 2004 20:51:27 -0000 1.4
|
||||
+++ string.c 16 Jun 2004 06:51:06 -0000
|
||||
@@ -254,7 +254,7 @@
|
||||
{
|
||||
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue