Added header control cursors and drag list arrow icon.

This commit is contained in:
Eric Kohl 2000-11-09 20:26:34 +00:00 committed by Alexandre Julliard
parent d9d8ab0be2
commit dbbc224f11
3 changed files with 95 additions and 7 deletions

View File

@ -70,6 +70,16 @@ extern HMODULE COMCTL32_hModule;
#define IDT_CHECK 401
/* Header cursors */
#define IDC_DIVIDER 106
#define IDC_DIVIDEROPEN 107
/* DragList icon */
#define IDI_DRAGARROW 150
/* Internal function */
HWND COMCTL32_CreateToolTip (HWND);

View File

@ -2,19 +2,17 @@
* Header control
*
* Copyright 1998 Eric Kohl
* Copyright 2000 Eric Kohl for CodeWeavers
*
* TODO:
* - Imagelist support (partially).
* - Callback items (under construction).
* - Control specific cursors (over dividers).
* - Hottrack support (partially).
* - Custom draw support (including Notifications).
* - Drag and Drop support (including Notifications).
* - Unicode support.
*
* FIXME:
* - Replace DrawText32A by DrawTextEx32A(...|DT_ENDELLIPSIS) in
* HEADER_DrawItem.(Is still needed? UB 001018)
* - Little flaw when drawing a bitmap on the right side of the text.
*/
@ -24,6 +22,7 @@
#include "wine/unicode.h"
#include "wine/winestring.h"
#include "commctrl.h"
#include "comctl32.h"
#include "imagelist.h"
#include "debugtools.h"
@ -66,7 +65,6 @@ typedef struct
HIMAGELIST himl; /* handle to a image list (may be 0) */
HEADER_ITEM *items; /* pointer to array of HEADER_ITEM's */
BOOL bRectsValid; /* validity flag for bounding rectangles */
/*LPINT pOrder; pointer to order array */
} HEADER_INFO;
@ -1103,7 +1101,9 @@ HEADER_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (phdi->pszText) {
INT len = strlen (phdi->pszText);
lpItem->pszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR));
lstrcpyAtoW (lpItem->pszText, phdi->pszText);
// lstrcpyAtoW (lpItem->pszText, phdi->pszText);
MultiByteToWideChar (CP_ACP,0,phdi->pszText,-1,
lpItem->pszText,0x7fffffff);
}
}
else
@ -1229,8 +1229,8 @@ HEADER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->items = 0;
infoPtr->bRectsValid = FALSE;
infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA);
infoPtr->hcurDivider = LoadCursorA (0, IDC_SIZEWEA);
infoPtr->hcurDivopen = LoadCursorA (0, IDC_SIZENSA);
infoPtr->hcurDivider = LoadCursorA (COMCTL32_hModule, MAKEINTRESOURCEA(IDC_DIVIDER));
infoPtr->hcurDivopen = LoadCursorA (COMCTL32_hModule, MAKEINTRESOURCEA(IDC_DIVIDEROPEN));
infoPtr->bPressed = FALSE;
infoPtr->bTracking = FALSE;
infoPtr->iMoveItem = 0;

View File

@ -872,6 +872,84 @@ IDB_HIST_LARGE BITMAP LOADONCALL DISCARDABLE
}
IDC_DIVIDER CURSOR LOADONCALL DISCARDABLE
{
'00 00 02 00 01 00 20 20 00 00 09 00 09 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 80 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 E0'
'00 00 01 20 00 00 01 20 00 00 01 20 00 00 01 20'
'00 00 19 26 00 00 29 25 00 00 4F 3C 80 00 80 00'
'40 00 80 00 40 00 4F 3C 80 00 29 25 00 00 19 26'
'00 00 01 20 00 00 01 20 00 00 01 20 00 00 01 20'
'00 00 01 E0 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FE 1F'
'FF FF FE 1F FF FF FE 1F FF FF FE 1F FF FF FE 1F'
'FF FF E6 19 FF FF C6 18 FF FF 80 00 7F FF 00 00'
'3F FF 00 00 3F FF 80 00 7F FF C6 18 FF FF E6 19'
'FF FF FE 1F FF FF FE 1F FF FF FE 1F FF FF FE 1F'
'FF FF FE 1F FF FF'
}
IDC_DIVIDEROPEN CURSOR LOADONCALL DISCARDABLE
{
'00 00 02 00 01 00 20 20 00 00 09 00 09 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 80 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 F0'
'00 00 02 D0 00 00 02 D0 00 00 02 D0 00 00 02 D0'
'00 00 1A D6 00 00 2A D5 00 00 4E DC 80 00 80 C0'
'40 00 80 C0 40 00 4E DC 80 00 2A D5 00 00 1A D6'
'00 00 02 D0 00 00 02 D0 00 00 02 D0 00 00 02 D0'
'00 00 03 F0 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC 0F'
'FF FF FC 0F FF FF FC 0F FF FF FC 0F FF FF FC 0F'
'FF FF E4 09 FF FF C4 08 FF FF 80 00 7F FF 00 00'
'3F FF 00 00 3F FF 80 00 7F FF C4 08 FF FF E4 09'
'FF FF FC 0F FF FF FC 0F FF FF FC 0F FF FF FC 0F'
'FF FF FC 0F FF FF'
}
IDI_DRAGARROW ICON LOADONCALL DISCARDABLE
{
'00 00 01 00 01 00 20 20 02 00 00 00 00 00 30 01'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
'00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 00 60 00 00 00 50 00 00 0F C8'
'00 00 08 04 00 00 08 02 00 00 08 04 00 00 09 C8'
'00 00 09 50 00 00 0F 60 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF 9F FF FF FF 8F FF FF F0 07'
'FF FF F0 03 FF FF F0 01 FF FF F0 03 FF FF F0 07'
'FF FF F0 8F FF FF F0 9F FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF'
}
/*
* Everything specific to any language goes
* in one of the specific files.