Commit dbbc224f authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Added header control cursors and drag list arrow icon.

parent d9d8ab0b
...@@ -70,6 +70,16 @@ extern HMODULE COMCTL32_hModule; ...@@ -70,6 +70,16 @@ extern HMODULE COMCTL32_hModule;
#define IDT_CHECK 401 #define IDT_CHECK 401
/* Header cursors */
#define IDC_DIVIDER 106
#define IDC_DIVIDEROPEN 107
/* DragList icon */
#define IDI_DRAGARROW 150
/* Internal function */ /* Internal function */
HWND COMCTL32_CreateToolTip (HWND); HWND COMCTL32_CreateToolTip (HWND);
......
...@@ -2,19 +2,17 @@ ...@@ -2,19 +2,17 @@
* Header control * Header control
* *
* Copyright 1998 Eric Kohl * Copyright 1998 Eric Kohl
* Copyright 2000 Eric Kohl for CodeWeavers
* *
* TODO: * TODO:
* - Imagelist support (partially). * - Imagelist support (partially).
* - Callback items (under construction). * - Callback items (under construction).
* - Control specific cursors (over dividers).
* - Hottrack support (partially). * - Hottrack support (partially).
* - Custom draw support (including Notifications). * - Custom draw support (including Notifications).
* - Drag and Drop support (including Notifications). * - Drag and Drop support (including Notifications).
* - Unicode support. * - Unicode support.
* *
* FIXME: * 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. * - Little flaw when drawing a bitmap on the right side of the text.
*/ */
...@@ -24,6 +22,7 @@ ...@@ -24,6 +22,7 @@
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/winestring.h" #include "wine/winestring.h"
#include "commctrl.h" #include "commctrl.h"
#include "comctl32.h"
#include "imagelist.h" #include "imagelist.h"
#include "debugtools.h" #include "debugtools.h"
...@@ -66,7 +65,6 @@ typedef struct ...@@ -66,7 +65,6 @@ typedef struct
HIMAGELIST himl; /* handle to a image list (may be 0) */ HIMAGELIST himl; /* handle to a image list (may be 0) */
HEADER_ITEM *items; /* pointer to array of HEADER_ITEM's */ HEADER_ITEM *items; /* pointer to array of HEADER_ITEM's */
BOOL bRectsValid; /* validity flag for bounding rectangles */ BOOL bRectsValid; /* validity flag for bounding rectangles */
/*LPINT pOrder; pointer to order array */
} HEADER_INFO; } HEADER_INFO;
...@@ -1103,7 +1101,9 @@ HEADER_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1103,7 +1101,9 @@ HEADER_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (phdi->pszText) { if (phdi->pszText) {
INT len = strlen (phdi->pszText); INT len = strlen (phdi->pszText);
lpItem->pszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR)); 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 else
...@@ -1229,8 +1229,8 @@ HEADER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1229,8 +1229,8 @@ HEADER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->items = 0; infoPtr->items = 0;
infoPtr->bRectsValid = FALSE; infoPtr->bRectsValid = FALSE;
infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA); infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA);
infoPtr->hcurDivider = LoadCursorA (0, IDC_SIZEWEA); infoPtr->hcurDivider = LoadCursorA (COMCTL32_hModule, MAKEINTRESOURCEA(IDC_DIVIDER));
infoPtr->hcurDivopen = LoadCursorA (0, IDC_SIZENSA); infoPtr->hcurDivopen = LoadCursorA (COMCTL32_hModule, MAKEINTRESOURCEA(IDC_DIVIDEROPEN));
infoPtr->bPressed = FALSE; infoPtr->bPressed = FALSE;
infoPtr->bTracking = FALSE; infoPtr->bTracking = FALSE;
infoPtr->iMoveItem = 0; infoPtr->iMoveItem = 0;
......
...@@ -872,6 +872,84 @@ IDB_HIST_LARGE BITMAP LOADONCALL DISCARDABLE ...@@ -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 * Everything specific to any language goes
* in one of the specific files. * in one of the specific files.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment