mirror of
https://github.com/reactos/reactos.git
synced 2024-07-04 03:34:16 +00:00
re-sync comctl32 to 20060328.
svn path=/trunk/; revision=21424
This commit is contained in:
parent
a27ea9fe0a
commit
a55b0b326d
|
@ -106,13 +106,13 @@
|
|||
412 stdcall -noname RemoveWindowSubclass(long ptr long)
|
||||
413 stdcall -noname DefSubclassProc(long long long long)
|
||||
414 stdcall -noname MirrorIcon(ptr ptr)
|
||||
415 stdcall DrawTextWrap(long wstr long ptr long) user32.DrawTextW
|
||||
416 stdcall DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW
|
||||
417 stdcall ExtTextOutWrap(long long long long ptr wstr long ptr) gdi32.ExtTextOutW
|
||||
418 stdcall GetCharWidthWrap(long long long long) gdi32.GetCharWidthW
|
||||
419 stdcall GetTextExtentPointWrap(long wstr long ptr) gdi32.GetTextExtentPointW
|
||||
420 stdcall GetTextExtentPoint32Wrap(long wstr long ptr) gdi32.GetTextExtentPoint32W
|
||||
421 stdcall TextOutWrap(long long long wstr long) gdi32.TextOutW
|
||||
415 stdcall -noname DrawTextWrap(long wstr long ptr long) user32.DrawTextW
|
||||
416 stdcall -noname DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW
|
||||
417 stdcall -noname ExtTextOutWrap(long long long long ptr wstr long ptr) gdi32.ExtTextOutW
|
||||
418 stdcall -noname GetCharWidthWrap(long long long long) gdi32.GetCharWidthW
|
||||
419 stdcall -noname GetTextExtentPointWrap(long wstr long ptr) gdi32.GetTextExtentPointW
|
||||
420 stdcall -noname GetTextExtentPoint32Wrap(long wstr long ptr) gdi32.GetTextExtentPoint32W
|
||||
421 stdcall -noname TextOutWrap(long long long wstr long) gdi32.TextOutW
|
||||
|
||||
# Functions imported by name
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* Hey, Emacs, open this file with -*- coding: cp1250 -*-
|
||||
*
|
||||
* Copyright 1999 Eric Kohl
|
||||
*
|
||||
* Czech resources for comctl32
|
||||
|
@ -21,6 +22,8 @@
|
|||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
/* Czech strings in CP1250 */
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Vlastnosti "
|
||||
|
@ -28,7 +31,7 @@ FONT 8, "MS Shell Dlg"
|
|||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Storno", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Pou¾ít", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Použít", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Nápovìda", 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
|
||||
|
@ -40,7 +43,7 @@ CAPTION "Pr
|
|||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Zpìt", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Dal¹í >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Další >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Dokonèit", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "Storno", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Nápovìda", IDHELP,235,138,50,14,WS_GROUP
|
||||
|
@ -76,7 +79,7 @@ STRINGTABLE DISCARDABLE
|
|||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Dnes:"
|
||||
IDM_GOTODAY "Jdi na dne¹ek"
|
||||
IDM_GOTODAY "Jdi na dnešek"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@ -86,5 +89,5 @@ STRINGTABLE DISCARDABLE
|
|||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "®ádný"
|
||||
HKY_NONE "Žádný"
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
/*
|
||||
* Hungarian resources for comctl32
|
||||
*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2005 Robert Horvath - Hungarian translation - talley at cubeclub.hu
|
||||
* Copyright 2006 Andras Kovacs
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -19,33 +16,33 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_NEUTRAL
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Beállítások "
|
||||
CAPTION "Tulajdonságok: "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Mégse", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Alkalmaz", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Súgó", 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
|
||||
PUSHBUTTON "&Alkalmazás", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Súgó", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Fül", 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 "Telepítõ"
|
||||
CAPTION "Varázsló"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Vissza", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Tovább >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Befejezés", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Elõzõ", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Következõ >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Kész", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "Mégse", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Súgó", 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
|
||||
CONTROL "Fül", 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
|
||||
|
||||
|
@ -55,36 +52,36 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
|||
CAPTION "Eszköztár testreszabása"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Bezár", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "V&isszaállít", IDC_RESET_BTN,308,23,44,14
|
||||
DEFPUSHBUTTON "&Bezárás", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "Alaph&elyzet", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Súgó", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "&Fel", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "&Le", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Elérhetõ gombok:", -1,4,5,84,10
|
||||
LTEXT "El&érhetõ gombok:", -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 "&Hozzáad ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Töröl", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "Eszköz&tár gombjai:", -1,182,5,78,10
|
||||
PUSHBUTTON "<- El&vesz", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "E&szköztár gombok:", -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 "Bezár"
|
||||
IDS_CLOSE "Bezárás"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Ma:"
|
||||
IDM_GOTODAY "Mai nap"
|
||||
IDM_GOTODAY "Ugrás mára"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separator"
|
||||
IDS_SEPARATOR "Elválasztó"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Ismeretlen"
|
||||
HKY_NONE "Nincs"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_NEUTRAL
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
|
@ -27,13 +27,13 @@ BEGIN
|
|||
PUSHBUTTON "キャンセル", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "適用(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "ヘルプ", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "タブ", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
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 "Wizard"
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
PUSHBUTTON "< 戻る(&B)", IDC_BACK_BUTTON,71,138,50,14
|
||||
|
@ -42,46 +42,46 @@ BEGIN
|
|||
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 "タブ", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
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 "Customize Toolbar"
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "閉じる(&C)", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "リセット(&E)", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "ƒŠƒZƒbƒg(R&)", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "ヘルプ(&H)", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "上へ (&U)", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "下へ (&D)", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "使用できるボタン(&V):", -1,4,5,84,10
|
||||
LTEXT "A&vailable buttons:", -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 "追加(&A) ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- 削除(&R)", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "ツール バーのボタン(&T):", -1,182,5,78,10
|
||||
LTEXT "&Toolbar buttons:", -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 "Close"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "今日:"
|
||||
IDM_GOTODAY "今日へ移動"
|
||||
IDM_TODAY "Today:"
|
||||
IDM_GOTODAY "Go to today"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "区切り線"
|
||||
IDS_SEPARATOR "Separator"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "なし"
|
||||
HKY_NONE "None"
|
||||
}
|
||||
|
|
|
@ -166,6 +166,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
|||
RECT r;
|
||||
INT oldBkMode, cxEdge = GetSystemMetrics(SM_CXEDGE);
|
||||
HTHEME theme = GetWindowTheme (hwnd);
|
||||
NMCUSTOMDRAW nmcd;
|
||||
|
||||
TRACE("DrawItem(iItem %d bHotTrack %d unicode flag %d)\n", iItem, bHotTrack, infoPtr->bUnicode);
|
||||
|
||||
|
@ -205,9 +206,9 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
|||
r.left -= cxEdge;
|
||||
r.right += cxEdge;
|
||||
|
||||
if (phdi->fmt & HDF_OWNERDRAW) {
|
||||
DRAWITEMSTRUCT dis;
|
||||
NMCUSTOMDRAW nmcd;
|
||||
/* Set the colors before sending NM_CUSTOMDRAW so that it can change them */
|
||||
SetTextColor (hdc, (bHotTrack && !theme) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT);
|
||||
SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
|
||||
|
||||
nmcd.hdr.hwndFrom = hwnd;
|
||||
nmcd.hdr.idFrom = GetWindowLongPtrW (hwnd, GWLP_ID);
|
||||
|
@ -219,8 +220,10 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
|||
nmcd.uItemState = phdi->bDown ? CDIS_SELECTED : 0;
|
||||
nmcd.lItemlParam = phdi->lParam;
|
||||
|
||||
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
||||
(WPARAM)nmcd.hdr.idFrom, (LPARAM)&nmcd);
|
||||
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, nmcd.hdr.idFrom, (LPARAM)&nmcd);
|
||||
|
||||
if (phdi->fmt & HDF_OWNERDRAW) {
|
||||
DRAWITEMSTRUCT dis;
|
||||
|
||||
dis.CtlType = ODT_HEADER;
|
||||
dis.CtlID = GetWindowLongPtrW (hwnd, GWLP_ID);
|
||||
|
@ -249,6 +252,14 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
|||
rw = r.right - r.left;
|
||||
rh = r.bottom - r.top;
|
||||
|
||||
if (theme == NULL) {
|
||||
HBRUSH hbr = CreateSolidBrush(GetBkColor(hdc));
|
||||
RECT rcBackground = r;
|
||||
|
||||
rcBackground.right -= cxEdge;
|
||||
FillRect(hdc, &rcBackground, hbr);
|
||||
DeleteObject(hbr);
|
||||
}
|
||||
if (phdi->fmt & HDF_STRING) {
|
||||
RECT textRect;
|
||||
|
||||
|
@ -319,8 +330,8 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
|||
if (iw || bw) {
|
||||
HDC hClipDC = GetDC(hwnd);
|
||||
HRGN hClipRgn = CreateRectRgn(r.left, r.top, r.right, r.bottom);
|
||||
|
||||
SelectClipRgn(hClipDC, hClipRgn);
|
||||
|
||||
if (bw) {
|
||||
HDC hdcBitmap = CreateCompatibleDC (hClipDC);
|
||||
SelectObject (hdcBitmap, phdi->hbm);
|
||||
|
@ -344,7 +355,6 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
|||
HDF_BITMAP_ON_RIGHT|HDF_IMAGE)))) /* no explicit format specified? */
|
||||
&& (phdi->pszText)) {
|
||||
oldBkMode = SetBkMode(hdc, TRANSPARENT);
|
||||
SetTextColor (hdc, (bHotTrack && !theme) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT);
|
||||
r.left = tx;
|
||||
r.right = tx + tw;
|
||||
DrawTextW (hdc, phdi->pszText, -1,
|
||||
|
|
|
@ -396,7 +396,7 @@ typedef struct tagLISTVIEW_INFO
|
|||
TRACE("hwndSelf=%p, ntmH=%d, icSz.cx=%ld, icSz.cy=%ld, icSp.cx=%ld, icSp.cy=%ld, notifyFmt=%d\n", \
|
||||
iP->hwndSelf, iP->ntmHeight, iP->iconSize.cx, iP->iconSize.cy, \
|
||||
iP->iconSpacing.cx, iP->iconSpacing.cy, iP->notifyFormat); \
|
||||
TRACE("hwndSelf=%p, rcList=%s\n", iP->hwndSelf, debugrect(&iP->rcList)); \
|
||||
TRACE("hwndSelf=%p, rcList=%s\n", iP->hwndSelf, wine_dbgstr_rect(&iP->rcList)); \
|
||||
} while(0)
|
||||
|
||||
static const WCHAR themeClass[] = {'L','i','s','t','V','i','e','w',0};
|
||||
|
@ -1202,7 +1202,7 @@ static BOOL iterator_frameditems(ITERATOR* i, LISTVIEW_INFO* infoPtr, const RECT
|
|||
|
||||
LISTVIEW_GetOrigin(infoPtr, &Origin);
|
||||
|
||||
TRACE("(lprc=%s)\n", debugrect(lprc));
|
||||
TRACE("(lprc=%s)\n", wine_dbgstr_rect(lprc));
|
||||
OffsetRect(&frame, -Origin.x, -Origin.y);
|
||||
|
||||
if (uView == LVS_ICON || uView == LVS_SMALLICON)
|
||||
|
@ -1373,7 +1373,7 @@ static inline BOOL is_redrawing(LISTVIEW_INFO *infoPtr)
|
|||
static inline void LISTVIEW_InvalidateRect(LISTVIEW_INFO *infoPtr, const RECT* rect)
|
||||
{
|
||||
if(!is_redrawing(infoPtr)) return;
|
||||
TRACE(" invalidating rect=%s\n", debugrect(rect));
|
||||
TRACE(" invalidating rect=%s\n", wine_dbgstr_rect(rect));
|
||||
InvalidateRect(infoPtr->hwndSelf, rect, TRUE);
|
||||
}
|
||||
|
||||
|
@ -1950,7 +1950,7 @@ static void LISTVIEW_GetItemMetrics(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVI
|
|||
State.bottom += infoPtr->iconStateSize.cy;
|
||||
}
|
||||
if (lprcState) *lprcState = State;
|
||||
TRACE(" - state=%s\n", debugrect(&State));
|
||||
TRACE(" - state=%s\n", wine_dbgstr_rect(&State));
|
||||
}
|
||||
else State.right = 0;
|
||||
|
||||
|
@ -1985,7 +1985,7 @@ static void LISTVIEW_GetItemMetrics(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVI
|
|||
Icon.bottom = Icon.top + infoPtr->nItemHeight;
|
||||
}
|
||||
if(lprcIcon) *lprcIcon = Icon;
|
||||
TRACE(" - icon=%s\n", debugrect(&Icon));
|
||||
TRACE(" - icon=%s\n", wine_dbgstr_rect(&Icon));
|
||||
}
|
||||
else Icon.right = 0;
|
||||
|
||||
|
@ -2068,7 +2068,7 @@ calc_label:
|
|||
}
|
||||
|
||||
if (lprcLabel) *lprcLabel = Label;
|
||||
TRACE(" - label=%s\n", debugrect(&Label));
|
||||
TRACE(" - label=%s\n", wine_dbgstr_rect(&Label));
|
||||
}
|
||||
|
||||
/* Fix the Box if necessary */
|
||||
|
@ -2077,7 +2077,7 @@ calc_label:
|
|||
if (oversizedBox) UnionRect(lprcBox, &Box, &Label);
|
||||
else *lprcBox = Box;
|
||||
}
|
||||
TRACE(" - box=%s\n", debugrect(&Box));
|
||||
TRACE(" - box=%s\n", wine_dbgstr_rect(&Box));
|
||||
}
|
||||
|
||||
/***
|
||||
|
@ -2335,7 +2335,7 @@ static BOOL LISTVIEW_GetViewRect(LISTVIEW_INFO *infoPtr, LPRECT lprcView)
|
|||
LISTVIEW_GetAreaRect(infoPtr, lprcView);
|
||||
OffsetRect(lprcView, ptOrigin.x, ptOrigin.y);
|
||||
|
||||
TRACE("lprcView=%s\n", debugrect(lprcView));
|
||||
TRACE("lprcView=%s\n", wine_dbgstr_rect(lprcView));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -3646,7 +3646,7 @@ static inline BOOL LISTVIEW_FillBkgnd(LISTVIEW_INFO *infoPtr, HDC hdc, const REC
|
|||
{
|
||||
if (!infoPtr->hBkBrush) return FALSE;
|
||||
|
||||
TRACE("(hdc=%p, lprcBox=%s, hBkBrush=%p)\n", hdc, debugrect(lprcBox), infoPtr->hBkBrush);
|
||||
TRACE("(hdc=%p, lprcBox=%s, hBkBrush=%p)\n", hdc, wine_dbgstr_rect(lprcBox), infoPtr->hBkBrush);
|
||||
|
||||
return FillRect(hdc, lprcBox, infoPtr->hBkBrush);
|
||||
}
|
||||
|
@ -3708,8 +3708,8 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
|
|||
OffsetRect(&rcIcon, pos.x, pos.y);
|
||||
OffsetRect(&rcLabel, pos.x, pos.y);
|
||||
TRACE(" rcBox=%s, rcState=%s, rcIcon=%s. rcLabel=%s\n",
|
||||
debugrect(&rcBox), debugrect(&rcState),
|
||||
debugrect(&rcIcon), debugrect(&rcLabel));
|
||||
wine_dbgstr_rect(&rcBox), wine_dbgstr_rect(&rcState),
|
||||
wine_dbgstr_rect(&rcIcon), wine_dbgstr_rect(&rcLabel));
|
||||
|
||||
/* fill in the custom draw structure */
|
||||
customdraw_fill(&nmlvcd, infoPtr, hdc, &rcBox, &lvItem);
|
||||
|
@ -3849,7 +3849,7 @@ static void LISTVIEW_RefreshOwnerDraw(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC h
|
|||
dis.rcItem.bottom = dis.rcItem.top + infoPtr->nItemHeight;
|
||||
dis.itemData = item.lParam;
|
||||
|
||||
TRACE("item=%s, rcItem=%s\n", debuglvitem_t(&item, TRUE), debugrect(&dis.rcItem));
|
||||
TRACE("item=%s, rcItem=%s\n", debuglvitem_t(&item, TRUE), wine_dbgstr_rect(&dis.rcItem));
|
||||
|
||||
/*
|
||||
* Even if we do not send the CDRF_NOTIFYITEMDRAW we need to fill the nmlvcd
|
||||
|
@ -4471,10 +4471,10 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir)
|
|||
rcScroll.right = rcScroll.left + infoPtr->nItemWidth;
|
||||
rcScroll.bottom = nPerCol * infoPtr->nItemHeight;
|
||||
OffsetRect(&rcScroll, Origin.x, Origin.y);
|
||||
TRACE("rcScroll=%s, dx=%d\n", debugrect(&rcScroll), dir * infoPtr->nItemHeight);
|
||||
TRACE("rcScroll=%s, dx=%d\n", wine_dbgstr_rect(&rcScroll), dir * infoPtr->nItemHeight);
|
||||
if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList))
|
||||
{
|
||||
TRACE("Scrolling rcScroll=%s, rcList=%s\n", debugrect(&rcScroll), debugrect(&infoPtr->rcList));
|
||||
TRACE("Scrolling rcScroll=%s, rcList=%s\n", wine_dbgstr_rect(&rcScroll), wine_dbgstr_rect(&infoPtr->rcList));
|
||||
ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight,
|
||||
&rcScroll, &rcScroll, 0, 0, SW_ERASE | SW_INVALIDATE);
|
||||
}
|
||||
|
@ -5568,7 +5568,7 @@ static BOOL LISTVIEW_GetItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lprc)
|
|||
|
||||
OffsetRect(lprc, Position.x + Origin.x, Position.y + Origin.y);
|
||||
|
||||
TRACE(" rect=%s\n", debugrect(lprc));
|
||||
TRACE(" rect=%s\n", wine_dbgstr_rect(lprc));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -6111,7 +6111,7 @@ static INT LISTVIEW_HitTest(LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, BOOL s
|
|||
rcBounds = rcBox;
|
||||
else
|
||||
UnionRect(&rcBounds, &rcIcon, &rcLabel);
|
||||
TRACE("rcBounds=%s\n", debugrect(&rcBounds));
|
||||
TRACE("rcBounds=%s\n", wine_dbgstr_rect(&rcBounds));
|
||||
if (!PtInRect(&rcBounds, opt)) return -1;
|
||||
|
||||
if (PtInRect(&rcIcon, opt))
|
||||
|
@ -6466,7 +6466,7 @@ static void column_fill_hditem(LISTVIEW_INFO *infoPtr, HDITEMW *lphdi, INT nColu
|
|||
|
||||
/* retrieve the layout of the header */
|
||||
GetClientRect(infoPtr->hwndSelf, &rcHeader);
|
||||
TRACE("start cxy=%d rcHeader=%s\n", lphdi->cxy, debugrect(&rcHeader));
|
||||
TRACE("start cxy=%d rcHeader=%s\n", lphdi->cxy, wine_dbgstr_rect(&rcHeader));
|
||||
|
||||
lphdi->cxy = (rcHeader.right - rcHeader.left) - lphdi->cxy;
|
||||
}
|
||||
|
@ -8885,7 +8885,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
|
|||
{
|
||||
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
|
||||
|
||||
TRACE("uView=%d, rcList(old)=%s\n", uView, debugrect(&infoPtr->rcList));
|
||||
TRACE("uView=%d, rcList(old)=%s\n", uView, wine_dbgstr_rect(&infoPtr->rcList));
|
||||
|
||||
GetClientRect(infoPtr->hwndSelf, &infoPtr->rcList);
|
||||
|
||||
|
@ -8916,7 +8916,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
|
|||
infoPtr->rcList.top = max(wp.cy, 0);
|
||||
}
|
||||
|
||||
TRACE(" rcList=%s\n", debugrect(&infoPtr->rcList));
|
||||
TRACE(" rcList=%s\n", wine_dbgstr_rect(&infoPtr->rcList));
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
|
@ -160,14 +160,10 @@ int MONTHCAL_MonthLength(int month, int year)
|
|||
/* make sure that time is valid */
|
||||
static int MONTHCAL_ValidateTime(SYSTEMTIME time)
|
||||
{
|
||||
if(time.wMonth > 12) return FALSE;
|
||||
if(time.wMonth < 1 || time.wMonth > 12 ) return FALSE;
|
||||
if(time.wDayOfWeek > 6) return FALSE;
|
||||
if(time.wDay > MONTHCAL_MonthLength(time.wMonth, time.wYear))
|
||||
return FALSE;
|
||||
if(time.wHour > 23) return FALSE;
|
||||
if(time.wMinute > 59) return FALSE;
|
||||
if(time.wSecond > 59) return FALSE;
|
||||
if(time.wMilliseconds > 999) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -934,48 +930,54 @@ MONTHCAL_GetMaxTodayWidth(MONTHCAL_INFO *infoPtr)
|
|||
}
|
||||
|
||||
|
||||
/* FIXME: are validated times taken from current date/time or simply
|
||||
* copied?
|
||||
* FIXME: check whether MCM_GETMONTHRANGE shows correct result after
|
||||
* adjusting range with MCM_SETRANGE
|
||||
*/
|
||||
|
||||
static LRESULT
|
||||
MONTHCAL_SetRange(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
SYSTEMTIME *lprgSysTimeArray=(SYSTEMTIME *)lParam;
|
||||
int prev;
|
||||
FILETIME ft_min, ft_max;
|
||||
|
||||
TRACE("%x %lx\n", wParam, lParam);
|
||||
|
||||
if(wParam & GDTR_MAX) {
|
||||
if(MONTHCAL_ValidateTime(lprgSysTimeArray[1])){
|
||||
MONTHCAL_CopyTime(&lprgSysTimeArray[1], &infoPtr->maxDate);
|
||||
infoPtr->rangeValid|=GDTR_MAX;
|
||||
} else {
|
||||
GetSystemTime(&infoPtr->todaysDate);
|
||||
MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->maxDate);
|
||||
}
|
||||
}
|
||||
if(wParam & GDTR_MIN) {
|
||||
if(MONTHCAL_ValidateTime(lprgSysTimeArray[0])) {
|
||||
if ((wParam & GDTR_MIN && !MONTHCAL_ValidateTime(lprgSysTimeArray[0])) ||
|
||||
(wParam & GDTR_MAX && !MONTHCAL_ValidateTime(lprgSysTimeArray[1])))
|
||||
return FALSE;
|
||||
|
||||
if (wParam & GDTR_MIN)
|
||||
{
|
||||
MONTHCAL_CopyTime(&lprgSysTimeArray[0], &infoPtr->minDate);
|
||||
infoPtr->rangeValid|=GDTR_MIN;
|
||||
} else {
|
||||
GetSystemTime(&infoPtr->todaysDate);
|
||||
MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->minDate);
|
||||
infoPtr->rangeValid |= GDTR_MIN;
|
||||
}
|
||||
if (wParam & GDTR_MAX)
|
||||
{
|
||||
MONTHCAL_CopyTime(&lprgSysTimeArray[1], &infoPtr->maxDate);
|
||||
infoPtr->rangeValid |= GDTR_MAX;
|
||||
}
|
||||
|
||||
/* Only one limit set - we are done */
|
||||
if ((infoPtr->rangeValid & (GDTR_MIN | GDTR_MAX)) != (GDTR_MIN | GDTR_MAX))
|
||||
return TRUE;
|
||||
|
||||
SystemTimeToFileTime(&infoPtr->maxDate, &ft_max);
|
||||
SystemTimeToFileTime(&infoPtr->minDate, &ft_min);
|
||||
|
||||
if (CompareFileTime(&ft_min, &ft_max) > 0)
|
||||
{
|
||||
if ((wParam & (GDTR_MIN | GDTR_MAX)) == (GDTR_MIN | GDTR_MAX))
|
||||
{
|
||||
/* Native swaps limits only when both limits are being set. */
|
||||
SYSTEMTIME st_tmp = infoPtr->minDate;
|
||||
infoPtr->minDate = infoPtr->maxDate;
|
||||
infoPtr->maxDate = st_tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reset the other limit. */
|
||||
/* FIXME: native sets date&time to 0. Should we do this too? */
|
||||
infoPtr->rangeValid &= wParam & GDTR_MIN ? ~GDTR_MAX : ~GDTR_MIN ;
|
||||
}
|
||||
}
|
||||
|
||||
prev = infoPtr->monthRange;
|
||||
infoPtr->monthRange = infoPtr->maxDate.wMonth - infoPtr->minDate.wMonth;
|
||||
|
||||
if(infoPtr->monthRange!=prev) {
|
||||
infoPtr->monthdayState = ReAlloc(infoPtr->monthdayState,
|
||||
infoPtr->monthRange * sizeof(MONTHDAYSTATE));
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "windowsx.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -1315,7 +1314,7 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return PAGER_Destroy (infoPtr);
|
||||
|
||||
case WM_SIZE:
|
||||
return PAGER_Size (infoPtr, (INT)wParam, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
return PAGER_Size (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
|
||||
|
||||
case WM_NCPAINT:
|
||||
return PAGER_NCPaint (infoPtr, (HRGN)wParam);
|
||||
|
@ -1330,18 +1329,18 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return PAGER_NCCalcSize (infoPtr, wParam, (LPRECT)lParam);
|
||||
|
||||
case WM_NCHITTEST:
|
||||
return PAGER_NCHitTest (infoPtr, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
return PAGER_NCHitTest (infoPtr, (short)LOWORD(lParam), (short)HIWORD(lParam));
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
if (infoPtr->bForward && infoPtr->hwndChild)
|
||||
PostMessageW(infoPtr->hwndChild, WM_MOUSEMOVE, wParam, lParam);
|
||||
return PAGER_MouseMove (infoPtr, (INT)wParam, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
return PAGER_MouseMove (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
return PAGER_LButtonDown (infoPtr, (INT)wParam, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
return PAGER_LButtonDown (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
return PAGER_LButtonUp (infoPtr, (INT)wParam, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
return PAGER_LButtonUp (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return PAGER_EraseBackground (infoPtr, (HDC)wParam);
|
||||
|
|
|
@ -131,35 +131,12 @@ static inline int get_bar_position( PROGRESS_INFO *infoPtr, LONG style,
|
|||
/***********************************************************************
|
||||
* PROGRESS_Invalidate
|
||||
*
|
||||
* Invalide the range between old and new pos.
|
||||
* Don't be too clever about invalidating the progress bar.
|
||||
* InstallShield depends on this simple behaviour.
|
||||
*/
|
||||
static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new )
|
||||
{
|
||||
LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE);
|
||||
RECT rect;
|
||||
int oldPos, newPos;
|
||||
BOOL barSmooth = (style & PBS_SMOOTH) && !GetWindowTheme (infoPtr->Self);
|
||||
|
||||
get_client_rect( infoPtr->Self, &rect );
|
||||
|
||||
oldPos = get_bar_position( infoPtr, style, &rect, old );
|
||||
newPos = get_bar_position( infoPtr, style, &rect, new );
|
||||
|
||||
if (style & PBS_VERTICAL)
|
||||
{
|
||||
rect.top = rect.bottom - max( oldPos, newPos );
|
||||
rect.bottom = rect.bottom - min( oldPos, newPos );
|
||||
if (!barSmooth) rect.top -=
|
||||
get_led_size (infoPtr, style, &rect) + get_led_gap (infoPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.left = min( oldPos, newPos );
|
||||
rect.right = max( oldPos, newPos );
|
||||
if (!barSmooth) rect.right +=
|
||||
get_led_size (infoPtr, style, &rect) + get_led_gap (infoPtr);
|
||||
}
|
||||
InvalidateRect( infoPtr->Self, &rect, oldPos > newPos );
|
||||
InvalidateRect( infoPtr->Self, NULL, old > new );
|
||||
}
|
||||
|
||||
/* Information for a progress bar drawing helper */
|
||||
|
|
|
@ -786,6 +786,7 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style,
|
|||
part->text = ntext;
|
||||
}
|
||||
InvalidateRect(infoPtr->Self, &part->bound, FALSE);
|
||||
UpdateWindow(infoPtr->Self);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* SysLink control
|
||||
*
|
||||
* Copyright 2004, 2005 Thomas Weidenmueller <w3seek@reactos.com>
|
||||
* Copyright 2004 - 2006 Thomas Weidenmueller <w3seek@reactos.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -62,7 +62,6 @@ typedef enum
|
|||
typedef struct _DOC_ITEM
|
||||
{
|
||||
struct _DOC_ITEM *Next; /* Address to the next item */
|
||||
LPWSTR Text; /* Text of the document item */
|
||||
UINT nText; /* Number of characters of the text */
|
||||
SL_ITEM_TYPE Type; /* type of the item */
|
||||
PDOC_TEXTBLOCK Blocks; /* Array of text blocks */
|
||||
|
@ -79,6 +78,7 @@ typedef struct _DOC_ITEM
|
|||
UINT Dummy;
|
||||
} Text;
|
||||
} u;
|
||||
WCHAR Text[1]; /* Text of the document item */
|
||||
} DOC_ITEM, *PDOC_ITEM;
|
||||
|
||||
typedef struct
|
||||
|
@ -116,10 +116,16 @@ static const WCHAR SL_LINKCLOSE[] = { '<','/','a','>',0 };
|
|||
static VOID SYSLINK_FreeDocItem (PDOC_ITEM DocItem)
|
||||
{
|
||||
if(DocItem->Type == slLink)
|
||||
{
|
||||
if (DocItem->u.Link.szID != NULL)
|
||||
{
|
||||
Free(DocItem->u.Link.szID);
|
||||
}
|
||||
if (DocItem->u.Link.szUrl != NULL)
|
||||
{
|
||||
Free(DocItem->u.Link.szUrl);
|
||||
}
|
||||
}
|
||||
|
||||
/* we don't free Text because it's just a pointer to a character in the
|
||||
entire window text string */
|
||||
|
@ -135,16 +141,16 @@ static PDOC_ITEM SYSLINK_AppendDocItem (SYSLINK_INFO *infoPtr, LPCWSTR Text, UIN
|
|||
SL_ITEM_TYPE type, PDOC_ITEM LastItem)
|
||||
{
|
||||
PDOC_ITEM Item;
|
||||
Item = Alloc(sizeof(DOC_ITEM) + ((textlen + 1) * sizeof(WCHAR)));
|
||||
|
||||
textlen = min(textlen, lstrlenW(Text));
|
||||
Item = Alloc(FIELD_OFFSET(DOC_ITEM, Text[textlen + 1]));
|
||||
if(Item == NULL)
|
||||
{
|
||||
ERR("Failed to alloc DOC_ITEM structure!\n");
|
||||
return NULL;
|
||||
}
|
||||
textlen = min(textlen, lstrlenW(Text));
|
||||
|
||||
Item->Next = NULL;
|
||||
Item->Text = (LPWSTR)(Item + 1);
|
||||
Item->nText = textlen;
|
||||
Item->Type = type;
|
||||
Item->Blocks = NULL;
|
||||
|
@ -159,7 +165,6 @@ static PDOC_ITEM SYSLINK_AppendDocItem (SYSLINK_INFO *infoPtr, LPCWSTR Text, UIN
|
|||
}
|
||||
|
||||
lstrcpynW(Item->Text, Text, textlen + 1);
|
||||
Item->Text[textlen] = 0;
|
||||
|
||||
return Item;
|
||||
}
|
||||
|
@ -351,12 +356,11 @@ CheckParameter:
|
|||
if(lpID != NULL)
|
||||
{
|
||||
nc = min(lenId, strlenW(lpID));
|
||||
nc = min(nc, MAX_LINKID_TEXT);
|
||||
Last->u.Link.szID = Alloc((MAX_LINKID_TEXT + 1) * sizeof(WCHAR));
|
||||
nc = min(nc, MAX_LINKID_TEXT - 1);
|
||||
Last->u.Link.szID = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szID != NULL)
|
||||
{
|
||||
lstrcpynW(Last->u.Link.szID, lpID, nc + 1);
|
||||
Last->u.Link.szID[nc] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -364,12 +368,11 @@ CheckParameter:
|
|||
if(lpUrl != NULL)
|
||||
{
|
||||
nc = min(lenUrl, strlenW(lpUrl));
|
||||
nc = min(nc, L_MAX_URL_LENGTH);
|
||||
Last->u.Link.szUrl = Alloc((L_MAX_URL_LENGTH + 1) * sizeof(WCHAR));
|
||||
nc = min(nc, L_MAX_URL_LENGTH - 1);
|
||||
Last->u.Link.szUrl = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szUrl != NULL)
|
||||
{
|
||||
lstrcpynW(Last->u.Link.szUrl, lpUrl, nc + 1);
|
||||
Last->u.Link.szUrl[nc] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -431,12 +434,11 @@ CheckParameter:
|
|||
if(lpID != NULL)
|
||||
{
|
||||
nc = min(lenId, strlenW(lpID));
|
||||
nc = min(nc, MAX_LINKID_TEXT);
|
||||
Last->u.Link.szID = Alloc((MAX_LINKID_TEXT + 1) * sizeof(WCHAR));
|
||||
nc = min(nc, MAX_LINKID_TEXT - 1);
|
||||
Last->u.Link.szID = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szID != NULL)
|
||||
{
|
||||
lstrcpynW(Last->u.Link.szID, lpID, nc + 1);
|
||||
Last->u.Link.szID[nc] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -444,12 +446,11 @@ CheckParameter:
|
|||
if(lpUrl != NULL)
|
||||
{
|
||||
nc = min(lenUrl, strlenW(lpUrl));
|
||||
nc = min(nc, L_MAX_URL_LENGTH);
|
||||
Last->u.Link.szUrl = Alloc((L_MAX_URL_LENGTH + 1) * sizeof(WCHAR));
|
||||
nc = min(nc, L_MAX_URL_LENGTH - 1);
|
||||
Last->u.Link.szUrl = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szUrl != NULL)
|
||||
{
|
||||
lstrcpynW(Last->u.Link.szUrl, lpUrl, nc + 1);
|
||||
Last->u.Link.szUrl[nc] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -751,6 +752,7 @@ static VOID SYSLINK_Render (SYSLINK_INFO *infoPtr, HDC hdc)
|
|||
{
|
||||
Free(bl);
|
||||
bl = NULL;
|
||||
nBlocks = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -769,11 +771,12 @@ static VOID SYSLINK_Render (SYSLINK_INFO *infoPtr, HDC hdc)
|
|||
{
|
||||
Free(bl);
|
||||
bl = NULL;
|
||||
nBlocks = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bl = Alloc((nBlocks + 1) * sizeof(DOC_TEXTBLOCK));
|
||||
bl = Alloc(sizeof(DOC_TEXTBLOCK));
|
||||
if (bl != NULL)
|
||||
nBlocks++;
|
||||
}
|
||||
|
@ -820,8 +823,6 @@ static VOID SYSLINK_Render (SYSLINK_INFO *infoPtr, HDC hdc)
|
|||
{
|
||||
Current->Blocks = bl;
|
||||
}
|
||||
else
|
||||
Current->Blocks = NULL;
|
||||
}
|
||||
|
||||
SelectObject(hdc, hOldFont);
|
||||
|
@ -877,10 +878,10 @@ static LRESULT SYSLINK_Draw (SYSLINK_INFO *infoPtr, HDC hdc)
|
|||
ExtTextOutW(hdc, bl->rc.left, bl->rc.top, ETO_OPAQUE | ETO_CLIPPED, &bl->rc, tx, bl->nChars, NULL);
|
||||
if((Current->Type == slLink) && (Current->u.Link.state & LIS_FOCUSED) && infoPtr->HasFocus)
|
||||
{
|
||||
COLORREF PrevColor;
|
||||
PrevColor = SetBkColor(hdc, OldBkColor);
|
||||
COLORREF PrevTextColor;
|
||||
PrevTextColor = SetTextColor(hdc, infoPtr->TextColor);
|
||||
DrawFocusRect(hdc, &bl->rc);
|
||||
SetBkColor(hdc, PrevColor);
|
||||
SetTextColor(hdc, PrevTextColor);
|
||||
}
|
||||
tx += bl->nChars;
|
||||
n -= bl->nChars + bl->nSkip;
|
||||
|
@ -907,8 +908,11 @@ static LRESULT SYSLINK_Paint (SYSLINK_INFO *infoPtr, HDC hdcParam)
|
|||
PAINTSTRUCT ps;
|
||||
|
||||
hdc = hdcParam ? hdcParam : BeginPaint (infoPtr->Self, &ps);
|
||||
if (hdc)
|
||||
{
|
||||
SYSLINK_Draw (infoPtr, hdc);
|
||||
if (!hdcParam) EndPaint (infoPtr->Self, &ps);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -972,8 +976,7 @@ static LRESULT SYSLINK_SetText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
|||
/* clear the document */
|
||||
SYSLINK_ClearDoc(infoPtr);
|
||||
|
||||
textlen = lstrlenW(Text);
|
||||
if(Text == NULL || textlen == 0)
|
||||
if(Text == NULL || (textlen = lstrlenW(Text)) == 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -983,9 +986,13 @@ static LRESULT SYSLINK_SetText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
|||
{
|
||||
/* Render text position and word wrapping in memory */
|
||||
HDC hdc = GetDC(infoPtr->Self);
|
||||
if (hdc != NULL)
|
||||
{
|
||||
SYSLINK_Render(infoPtr, hdc);
|
||||
SYSLINK_Draw(infoPtr, hdc);
|
||||
ReleaseDC(infoPtr->Self, hdc);
|
||||
|
||||
InvalidateRect(infoPtr->Self, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1031,8 +1038,10 @@ static PDOC_ITEM SYSLINK_SetFocusLink (SYSLINK_INFO *infoPtr, PDOC_ITEM DocItem)
|
|||
static LRESULT SYSLINK_SetItem (SYSLINK_INFO *infoPtr, PLITEM Item)
|
||||
{
|
||||
PDOC_ITEM di;
|
||||
int nc;
|
||||
PWSTR szId = NULL;
|
||||
PWSTR szUrl = NULL;
|
||||
BOOL Repaint = FALSE;
|
||||
BOOL Ret = TRUE;
|
||||
|
||||
if(!(Item->mask & LIF_ITEMINDEX) || !(Item->mask & (LIF_FLAGSMASK)))
|
||||
{
|
||||
|
@ -1047,6 +1056,59 @@ static LRESULT SYSLINK_SetItem (SYSLINK_INFO *infoPtr, PLITEM Item)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_ITEMID)
|
||||
{
|
||||
nc = min(lstrlenW(Item->szID), MAX_LINKID_TEXT - 1);
|
||||
szId = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(szId)
|
||||
{
|
||||
lstrcpynW(szId, Item->szID, nc + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("Unable to allocate memory for link id\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_URL)
|
||||
{
|
||||
nc = min(lstrlenW(Item->szUrl), L_MAX_URL_LENGTH - 1);
|
||||
szUrl = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(szUrl)
|
||||
{
|
||||
lstrcpynW(szUrl, Item->szUrl, nc + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (szId)
|
||||
{
|
||||
Free(szId);
|
||||
}
|
||||
|
||||
ERR("Unable to allocate memory for link url\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_ITEMID)
|
||||
{
|
||||
if(di->u.Link.szID)
|
||||
{
|
||||
Free(di->u.Link.szID);
|
||||
}
|
||||
di->u.Link.szID = szId;
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_URL)
|
||||
{
|
||||
if(di->u.Link.szUrl)
|
||||
{
|
||||
Free(di->u.Link.szUrl);
|
||||
}
|
||||
di->u.Link.szUrl = szUrl;
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_STATE)
|
||||
{
|
||||
UINT oldstate = di->u.Link.state;
|
||||
|
@ -1060,46 +1122,12 @@ static LRESULT SYSLINK_SetItem (SYSLINK_INFO *infoPtr, PLITEM Item)
|
|||
SYSLINK_SetFocusLink(infoPtr, ((di->u.Link.state & LIS_FOCUSED) ? di : NULL));
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_ITEMID)
|
||||
{
|
||||
if(!di->u.Link.szID)
|
||||
{
|
||||
di->u.Link.szID = Alloc((MAX_LINKID_TEXT + 1) * sizeof(WCHAR));
|
||||
if(!Item->szID)
|
||||
{
|
||||
ERR("Unable to allocate memory for link id\n");
|
||||
Ret = FALSE;
|
||||
}
|
||||
}
|
||||
if(di->u.Link.szID)
|
||||
{
|
||||
lstrcpynW(di->u.Link.szID, Item->szID, MAX_LINKID_TEXT + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if(Item->mask & LIF_URL)
|
||||
{
|
||||
if(!di->u.Link.szUrl)
|
||||
{
|
||||
di->u.Link.szUrl = Alloc((MAX_LINKID_TEXT + 1) * sizeof(WCHAR));
|
||||
if(!Item->szUrl)
|
||||
{
|
||||
ERR("Unable to allocate memory for link url\n");
|
||||
Ret = FALSE;
|
||||
}
|
||||
}
|
||||
if(di->u.Link.szUrl)
|
||||
{
|
||||
lstrcpynW(di->u.Link.szUrl, Item->szUrl, MAX_LINKID_TEXT + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if(Repaint)
|
||||
{
|
||||
SYSLINK_RepaintLink(infoPtr, di);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1137,7 +1165,7 @@ static LRESULT SYSLINK_GetItem (SYSLINK_INFO *infoPtr, PLITEM Item)
|
|||
{
|
||||
if(di->u.Link.szID)
|
||||
{
|
||||
lstrcpynW(Item->szID, di->u.Link.szID, MAX_LINKID_TEXT + 1);
|
||||
lstrcpyW(Item->szID, di->u.Link.szID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1149,7 +1177,7 @@ static LRESULT SYSLINK_GetItem (SYSLINK_INFO *infoPtr, PLITEM Item)
|
|||
{
|
||||
if(di->u.Link.szUrl)
|
||||
{
|
||||
lstrcpynW(Item->szUrl, di->u.Link.szUrl, L_MAX_URL_LENGTH + 1);
|
||||
lstrcpyW(Item->szUrl, di->u.Link.szUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1209,7 +1237,7 @@ static LRESULT SYSLINK_HitTest (SYSLINK_INFO *infoPtr, PLHITTESTINFO HitTest)
|
|||
HitTest->item.stateMask = 0;
|
||||
if(Current->u.Link.szID)
|
||||
{
|
||||
lstrcpynW(HitTest->item.szID, Current->u.Link.szID, MAX_LINKID_TEXT + 1);
|
||||
lstrcpyW(HitTest->item.szID, Current->u.Link.szID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1217,7 +1245,7 @@ static LRESULT SYSLINK_HitTest (SYSLINK_INFO *infoPtr, PLHITTESTINFO HitTest)
|
|||
}
|
||||
if(Current->u.Link.szUrl)
|
||||
{
|
||||
lstrcpynW(HitTest->item.szUrl, Current->u.Link.szUrl, L_MAX_URL_LENGTH + 1);
|
||||
lstrcpyW(HitTest->item.szUrl, Current->u.Link.szUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1279,7 +1307,7 @@ static LRESULT SYSLINK_SendParentNotify (SYSLINK_INFO *infoPtr, UINT code, PDOC_
|
|||
nml.item.stateMask = 0;
|
||||
if(Link->u.Link.szID)
|
||||
{
|
||||
lstrcpynW(nml.item.szID, Link->u.Link.szID, MAX_LINKID_TEXT + 1);
|
||||
lstrcpyW(nml.item.szID, Link->u.Link.szID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1287,7 +1315,7 @@ static LRESULT SYSLINK_SendParentNotify (SYSLINK_INFO *infoPtr, UINT code, PDOC_
|
|||
}
|
||||
if(Link->u.Link.szUrl)
|
||||
{
|
||||
lstrcpynW(nml.item.szUrl, Link->u.Link.szUrl, L_MAX_URL_LENGTH + 1);
|
||||
lstrcpyW(nml.item.szUrl, Link->u.Link.szUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2316,11 +2316,14 @@ TREEVIEW_DrawItemLines(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
|
|||
{
|
||||
HPEN hOldPen, hNewPen;
|
||||
HTREEITEM parent;
|
||||
LOGBRUSH lb;
|
||||
|
||||
/*
|
||||
* Get a dotted grey pen
|
||||
*/
|
||||
hNewPen = CreatePen(PS_ALTERNATE, 0, infoPtr->clrLine);
|
||||
lb.lbStyle = BS_SOLID;
|
||||
lb.lbColor = infoPtr->clrLine;
|
||||
hNewPen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, NULL);
|
||||
hOldPen = SelectObject(hdc, hNewPen);
|
||||
|
||||
MoveToEx(hdc, item->stateOffset, centery, NULL);
|
||||
|
@ -2821,6 +2824,8 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, HDC hdc, RECT *rc)
|
|||
}
|
||||
}
|
||||
|
||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
||||
|
||||
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
|
||||
infoPtr->cdmode =
|
||||
TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);
|
||||
|
@ -3325,7 +3330,6 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
|
|||
}
|
||||
}
|
||||
}
|
||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue