mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 10:46:58 +00:00
- Sync comctl32 with Wine 1.1.27 (without imagelist.c)
- Sync comdlg32 with Wine 1.1.27 svn path=/trunk/; revision=42706
This commit is contained in:
parent
88aad4cf0b
commit
f23c70c56e
18 changed files with 2566 additions and 1814 deletions
|
@ -174,7 +174,7 @@ static void COMBOEX_DumpInput (COMBOBOXEXITEMW const *input)
|
|||
}
|
||||
|
||||
|
||||
static inline CBE_ITEMDATA *get_item_data(COMBOEX_INFO *infoPtr, INT index)
|
||||
static inline CBE_ITEMDATA *get_item_data(const COMBOEX_INFO *infoPtr, INT index)
|
||||
{
|
||||
return (CBE_ITEMDATA *)SendMessageW (infoPtr->hwndCombo, CB_GETITEMDATA,
|
||||
(WPARAM)index, 0);
|
||||
|
@ -185,7 +185,7 @@ static inline cmp_func_t get_cmp_func(COMBOEX_INFO const *infoPtr)
|
|||
return infoPtr->dwExtStyle & CBES_EX_CASESENSITIVE ? lstrcmpW : lstrcmpiW;
|
||||
}
|
||||
|
||||
static INT COMBOEX_Notify (COMBOEX_INFO *infoPtr, INT code, NMHDR *hdr)
|
||||
static INT COMBOEX_Notify (const COMBOEX_INFO *infoPtr, INT code, NMHDR *hdr)
|
||||
{
|
||||
hdr->idFrom = GetDlgCtrlID (infoPtr->hwndSelf);
|
||||
hdr->hwndFrom = infoPtr->hwndSelf;
|
||||
|
@ -198,7 +198,7 @@ static INT COMBOEX_Notify (COMBOEX_INFO *infoPtr, INT code, NMHDR *hdr)
|
|||
|
||||
|
||||
static INT
|
||||
COMBOEX_NotifyItem (COMBOEX_INFO *infoPtr, UINT code, NMCOMBOBOXEXW *hdr)
|
||||
COMBOEX_NotifyItem (const COMBOEX_INFO *infoPtr, UINT code, NMCOMBOBOXEXW *hdr)
|
||||
{
|
||||
/* Change the Text item from Unicode to ANSI if necessary for NOTIFY */
|
||||
if (infoPtr->NtfUnicode)
|
||||
|
@ -234,7 +234,7 @@ COMBOEX_NotifyItem (COMBOEX_INFO *infoPtr, UINT code, NMCOMBOBOXEXW *hdr)
|
|||
}
|
||||
|
||||
|
||||
static INT COMBOEX_NotifyEndEdit (COMBOEX_INFO *infoPtr, NMCBEENDEDITW *neew, LPCWSTR wstr)
|
||||
static INT COMBOEX_NotifyEndEdit (const COMBOEX_INFO *infoPtr, NMCBEENDEDITW *neew, LPCWSTR wstr)
|
||||
{
|
||||
/* Change the Text item from Unicode to ANSI if necessary for NOTIFY */
|
||||
if (infoPtr->NtfUnicode) {
|
||||
|
@ -254,7 +254,7 @@ static INT COMBOEX_NotifyEndEdit (COMBOEX_INFO *infoPtr, NMCBEENDEDITW *neew, LP
|
|||
}
|
||||
|
||||
|
||||
static void COMBOEX_NotifyDragBegin(COMBOEX_INFO *infoPtr, LPCWSTR wstr)
|
||||
static void COMBOEX_NotifyDragBegin(const COMBOEX_INFO *infoPtr, LPCWSTR wstr)
|
||||
{
|
||||
/* Change the Text item from Unicode to ANSI if necessary for NOTIFY */
|
||||
if (infoPtr->NtfUnicode) {
|
||||
|
@ -303,7 +303,7 @@ static INT COMBOEX_GetIndex(COMBOEX_INFO const *infoPtr, CBE_ITEMDATA const *ite
|
|||
}
|
||||
|
||||
|
||||
static LPCWSTR COMBOEX_GetText(COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
||||
static LPCWSTR COMBOEX_GetText(const COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
||||
{
|
||||
NMCOMBOBOXEXW nmce;
|
||||
LPWSTR text, buf;
|
||||
|
@ -340,7 +340,7 @@ static LPCWSTR COMBOEX_GetText(COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
|||
}
|
||||
|
||||
|
||||
static void COMBOEX_GetComboFontSize (COMBOEX_INFO *infoPtr, SIZE *size)
|
||||
static void COMBOEX_GetComboFontSize (const COMBOEX_INFO *infoPtr, SIZE *size)
|
||||
{
|
||||
static const WCHAR strA[] = { 'A', 0 };
|
||||
HFONT nfont, ofont;
|
||||
|
@ -356,7 +356,7 @@ static void COMBOEX_GetComboFontSize (COMBOEX_INFO *infoPtr, SIZE *size)
|
|||
}
|
||||
|
||||
|
||||
static void COMBOEX_CopyItem (CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
|
||||
static void COMBOEX_CopyItem (const CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
|
||||
{
|
||||
if (cit->mask & CBEIF_TEXT) {
|
||||
/*
|
||||
|
@ -385,7 +385,7 @@ static void COMBOEX_CopyItem (CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
|
|||
}
|
||||
|
||||
|
||||
static void COMBOEX_AdjustEditPos (COMBOEX_INFO *infoPtr)
|
||||
static void COMBOEX_AdjustEditPos (const COMBOEX_INFO *infoPtr)
|
||||
{
|
||||
SIZE mysize;
|
||||
INT x, y, w, h, xioff;
|
||||
|
@ -419,7 +419,7 @@ static void COMBOEX_AdjustEditPos (COMBOEX_INFO *infoPtr)
|
|||
}
|
||||
|
||||
|
||||
static void COMBOEX_ReSize (COMBOEX_INFO *infoPtr)
|
||||
static void COMBOEX_ReSize (const COMBOEX_INFO *infoPtr)
|
||||
{
|
||||
SIZE mysize;
|
||||
LONG cy;
|
||||
|
@ -452,7 +452,7 @@ static void COMBOEX_ReSize (COMBOEX_INFO *infoPtr)
|
|||
}
|
||||
|
||||
|
||||
static void COMBOEX_SetEditText (COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
||||
static void COMBOEX_SetEditText (const COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
||||
{
|
||||
if (!infoPtr->hwndEdit) return;
|
||||
/* native issues the following messages to the {Edit} control */
|
||||
|
@ -467,7 +467,7 @@ static void COMBOEX_SetEditText (COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
|||
}
|
||||
|
||||
|
||||
static CBE_ITEMDATA * COMBOEX_FindItem(COMBOEX_INFO *infoPtr, INT_PTR index)
|
||||
static CBE_ITEMDATA * COMBOEX_FindItem(const COMBOEX_INFO *infoPtr, INT_PTR index)
|
||||
{
|
||||
CBE_ITEMDATA *item;
|
||||
INT i;
|
||||
|
@ -500,7 +500,7 @@ static inline BOOL COMBOEX_HasEdit(COMBOEX_INFO const *infoPtr)
|
|||
|
||||
/* *** CBEM_xxx message support *** */
|
||||
|
||||
static UINT COMBOEX_GetListboxText(COMBOEX_INFO *infoPtr, INT_PTR n, LPWSTR buf)
|
||||
static UINT COMBOEX_GetListboxText(const COMBOEX_INFO *infoPtr, INT_PTR n, LPWSTR buf)
|
||||
{
|
||||
CBE_ITEMDATA *item;
|
||||
LPCWSTR str;
|
||||
|
@ -527,7 +527,7 @@ static UINT COMBOEX_GetListboxText(COMBOEX_INFO *infoPtr, INT_PTR n, LPWSTR buf)
|
|||
}
|
||||
|
||||
|
||||
static INT COMBOEX_DeleteItem (COMBOEX_INFO *infoPtr, INT_PTR index)
|
||||
static INT COMBOEX_DeleteItem (const COMBOEX_INFO *infoPtr, INT_PTR index)
|
||||
{
|
||||
TRACE("(index=%ld)\n", index);
|
||||
|
||||
|
@ -542,7 +542,7 @@ static INT COMBOEX_DeleteItem (COMBOEX_INFO *infoPtr, INT_PTR index)
|
|||
}
|
||||
|
||||
|
||||
static BOOL COMBOEX_GetItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
||||
static BOOL COMBOEX_GetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
||||
{
|
||||
INT_PTR index = cit->iItem;
|
||||
CBE_ITEMDATA *item;
|
||||
|
@ -563,7 +563,7 @@ static BOOL COMBOEX_GetItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
}
|
||||
|
||||
|
||||
static BOOL COMBOEX_GetItemA (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA *cit)
|
||||
static BOOL COMBOEX_GetItemA (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA *cit)
|
||||
{
|
||||
COMBOBOXEXITEMW tmpcit;
|
||||
|
||||
|
@ -763,7 +763,7 @@ static HIMAGELIST COMBOEX_SetImageList (COMBOEX_INFO *infoPtr, HIMAGELIST himl)
|
|||
return himlTemp;
|
||||
}
|
||||
|
||||
static BOOL COMBOEX_SetItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
||||
static BOOL COMBOEX_SetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
||||
{
|
||||
INT_PTR index = cit->iItem;
|
||||
CBE_ITEMDATA *item;
|
||||
|
@ -814,7 +814,7 @@ static BOOL COMBOEX_SetItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL COMBOEX_SetItemA (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA const *cit)
|
||||
static BOOL COMBOEX_SetItemA (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA const *cit)
|
||||
{
|
||||
COMBOBOXEXITEMW citW;
|
||||
LPWSTR wstr = NULL;
|
||||
|
@ -851,7 +851,7 @@ static BOOL COMBOEX_SetUnicodeFormat (COMBOEX_INFO *infoPtr, BOOL value)
|
|||
/* *** CB_xxx message support *** */
|
||||
|
||||
static INT
|
||||
COMBOEX_FindStringExact (COMBOEX_INFO *infoPtr, INT start, LPCWSTR str)
|
||||
COMBOEX_FindStringExact (const COMBOEX_INFO *infoPtr, INT start, LPCWSTR str)
|
||||
{
|
||||
INT i;
|
||||
cmp_func_t cmptext = get_cmp_func(infoPtr);
|
||||
|
@ -860,17 +860,19 @@ COMBOEX_FindStringExact (COMBOEX_INFO *infoPtr, INT start, LPCWSTR str)
|
|||
/* now search from after starting loc and wrapping back to start */
|
||||
for(i=start+1; i<count; i++) {
|
||||
CBE_ITEMDATA *item = get_item_data(infoPtr, i);
|
||||
if ((LRESULT)item == CB_ERR) continue;
|
||||
if (cmptext(COMBOEX_GetText(infoPtr, item), str) == 0) return i;
|
||||
}
|
||||
for(i=0; i<=start; i++) {
|
||||
CBE_ITEMDATA *item = get_item_data(infoPtr, i);
|
||||
if ((LRESULT)item == CB_ERR) continue;
|
||||
if (cmptext(COMBOEX_GetText(infoPtr, item), str) == 0) return i;
|
||||
}
|
||||
return CB_ERR;
|
||||
}
|
||||
|
||||
|
||||
static DWORD_PTR COMBOEX_GetItemData (COMBOEX_INFO *infoPtr, INT_PTR index)
|
||||
static DWORD_PTR COMBOEX_GetItemData (const COMBOEX_INFO *infoPtr, INT_PTR index)
|
||||
{
|
||||
CBE_ITEMDATA const *item1;
|
||||
CBE_ITEMDATA const *item2;
|
||||
|
@ -910,7 +912,7 @@ static INT COMBOEX_SetCursel (COMBOEX_INFO *infoPtr, INT_PTR index)
|
|||
}
|
||||
|
||||
|
||||
static DWORD_PTR COMBOEX_SetItemData (COMBOEX_INFO *infoPtr, INT_PTR index, DWORD_PTR data)
|
||||
static DWORD_PTR COMBOEX_SetItemData (const COMBOEX_INFO *infoPtr, INT_PTR index, DWORD_PTR data)
|
||||
{
|
||||
CBE_ITEMDATA *item1;
|
||||
CBE_ITEMDATA const *item2;
|
||||
|
@ -1332,7 +1334,7 @@ static BOOL COMBOEX_WM_DeleteItem (COMBOEX_INFO *infoPtr, DELETEITEMSTRUCT const
|
|||
}
|
||||
|
||||
|
||||
static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *dis)
|
||||
static LRESULT COMBOEX_DrawItem (const COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *dis)
|
||||
{
|
||||
static const WCHAR nil[] = { 0 };
|
||||
CBE_ITEMDATA *item = 0;
|
||||
|
@ -1669,7 +1671,7 @@ static LRESULT COMBOEX_Size (COMBOEX_INFO *infoPtr, INT width, INT height)
|
|||
}
|
||||
|
||||
|
||||
static LRESULT COMBOEX_SetRedraw(COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT COMBOEX_SetRedraw(const COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LRESULT ret = DefWindowProcW( infoPtr->hwndSelf, WM_SETREDRAW, wParam, lParam );
|
||||
if (wParam) RedrawWindow( infoPtr->hwndSelf, NULL, 0, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN );
|
||||
|
@ -1677,7 +1679,7 @@ static LRESULT COMBOEX_SetRedraw(COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lP
|
|||
}
|
||||
|
||||
|
||||
static LRESULT COMBOEX_WindowPosChanging (COMBOEX_INFO *infoPtr, WINDOWPOS *wp)
|
||||
static LRESULT COMBOEX_WindowPosChanging (const COMBOEX_INFO *infoPtr, WINDOWPOS *wp)
|
||||
{
|
||||
RECT cbx_wrect, cbx_crect, cb_wrect;
|
||||
INT width, height;
|
||||
|
|
|
@ -183,15 +183,15 @@ DWORD WINAPI GetSize (LPVOID);
|
|||
INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
|
||||
INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
|
||||
|
||||
INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
|
||||
BOOL WINAPI DPA_Grow (const HDPA, INT);
|
||||
INT WINAPI DPA_GetPtrIndex (HDPA, LPCVOID);
|
||||
BOOL WINAPI DPA_Grow (HDPA, INT);
|
||||
|
||||
#define DPAM_NOSORT 0x0001
|
||||
#define DPAM_INSERT 0x0004
|
||||
#define DPAM_DELETE 0x0008
|
||||
|
||||
typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
|
||||
BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
|
||||
BOOL WINAPI DPA_Merge (HDPA, HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
|
||||
|
||||
#define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData,
|
|||
UINT i;
|
||||
LPSTR dataA = NULL;
|
||||
|
||||
if (!mp->extview.lpfnCompare)
|
||||
if (!mp || !mp->extview.lpfnCompare)
|
||||
return -1;
|
||||
|
||||
if(!(mp->extview.dwFlags & MRUF_BINARY_LIST) && !mp->isUnicode) {
|
||||
|
@ -834,6 +834,7 @@ INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
|||
const WINEMRUITEM *witem;
|
||||
INT desired, datasize;
|
||||
|
||||
if (!mp) return -1;
|
||||
if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
|
||||
if (nItemPos >= mp->cursize) return -1;
|
||||
desired = mp->realMRU[nItemPos];
|
||||
|
@ -860,6 +861,7 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
|||
INT desired, datasize;
|
||||
DWORD lenA;
|
||||
|
||||
if (!mp) return -1;
|
||||
if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
|
||||
if (nItemPos >= mp->cursize) return -1;
|
||||
desired = mp->realMRU[nItemPos];
|
||||
|
|
|
@ -217,7 +217,7 @@ HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, DPALOADPROC loadProc,
|
|||
* NOTES
|
||||
* No more information available yet!
|
||||
*/
|
||||
BOOL WINAPI DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags,
|
||||
BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
|
||||
PFNDPACOMPARE pfnCompare, PFNDPAMERGE pfnMerge,
|
||||
LPARAM lParam)
|
||||
{
|
||||
|
@ -381,7 +381,7 @@ BOOL WINAPI DPA_Destroy (const HDPA hdpa)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DPA_Grow (const HDPA hdpa, INT nGrow)
|
||||
BOOL WINAPI DPA_Grow (HDPA hdpa, INT nGrow)
|
||||
{
|
||||
TRACE("(%p %d)\n", hdpa, nGrow);
|
||||
|
||||
|
@ -504,7 +504,7 @@ LPVOID WINAPI DPA_GetPtr (const HDPA hdpa, INT nIndex)
|
|||
* Success: index of the specified pointer
|
||||
* Failure: -1
|
||||
*/
|
||||
INT WINAPI DPA_GetPtrIndex (const HDPA hdpa, LPVOID p)
|
||||
INT WINAPI DPA_GetPtrIndex (HDPA hdpa, LPCVOID p)
|
||||
{
|
||||
INT i;
|
||||
|
||||
|
@ -802,7 +802,8 @@ INT WINAPI DPA_Search (const HDPA hdpa, LPVOID pFind, INT nStart,
|
|||
INT l, r, x, n;
|
||||
LPVOID *lpPtr;
|
||||
|
||||
l = (nStart == -1) ? 0 : nStart;
|
||||
/* for binary search ignore start index */
|
||||
l = 0;
|
||||
r = hdpa->nItemCount - 1;
|
||||
lpPtr = hdpa->ptrs;
|
||||
while (r >= l) {
|
||||
|
|
|
@ -247,8 +247,7 @@ HEADER_SetItemBounds (HEADER_INFO *infoPtr)
|
|||
static LRESULT
|
||||
HEADER_Size (HEADER_INFO *infoPtr)
|
||||
{
|
||||
infoPtr->bRectsValid = FALSE;
|
||||
|
||||
HEADER_SetItemBounds(infoPtr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -329,18 +328,21 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
|
|||
}
|
||||
else {
|
||||
HBRUSH hbr;
|
||||
|
||||
if (infoPtr->dwStyle & HDS_BUTTONS) {
|
||||
if (phdi->bDown) {
|
||||
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
|
||||
BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST);
|
||||
|
||||
if (!(infoPtr->dwStyle & HDS_FLAT))
|
||||
{
|
||||
if (infoPtr->dwStyle & HDS_BUTTONS) {
|
||||
if (phdi->bDown) {
|
||||
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
|
||||
BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST);
|
||||
}
|
||||
else
|
||||
DrawEdge (hdc, &r, EDGE_RAISED,
|
||||
BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST);
|
||||
}
|
||||
else
|
||||
DrawEdge (hdc, &r, EDGE_RAISED,
|
||||
BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST);
|
||||
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
|
||||
}
|
||||
else
|
||||
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
|
||||
|
||||
hbr = CreateSolidBrush(GetBkColor(hdc));
|
||||
FillRect(hdc, &r, hbr);
|
||||
|
@ -547,14 +549,19 @@ HEADER_Refresh (HEADER_INFO *infoPtr, HDC hdc)
|
|||
if (theme != NULL) {
|
||||
DrawThemeBackground(theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rcRest, NULL);
|
||||
}
|
||||
else {
|
||||
else if (infoPtr->dwStyle & HDS_FLAT) {
|
||||
hbrBk = GetSysColorBrush(COLOR_3DFACE);
|
||||
FillRect(hdc, &rcRest, hbrBk);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (infoPtr->dwStyle & HDS_BUTTONS)
|
||||
DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE);
|
||||
else
|
||||
DrawEdge (hdc, &rcRest, EDGE_ETCHED, BF_BOTTOM|BF_MIDDLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (infoPtr->iHotDivider != -1)
|
||||
HEADER_DrawHotDivider(infoPtr, hdc);
|
||||
|
||||
|
@ -1189,7 +1196,7 @@ HEADER_GetOrderArray(const HEADER_INFO *infoPtr, INT size, LPINT order)
|
|||
}
|
||||
|
||||
static LRESULT
|
||||
HEADER_SetOrderArray(HEADER_INFO *infoPtr, INT size, LPINT order)
|
||||
HEADER_SetOrderArray(HEADER_INFO *infoPtr, INT size, const INT *order)
|
||||
{
|
||||
INT i;
|
||||
HEADER_ITEM *lpItem;
|
||||
|
@ -1202,7 +1209,7 @@ HEADER_SetOrderArray(HEADER_INFO *infoPtr, INT size, LPINT order)
|
|||
lpItem = &infoPtr->items[*order++];
|
||||
lpItem->iOrder=i;
|
||||
}
|
||||
infoPtr->bRectsValid=0;
|
||||
HEADER_SetItemBounds(infoPtr);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1217,10 +1224,12 @@ HEADER_GetUnicodeFormat (const HEADER_INFO *infoPtr)
|
|||
static LRESULT
|
||||
HEADER_HitTest (const HEADER_INFO *infoPtr, LPHDHITTESTINFO phti)
|
||||
{
|
||||
UINT outside = HHT_NOWHERE | HHT_ABOVE | HHT_BELOW | HHT_TOLEFT | HHT_TORIGHT;
|
||||
|
||||
HEADER_InternalHitTest (infoPtr, &phti->pt, &phti->flags, &phti->iItem);
|
||||
|
||||
if (phti->flags == HHT_NOWHERE)
|
||||
return -1;
|
||||
if (phti->flags & outside)
|
||||
return phti->iItem = -1;
|
||||
else
|
||||
return phti->iItem;
|
||||
}
|
||||
|
@ -1400,7 +1409,7 @@ HEADER_SetUnicodeFormat (HEADER_INFO *infoPtr, WPARAM wParam)
|
|||
|
||||
|
||||
static LRESULT
|
||||
HEADER_Create (HWND hwnd, LPCREATESTRUCTW lpcs)
|
||||
HEADER_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||
{
|
||||
HEADER_INFO *infoPtr;
|
||||
TEXTMETRICW tm;
|
||||
|
@ -1496,7 +1505,7 @@ HEADER_IsDragDistance(const HEADER_INFO *infoPtr, const POINT *pt)
|
|||
}
|
||||
|
||||
static LRESULT
|
||||
HEADER_LButtonDblClk (HEADER_INFO *infoPtr, INT x, INT y)
|
||||
HEADER_LButtonDblClk (const HEADER_INFO *infoPtr, INT x, INT y)
|
||||
{
|
||||
POINT pt;
|
||||
UINT flags;
|
||||
|
@ -1582,6 +1591,9 @@ HEADER_LButtonUp (HEADER_INFO *infoPtr, INT x, INT y)
|
|||
HEADER_InternalHitTest (infoPtr, &pt, &flags, &nItem);
|
||||
|
||||
if (infoPtr->bPressed) {
|
||||
|
||||
infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
|
||||
|
||||
if (infoPtr->bDragging)
|
||||
{
|
||||
HEADER_ITEM *lpItem = &infoPtr->items[infoPtr->iMoveItem];
|
||||
|
@ -1589,8 +1601,7 @@ HEADER_LButtonUp (HEADER_INFO *infoPtr, INT x, INT y)
|
|||
|
||||
ImageList_DragShowNolock(FALSE);
|
||||
ImageList_EndDrag();
|
||||
lpItem->bDown=FALSE;
|
||||
|
||||
|
||||
if (infoPtr->iHotDivider == -1)
|
||||
iNewOrder = -1;
|
||||
else if (infoPtr->iHotDivider == infoPtr->uNumItem)
|
||||
|
@ -1615,14 +1626,14 @@ HEADER_LButtonUp (HEADER_INFO *infoPtr, INT x, INT y)
|
|||
infoPtr->bDragging = FALSE;
|
||||
HEADER_SetHotDivider(infoPtr, FALSE, -1);
|
||||
}
|
||||
else if (!(infoPtr->dwStyle & HDS_DRAGDROP) || !HEADER_IsDragDistance(infoPtr, &pt))
|
||||
else
|
||||
{
|
||||
infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
|
||||
hdc = GetDC (infoPtr->hwndSelf);
|
||||
HEADER_RefreshItem (infoPtr, infoPtr->iMoveItem);
|
||||
ReleaseDC (infoPtr->hwndSelf, hdc);
|
||||
|
||||
HEADER_SendNotifyWithHDItemT(infoPtr, HDN_ITEMCLICKW, infoPtr->iMoveItem, NULL);
|
||||
if (!(infoPtr->dwStyle & HDS_DRAGDROP) || !HEADER_IsDragDistance(infoPtr, &pt))
|
||||
HEADER_SendNotifyWithHDItemT(infoPtr, HDN_ITEMCLICKW, infoPtr->iMoveItem, NULL);
|
||||
}
|
||||
|
||||
TRACE("Released item %d!\n", infoPtr->iMoveItem);
|
||||
|
@ -1923,7 +1934,7 @@ static LRESULT HEADER_SetRedraw(HEADER_INFO *infoPtr, WPARAM wParam, LPARAM lPar
|
|||
}
|
||||
|
||||
static INT HEADER_StyleChanged(HEADER_INFO *infoPtr, WPARAM wStyleType,
|
||||
const LPSTYLESTRUCT lpss)
|
||||
const STYLESTRUCT *lpss)
|
||||
{
|
||||
TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||
|
|
|
@ -239,10 +239,9 @@ HOTKEY_Create (HOTKEY_INFO *infoPtr, const CREATESTRUCTW *lpcs)
|
|||
static LRESULT
|
||||
HOTKEY_Destroy (HOTKEY_INFO *infoPtr)
|
||||
{
|
||||
HWND hwnd = infoPtr->hwndSelf;
|
||||
/* free hotkey info data */
|
||||
SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0);
|
||||
Free (infoPtr);
|
||||
SetWindowLongPtrW (hwnd, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -27,6 +27,16 @@
|
|||
* the specification mentioned above.
|
||||
* If you discover missing features, or bugs, please note them below.
|
||||
*
|
||||
* TODO:
|
||||
*
|
||||
* Messages:
|
||||
* -- PBM_GETSTEP
|
||||
* -- PBM_SETSTATE
|
||||
* -- PBM_GETSTATE
|
||||
*
|
||||
* Styles:
|
||||
* -- PBS_SMOOTHREVERSE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
@ -253,38 +263,22 @@ static const ProgressDrawProc drawProcClassic[8] = {
|
|||
static void draw_theme_bar_H (const ProgressDrawInfo* di, int start, int end)
|
||||
{
|
||||
RECT r;
|
||||
int right = di->rect.left + end;
|
||||
r.left = di->rect.left + start;
|
||||
r.top = di->rect.top;
|
||||
r.bottom = di->rect.bottom;
|
||||
while (r.left < right)
|
||||
{
|
||||
r.right = min (r.left + di->ledW, right);
|
||||
DrawThemeBackground (di->theme, di->hdc, PP_CHUNK, 0, &r, NULL);
|
||||
r.left = r.right;
|
||||
r.right = min (r.left + di->ledGap, right);
|
||||
DrawThemeBackground (di->theme, di->hdc, PP_BAR, 0, &di->bgRect, &r);
|
||||
r.left = r.right;
|
||||
}
|
||||
r.right = di->rect.left + end;
|
||||
DrawThemeBackground (di->theme, di->hdc, PP_CHUNK, 0, &r, NULL);
|
||||
}
|
||||
|
||||
/* draw themed horizontal bar from 'start' to 'end' */
|
||||
/* draw themed vertical bar from 'start' to 'end' */
|
||||
static void draw_theme_bar_V (const ProgressDrawInfo* di, int start, int end)
|
||||
{
|
||||
RECT r;
|
||||
int top = di->rect.bottom - end;
|
||||
r.left = di->rect.left;
|
||||
r.right = di->rect.right;
|
||||
r.bottom = di->rect.bottom - start;
|
||||
while (r.bottom > top)
|
||||
{
|
||||
r.top = max (r.bottom - di->ledW, top);
|
||||
DrawThemeBackground (di->theme, di->hdc, PP_CHUNKVERT, 0, &r, NULL);
|
||||
r.bottom = r.top;
|
||||
r.top = max (r.bottom - di->ledGap, top);
|
||||
DrawThemeBackground (di->theme, di->hdc, PP_BARVERT, 0, &di->bgRect, &r);
|
||||
r.bottom = r.top;
|
||||
}
|
||||
r.top = di->rect.bottom - end;
|
||||
DrawThemeBackground (di->theme, di->hdc, PP_CHUNKVERT, 0, &r, NULL);
|
||||
}
|
||||
|
||||
/* draw themed horizontal background from 'start' to 'end' */
|
||||
|
@ -703,11 +697,17 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
|
|||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
|
||||
case PBM_GETBARCOLOR:
|
||||
return infoPtr->ColorBar;
|
||||
|
||||
case PBM_SETBKCOLOR:
|
||||
infoPtr->ColorBk = (COLORREF)lParam;
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
|
||||
case PBM_GETBKCOLOR:
|
||||
return infoPtr->ColorBk;
|
||||
|
||||
case PBM_SETMARQUEE:
|
||||
if(wParam != 0)
|
||||
{
|
||||
|
|
|
@ -452,7 +452,7 @@ static int get_rect_cy(const REBAR_INFO *infoPtr, const RECT *lpRect)
|
|||
return lpRect->bottom - lpRect->top;
|
||||
}
|
||||
|
||||
static int round_child_height(REBAR_BAND *lpBand, int cyHeight)
|
||||
static int round_child_height(const REBAR_BAND *lpBand, int cyHeight)
|
||||
{
|
||||
int cy = 0;
|
||||
if (lpBand->cyIntegral == 0)
|
||||
|
@ -1699,11 +1699,11 @@ REBAR_CommonSetupBand(HWND hwnd, const REBARBANDINFOW *lprbbi, REBAR_BAND *lpBan
|
|||
if( (lprbbi->fMask & RBBIM_CHILDSIZE) &&
|
||||
( (lpBand->cxMinChild != lprbbi->cxMinChild) ||
|
||||
(lpBand->cyMinChild != lprbbi->cyMinChild ) ||
|
||||
( (lprbbi->cbSize >= sizeof (REBARBANDINFOA) && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) &&
|
||||
( (lprbbi->cbSize >= REBARBANDINFOA_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) &&
|
||||
( (lpBand->cyChild != lprbbi->cyChild ) ||
|
||||
(lpBand->cyMaxChild != lprbbi->cyMaxChild ) ||
|
||||
(lpBand->cyIntegral != lprbbi->cyIntegral ) ) ) ||
|
||||
( (lprbbi->cbSize < sizeof (REBARBANDINFOA)) &&
|
||||
( (lprbbi->cbSize < REBARBANDINFOA_V6_SIZE) &&
|
||||
( (lpBand->cyChild ||
|
||||
lpBand->cyMaxChild ||
|
||||
lpBand->cyIntegral ) ) ) ) )
|
||||
|
@ -1711,7 +1711,7 @@ REBAR_CommonSetupBand(HWND hwnd, const REBARBANDINFOW *lprbbi, REBAR_BAND *lpBan
|
|||
lpBand->cxMinChild = lprbbi->cxMinChild;
|
||||
lpBand->cyMinChild = lprbbi->cyMinChild;
|
||||
/* These fields where added in WIN32_IE == 0x400 and are set only for RBBS_VARIABLEHEIGHT bands */
|
||||
if (lprbbi->cbSize >= sizeof (REBARBANDINFOA) && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
|
||||
if (lprbbi->cbSize >= REBARBANDINFOA_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
|
||||
lpBand->cyMaxChild = lprbbi->cyMaxChild;
|
||||
lpBand->cyIntegral = lprbbi->cyIntegral;
|
||||
|
||||
|
@ -1747,7 +1747,7 @@ REBAR_CommonSetupBand(HWND hwnd, const REBARBANDINFOW *lprbbi, REBAR_BAND *lpBan
|
|||
}
|
||||
|
||||
/* check for additional data */
|
||||
if (lprbbi->cbSize >= sizeof (REBARBANDINFOA)) {
|
||||
if (lprbbi->cbSize >= REBARBANDINFOA_V6_SIZE) {
|
||||
if( (lprbbi->fMask & RBBIM_IDEALSIZE) &&
|
||||
( lpBand->cxIdeal != lprbbi->cxIdeal ) )
|
||||
{
|
||||
|
@ -2167,7 +2167,7 @@ REBAR_GetBandInfoT(const REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL
|
|||
lprbbi->cyMinChild = lpBand->cyMinChild;
|
||||
/* to make tests pass we follow Windows behaviour and allow to read these fields only
|
||||
* for RBBS_VARIABLEHEIGHTS bands */
|
||||
if (lprbbi->cbSize >= sizeof (REBARBANDINFOA) && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
|
||||
if (lprbbi->cbSize >= REBARBANDINFOW_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
|
||||
lprbbi->cyChild = lpBand->cyChild;
|
||||
lprbbi->cyMaxChild = lpBand->cyMaxChild;
|
||||
lprbbi->cyIntegral = lpBand->cyIntegral;
|
||||
|
@ -2184,7 +2184,7 @@ REBAR_GetBandInfoT(const REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL
|
|||
lprbbi->wID = lpBand->wID;
|
||||
|
||||
/* check for additional data */
|
||||
if (lprbbi->cbSize >= sizeof (REBARBANDINFOA)) {
|
||||
if (lprbbi->cbSize >= REBARBANDINFOW_V6_SIZE) {
|
||||
if (lprbbi->fMask & RBBIM_IDEALSIZE)
|
||||
lprbbi->cxIdeal = lpBand->cxIdeal;
|
||||
|
||||
|
@ -2424,7 +2424,7 @@ REBAR_InsertBandT(REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnico
|
|||
REBAR_CommonSetupBand(infoPtr->hwndSelf, lprbbi, lpBand);
|
||||
|
||||
/* Make sure the defaults for these are correct */
|
||||
if (lprbbi->cbSize < sizeof (REBARBANDINFOA) || !(lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
|
||||
if (lprbbi->cbSize < REBARBANDINFOA_V6_SIZE || !(lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
|
||||
lpBand->cyChild = lpBand->cyMinChild;
|
||||
lpBand->cyMaxChild = 0x7fffffff;
|
||||
lpBand->cyIntegral = 0;
|
||||
|
|
|
@ -333,7 +333,7 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc)
|
|||
|
||||
|
||||
static int
|
||||
STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const LPPOINT pt)
|
||||
STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const POINT *pt)
|
||||
{
|
||||
int i;
|
||||
if (infoPtr->simple)
|
||||
|
|
|
@ -1329,10 +1329,8 @@ static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr)
|
|||
if(Focus != NULL)
|
||||
{
|
||||
SYSLINK_SetFocusLink(infoPtr, Focus);
|
||||
SYSLINK_RepaintLink(infoPtr, Focus);
|
||||
}
|
||||
|
||||
SYSLINK_RepaintLink(infoPtr, Focus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1476,7 +1474,7 @@ static BOOL SYSKEY_SelectNextPrevLink (const SYSLINK_INFO *infoPtr, BOOL Prev)
|
|||
{
|
||||
OldFocus = SYSLINK_SetFocusLink(infoPtr, NewFocus);
|
||||
|
||||
if(OldFocus != NewFocus)
|
||||
if(OldFocus && OldFocus != NewFocus)
|
||||
{
|
||||
SYSLINK_RepaintLink(infoPtr, OldFocus);
|
||||
}
|
||||
|
|
|
@ -1445,7 +1445,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
|||
|
||||
|
||||
static void
|
||||
TAB_EraseTabInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect)
|
||||
TAB_EraseTabInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, const RECT *drawRect)
|
||||
{
|
||||
LONG lStyle = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
|
||||
HBRUSH hbr = CreateSolidBrush (comctl32_color.clrBtnFace);
|
||||
|
@ -3223,7 +3223,7 @@ TAB_SetExtendedStyle (TAB_INFO *infoPtr, DWORD exMask, DWORD exStyle)
|
|||
}
|
||||
|
||||
static inline LRESULT
|
||||
TAB_GetExtendedStyle (TAB_INFO *infoPtr)
|
||||
TAB_GetExtendedStyle (const TAB_INFO *infoPtr)
|
||||
{
|
||||
return infoPtr->exStyle;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -119,6 +119,7 @@ typedef struct tagTREEVIEW_INFO
|
|||
HTREEITEM selectedItem; /* handle to selected item or 0 if none */
|
||||
HTREEITEM hotItem; /* handle currently under cursor, 0 if none */
|
||||
HTREEITEM focusedItem; /* item that was under the cursor when WM_LBUTTONDOWN was received */
|
||||
HTREEITEM editItem; /* item being edited with builtin edit box */
|
||||
|
||||
HTREEITEM firstVisible; /* handle to first visible item */
|
||||
LONG maxVisibleOrder;
|
||||
|
@ -710,7 +711,7 @@ static void
|
|||
TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
|
||||
UINT mask)
|
||||
{
|
||||
NMTVDISPINFOW callback;
|
||||
NMTVDISPINFOEXW callback;
|
||||
HWND hwnd = infoPtr->hwnd;
|
||||
|
||||
TRACE("mask %x callbackMask %x\n", mask, wineItem->callbackMask);
|
||||
|
@ -1255,6 +1256,7 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *infoPtr, const TVINSERTSTRUCTW *ptdi, BOOL i
|
|||
|
||||
newItem->parent = parentItem;
|
||||
newItem->iIntegral = 1;
|
||||
newItem->visibleOrder = -1;
|
||||
|
||||
if (!TREEVIEW_DoSetItemT(infoPtr, newItem, tvItem, isW))
|
||||
return 0;
|
||||
|
@ -1367,6 +1369,8 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *infoPtr, const TVINSERTSTRUCTW *ptdi, BOOL i
|
|||
|
||||
TREEVIEW_VerifyTree(infoPtr);
|
||||
|
||||
if (!infoPtr->bRedraw) return (LRESULT)newItem;
|
||||
|
||||
if (parentItem == infoPtr->root ||
|
||||
(ISVISIBLE(parentItem) && parentItem->state & TVIS_EXPANDED))
|
||||
{
|
||||
|
@ -1392,8 +1396,6 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *infoPtr, const TVINSERTSTRUCTW *ptdi, BOOL i
|
|||
}
|
||||
else
|
||||
{
|
||||
newItem->visibleOrder = -1;
|
||||
|
||||
/* refresh treeview if newItem is the first item inserted under parentItem */
|
||||
if (ISVISIBLE(parentItem) && newItem->prevSibling == newItem->nextSibling)
|
||||
{
|
||||
|
@ -1564,6 +1566,7 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM wineItem)
|
|||
|
||||
TREEVIEW_VerifyTree(infoPtr);
|
||||
|
||||
if (!infoPtr->bRedraw) return TRUE;
|
||||
|
||||
if (visible)
|
||||
{
|
||||
|
@ -1586,12 +1589,16 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM wineItem)
|
|||
static LRESULT
|
||||
TREEVIEW_SetRedraw(TREEVIEW_INFO* infoPtr, WPARAM wParam)
|
||||
{
|
||||
if(wParam)
|
||||
infoPtr->bRedraw = TRUE;
|
||||
else
|
||||
infoPtr->bRedraw = FALSE;
|
||||
infoPtr->bRedraw = wParam ? TRUE : FALSE;
|
||||
|
||||
return 0;
|
||||
if (infoPtr->bRedraw)
|
||||
{
|
||||
TREEVIEW_UpdateSubTree(infoPtr, infoPtr->root);
|
||||
TREEVIEW_RecalculateVisibleOrder(infoPtr, NULL);
|
||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
||||
TREEVIEW_Invalidate(infoPtr, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
|
@ -3545,6 +3552,14 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return TRUE;
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
{
|
||||
WNDPROC editProc = infoPtr->wpEditOrig;
|
||||
infoPtr->wpEditOrig = 0;
|
||||
SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (DWORD_PTR)editProc);
|
||||
return CallWindowProcW(editProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
case WM_GETDLGCODE:
|
||||
return DLGC_WANTARROWS | DLGC_WANTALLKEYS;
|
||||
|
||||
|
@ -3580,7 +3595,7 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
static LRESULT
|
||||
TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TRACE("%lx %ld\n", wParam, lParam);
|
||||
TRACE("code=%x, id=%x, handle=%lx\n", HIWORD(wParam), LOWORD(wParam), lParam);
|
||||
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
|
@ -3590,11 +3605,15 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
* Adjust the edit window size
|
||||
*/
|
||||
WCHAR buffer[1024];
|
||||
TREEVIEW_ITEM *editItem = infoPtr->selectedItem;
|
||||
TREEVIEW_ITEM *editItem = infoPtr->editItem;
|
||||
HDC hdc = GetDC(infoPtr->hwndEdit);
|
||||
SIZE sz;
|
||||
HFONT hFont, hOldFont = 0;
|
||||
|
||||
TRACE("edit=%p\n", infoPtr->hwndEdit);
|
||||
|
||||
if (!IsWindow(infoPtr->hwndEdit) || !hdc) return FALSE;
|
||||
|
||||
infoPtr->bLabelChanged = TRUE;
|
||||
|
||||
GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0]));
|
||||
|
@ -3636,6 +3655,12 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
ReleaseDC(infoPtr->hwnd, hdc);
|
||||
break;
|
||||
}
|
||||
case EN_KILLFOCUS:
|
||||
/* apparently we should respect passed handle value */
|
||||
if (infoPtr->hwndEdit != (HWND)lParam) return FALSE;
|
||||
|
||||
TREEVIEW_EndEditLabelNow(infoPtr, FALSE);
|
||||
break;
|
||||
|
||||
default:
|
||||
return SendMessageW(infoPtr->hwndNotify, WM_COMMAND, wParam, lParam);
|
||||
|
@ -3650,7 +3675,6 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
HWND hwnd = infoPtr->hwnd;
|
||||
HWND hwndEdit;
|
||||
SIZE sz;
|
||||
TREEVIEW_ITEM *editItem = hItem;
|
||||
HINSTANCE hinst = (HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE);
|
||||
HDC hdc;
|
||||
HFONT hOldFont=0;
|
||||
|
@ -3658,7 +3682,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
static const WCHAR EditW[] = {'E','d','i','t',0};
|
||||
|
||||
TRACE("%p %p\n", hwnd, hItem);
|
||||
if (!TREEVIEW_ValidItem(infoPtr, editItem))
|
||||
if (!TREEVIEW_ValidItem(infoPtr, hItem))
|
||||
return NULL;
|
||||
|
||||
if (infoPtr->hwndEdit)
|
||||
|
@ -3666,11 +3690,10 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
|
||||
infoPtr->bLabelChanged = FALSE;
|
||||
|
||||
/* Make sure that edit item is selected */
|
||||
TREEVIEW_DoSelectItem(infoPtr, TVGN_CARET, hItem, TVC_UNKNOWN);
|
||||
/* make edit item visible */
|
||||
TREEVIEW_EnsureVisible(infoPtr, hItem, TRUE);
|
||||
|
||||
TREEVIEW_UpdateDispInfo(infoPtr, editItem, TVIF_TEXT);
|
||||
TREEVIEW_UpdateDispInfo(infoPtr, hItem, TVIF_TEXT);
|
||||
|
||||
hdc = GetDC(hwnd);
|
||||
/* Select the font to get appropriate metric dimensions */
|
||||
|
@ -3680,8 +3703,8 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
}
|
||||
|
||||
/* Get string length in pixels */
|
||||
if (editItem->pszText)
|
||||
GetTextExtentPoint32W(hdc, editItem->pszText, strlenW(editItem->pszText),
|
||||
if (hItem->pszText)
|
||||
GetTextExtentPoint32W(hdc, hItem->pszText, strlenW(hItem->pszText),
|
||||
&sz);
|
||||
else
|
||||
GetTextExtentPoint32A(hdc, "", 0, &sz);
|
||||
|
@ -3691,7 +3714,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
sz.cx += (textMetric.tmMaxCharWidth * 2);
|
||||
|
||||
sz.cx = max(sz.cx, textMetric.tmMaxCharWidth * 3);
|
||||
sz.cx = min(sz.cx, infoPtr->clientWidth - editItem->textOffset + 2);
|
||||
sz.cx = min(sz.cx, infoPtr->clientWidth - hItem->textOffset + 2);
|
||||
|
||||
if (infoPtr->hFont != 0)
|
||||
{
|
||||
|
@ -3699,15 +3722,18 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
}
|
||||
|
||||
ReleaseDC(hwnd, hdc);
|
||||
|
||||
infoPtr->editItem = hItem;
|
||||
|
||||
hwndEdit = CreateWindowExW(WS_EX_LEFT,
|
||||
EditW,
|
||||
0,
|
||||
WS_CHILD | WS_BORDER | ES_AUTOHSCROLL |
|
||||
WS_CLIPSIBLINGS | ES_WANTRETURN |
|
||||
ES_LEFT, editItem->textOffset - 2,
|
||||
editItem->rect.top - 1, sz.cx + 3,
|
||||
editItem->rect.bottom -
|
||||
editItem->rect.top + 3, hwnd, 0, hinst, 0);
|
||||
ES_LEFT, hItem->textOffset - 2,
|
||||
hItem->rect.top - 1, sz.cx + 3,
|
||||
hItem->rect.bottom -
|
||||
hItem->rect.top + 3, hwnd, 0, hinst, 0);
|
||||
/* FIXME: (HMENU)IDTVEDIT,pcs->hInstance,0); */
|
||||
|
||||
infoPtr->hwndEdit = hwndEdit;
|
||||
|
@ -3719,23 +3745,22 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
GetWindowLongW(hwndEdit, GWL_STYLE) | WS_BORDER);
|
||||
|
||||
SendMessageW(hwndEdit, WM_SETFONT,
|
||||
(WPARAM)TREEVIEW_FontForItem(infoPtr, editItem), FALSE);
|
||||
(WPARAM)TREEVIEW_FontForItem(infoPtr, hItem), FALSE);
|
||||
|
||||
infoPtr->wpEditOrig = (WNDPROC)SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC,
|
||||
(DWORD_PTR)
|
||||
TREEVIEW_Edit_SubclassProc);
|
||||
|
||||
if (TREEVIEW_BeginLabelEditNotify(infoPtr, editItem))
|
||||
if (TREEVIEW_BeginLabelEditNotify(infoPtr, hItem))
|
||||
{
|
||||
DestroyWindow(hwndEdit);
|
||||
infoPtr->hwndEdit = 0;
|
||||
infoPtr->editItem = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
infoPtr->selectedItem = hItem;
|
||||
|
||||
if (editItem->pszText)
|
||||
SetWindowTextW(hwndEdit, editItem->pszText);
|
||||
if (hItem->pszText)
|
||||
SetWindowTextW(hwndEdit, hItem->pszText);
|
||||
|
||||
SetFocus(hwndEdit);
|
||||
SendMessageW(hwndEdit, EM_SETSEL, 0, -1);
|
||||
|
@ -3749,15 +3774,14 @@ static LRESULT
|
|||
TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
|
||||
{
|
||||
HWND hwnd = infoPtr->hwnd;
|
||||
TREEVIEW_ITEM *editedItem = infoPtr->selectedItem;
|
||||
TREEVIEW_ITEM *editedItem = infoPtr->editItem;
|
||||
NMTVDISPINFOW tvdi;
|
||||
BOOL bCommit;
|
||||
WCHAR tmpText[1024] = { '\0' };
|
||||
WCHAR *newText = tmpText;
|
||||
int iLength = 0;
|
||||
|
||||
if (!infoPtr->hwndEdit)
|
||||
return FALSE;
|
||||
if (!IsWindow(infoPtr->hwndEdit)) return FALSE;
|
||||
|
||||
tvdi.hdr.hwndFrom = hwnd;
|
||||
tvdi.hdr.idFrom = GetWindowLongPtrW(hwnd, GWLP_ID);
|
||||
|
@ -3810,6 +3834,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
|
|||
if(newText != tmpText) Free(newText);
|
||||
DestroyWindow(infoPtr->hwndEdit);
|
||||
infoPtr->hwndEdit = 0;
|
||||
infoPtr->editItem = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
@ -3826,6 +3851,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
|
|||
ShowWindow(infoPtr->hwndEdit, SW_HIDE);
|
||||
DestroyWindow(infoPtr->hwndEdit);
|
||||
infoPtr->hwndEdit = 0;
|
||||
infoPtr->editItem = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -4939,13 +4965,14 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
infoPtr->treeHeight = 0;
|
||||
|
||||
infoPtr->uIndent = MINIMUM_INDENT;
|
||||
infoPtr->selectedItem = 0;
|
||||
infoPtr->focusedItem = 0;
|
||||
infoPtr->hotItem = 0;
|
||||
infoPtr->firstVisible = 0;
|
||||
infoPtr->selectedItem = NULL;
|
||||
infoPtr->focusedItem = NULL;
|
||||
infoPtr->hotItem = NULL;
|
||||
infoPtr->editItem = NULL;
|
||||
infoPtr->firstVisible = NULL;
|
||||
infoPtr->maxVisibleOrder = 0;
|
||||
infoPtr->dropItem = 0;
|
||||
infoPtr->insertMarkItem = 0;
|
||||
infoPtr->dropItem = NULL;
|
||||
infoPtr->insertMarkItem = NULL;
|
||||
infoPtr->insertBeforeorAfter = 0;
|
||||
/* dragList */
|
||||
|
||||
|
@ -4958,7 +4985,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
|
||||
/* hwndToolTip */
|
||||
|
||||
infoPtr->hwndEdit = 0;
|
||||
infoPtr->hwndEdit = NULL;
|
||||
infoPtr->wpEditOrig = NULL;
|
||||
infoPtr->bIgnoreEditKillFocus = FALSE;
|
||||
infoPtr->bLabelChanged = FALSE;
|
||||
|
|
|
@ -172,6 +172,7 @@ typedef struct tagFD32_PRIVATE
|
|||
|
||||
const char FileOpenDlgInfosStr[] = "FileOpenDlgInfos"; /* windows property description string */
|
||||
static const char LookInInfosStr[] = "LookInInfos"; /* LOOKIN combo box property */
|
||||
static SIZE MemDialogSize = { 0, 0}; /* keep size of the (resizable) dialog */
|
||||
|
||||
/***********************************************************************
|
||||
* Prototypes
|
||||
|
@ -276,6 +277,9 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
|
|||
fodInfos->sizedlg.cx = fodInfos->sizedlg.cy = 0;
|
||||
fodInfos->initial_size.x = fodInfos->initial_size.y = 0;
|
||||
}
|
||||
else
|
||||
((LPDLGTEMPLATEW)template)->style &= ~WS_SIZEBOX;
|
||||
|
||||
|
||||
/* old style hook messages */
|
||||
if (IsHooked(fodInfos))
|
||||
|
@ -553,13 +557,14 @@ static BOOL COMDLG32_GetDisplayNameOf(LPCITEMIDLIST pidl, LPWSTR pwszPath) {
|
|||
/***********************************************************************
|
||||
* ArrangeCtrlPositions [internal]
|
||||
*
|
||||
* NOTE: Do not change anything here without a lot of testing.
|
||||
* NOTE: Make sure to add testcases for any changes made here.
|
||||
*/
|
||||
static void ArrangeCtrlPositions(HWND hwndChildDlg, HWND hwndParentDlg, BOOL hide_help)
|
||||
{
|
||||
HWND hwndChild, hwndStc32;
|
||||
RECT rectParent, rectChild, rectStc32;
|
||||
INT help_fixup = 0, child_height_fixup = 0, child_width_fixup = 0;
|
||||
INT help_fixup = 0;
|
||||
int chgx, chgy;
|
||||
|
||||
/* Take into account if open as read only checkbox and help button
|
||||
* are hidden
|
||||
|
@ -622,24 +627,16 @@ static void ArrangeCtrlPositions(HWND hwndChildDlg, HWND hwndParentDlg, BOOL hid
|
|||
/* move only if stc32 exist */
|
||||
if (hwndStc32 && rectChild.left > rectStc32.right)
|
||||
{
|
||||
LONG old_left = rectChild.left;
|
||||
|
||||
/* move to the right of visible controls of the parent dialog */
|
||||
rectChild.left += rectParent.right;
|
||||
rectChild.left -= rectStc32.right;
|
||||
|
||||
child_width_fixup = rectChild.left - old_left;
|
||||
}
|
||||
/* move even if stc32 doesn't exist */
|
||||
if (rectChild.top >= rectStc32.bottom)
|
||||
{
|
||||
LONG old_top = rectChild.top;
|
||||
|
||||
/* move below visible controls of the parent dialog */
|
||||
rectChild.top += rectParent.bottom;
|
||||
rectChild.top -= rectStc32.bottom - rectStc32.top;
|
||||
|
||||
child_height_fixup = rectChild.top - old_top;
|
||||
}
|
||||
|
||||
SetWindowPos(hwndChild, 0, rectChild.left, rectChild.top,
|
||||
|
@ -674,50 +671,36 @@ static void ArrangeCtrlPositions(HWND hwndChildDlg, HWND hwndParentDlg, BOOL hid
|
|||
/* here we have to use original parent size */
|
||||
GetClientRect(hwndParentDlg, &rectParent);
|
||||
GetClientRect(hwndChildDlg, &rectChild);
|
||||
TRACE( "parent %s child %s stc32 %s\n", wine_dbgstr_rect( &rectParent),
|
||||
wine_dbgstr_rect( &rectChild), wine_dbgstr_rect( &rectStc32));
|
||||
|
||||
if (hwndStc32)
|
||||
{
|
||||
rectChild.right += child_width_fixup;
|
||||
rectChild.bottom += child_height_fixup;
|
||||
|
||||
if (rectParent.right > rectChild.right)
|
||||
{
|
||||
rectParent.right += rectChild.right;
|
||||
rectParent.right -= rectStc32.right - rectStc32.left;
|
||||
}
|
||||
/* width */
|
||||
if (rectParent.right > rectStc32.right - rectStc32.left)
|
||||
chgx = rectChild.right - ( rectStc32.right - rectStc32.left);
|
||||
else
|
||||
{
|
||||
rectParent.right = rectChild.right;
|
||||
}
|
||||
|
||||
if (rectParent.bottom > rectChild.bottom)
|
||||
{
|
||||
rectParent.bottom += rectChild.bottom;
|
||||
rectParent.bottom -= rectStc32.bottom - rectStc32.top;
|
||||
}
|
||||
chgx = rectChild.right - rectParent.right;
|
||||
/* height */
|
||||
if (rectParent.bottom > rectStc32.bottom - rectStc32.top)
|
||||
chgy = rectChild.bottom - ( rectStc32.bottom - rectStc32.top) - help_fixup;
|
||||
else
|
||||
{
|
||||
/* child dialog is higher, unconditionally set new dialog
|
||||
* height to its size (help_fixup will be subtracted below)
|
||||
/* Unconditionally set new dialog
|
||||
* height to that of the child
|
||||
*/
|
||||
rectParent.bottom = rectChild.bottom + help_fixup;
|
||||
}
|
||||
chgy = rectChild.bottom - rectParent.bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
rectParent.bottom += rectChild.bottom;
|
||||
chgx = 0;
|
||||
chgy = rectChild.bottom - help_fixup;
|
||||
}
|
||||
|
||||
/* finally use fixed parent size */
|
||||
rectParent.bottom -= help_fixup;
|
||||
|
||||
/* set the size of the parent dialog */
|
||||
AdjustWindowRectEx(&rectParent, GetWindowLongW(hwndParentDlg, GWL_STYLE),
|
||||
FALSE, GetWindowLongW(hwndParentDlg, GWL_EXSTYLE));
|
||||
GetWindowRect(hwndParentDlg, &rectParent);
|
||||
SetWindowPos(hwndParentDlg, 0,
|
||||
0, 0,
|
||||
rectParent.right - rectParent.left,
|
||||
rectParent.bottom - rectParent.top,
|
||||
rectParent.right - rectParent.left + chgx,
|
||||
rectParent.bottom - rectParent.top + chgy,
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
|
@ -789,11 +772,7 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
|
|||
hChildDlg = CreateDialogIndirectParamA(hinst, template, hwnd,
|
||||
IsHooked(fodInfos) ? (DLGPROC)fodInfos->ofnInfos->lpfnHook : FileOpenDlgProcUserTemplate,
|
||||
(LPARAM)fodInfos->ofnInfos);
|
||||
if(hChildDlg)
|
||||
{
|
||||
ShowWindow(hChildDlg,SW_SHOW);
|
||||
return hChildDlg;
|
||||
}
|
||||
return hChildDlg;
|
||||
}
|
||||
else if( IsHooked(fodInfos))
|
||||
{
|
||||
|
@ -1023,6 +1002,8 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
if( !(fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)) return FALSE;
|
||||
/* get the new dialog rectangle */
|
||||
GetWindowRect( hwnd, &rc);
|
||||
TRACE("Size from %d,%d to %d,%d\n", fodInfos->sizedlg.cx, fodInfos->sizedlg.cy,
|
||||
rc.right -rc.left, rc.bottom -rc.top);
|
||||
/* not initialized yet */
|
||||
if( (fodInfos->sizedlg.cx == 0 && fodInfos->sizedlg.cy == 0) ||
|
||||
((fodInfos->sizedlg.cx == rc.right -rc.left) && /* no change */
|
||||
|
@ -1043,6 +1024,7 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
/* change position and sizes of the controls */
|
||||
for( ctrl = GetWindow( hwnd, GW_CHILD); ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT))
|
||||
{
|
||||
int ctrlid = GetDlgCtrlID( ctrl);
|
||||
GetWindowRect( ctrl, &rc);
|
||||
MapWindowPoints( NULL, hwnd, (LPPOINT) &rc, 2);
|
||||
if( ctrl == fodInfos->DlgInfos.hwndGrip)
|
||||
|
@ -1055,25 +1037,69 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
/* if it was below the shell view
|
||||
* move to bottom */
|
||||
DeferWindowPos( hdwp, ctrl, NULL, rc.left, rc.top + chgy,
|
||||
rc.right - rc.left, rc.bottom - rc.top,
|
||||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
switch( ctrlid)
|
||||
{
|
||||
/* file name box and file types combo change also width */
|
||||
case edt1:
|
||||
case cmb1:
|
||||
DeferWindowPos( hdwp, ctrl, NULL, rc.left, rc.top + chgy,
|
||||
rc.right - rc.left + chgx, rc.bottom - rc.top,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
break;
|
||||
/* then these buttons must move out of the way */
|
||||
case IDOK:
|
||||
case IDCANCEL:
|
||||
case pshHelp:
|
||||
DeferWindowPos( hdwp, ctrl, NULL, rc.left + chgx, rc.top + chgy,
|
||||
0, 0,
|
||||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
break;
|
||||
default:
|
||||
DeferWindowPos( hdwp, ctrl, NULL, rc.left, rc.top + chgy,
|
||||
0, 0,
|
||||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
}
|
||||
}
|
||||
else if( rc.left > rcview.right)
|
||||
{
|
||||
/* if it was to the right of the shell view
|
||||
* move to right */
|
||||
DeferWindowPos( hdwp, ctrl, NULL, rc.left + chgx, rc.top,
|
||||
rc.right - rc.left, rc.bottom - rc.top,
|
||||
0, 0,
|
||||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
}
|
||||
else
|
||||
/* special cases */
|
||||
{
|
||||
switch( ctrlid)
|
||||
{
|
||||
#if 0 /* this is Win2k, Win XP. Vista and Higher don't move/size these controls */
|
||||
case IDC_LOOKIN:
|
||||
DeferWindowPos( hdwp, ctrl, NULL, 0, 0,
|
||||
rc.right - rc.left + chgx, rc.bottom - rc.top,
|
||||
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
break;
|
||||
case IDC_TOOLBARSTATIC:
|
||||
case IDC_TOOLBAR:
|
||||
DeferWindowPos( hdwp, ctrl, NULL, rc.left + chgx, rc.top,
|
||||
0, 0,
|
||||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
break;
|
||||
#endif
|
||||
/* not resized in windows. Since wine uses this invisible control
|
||||
* to size the browser view it needs to be resized */
|
||||
case IDC_SHELLSTATIC:
|
||||
DeferWindowPos( hdwp, ctrl, NULL, 0, 0,
|
||||
rc.right - rc.left + chgx,
|
||||
rc.bottom - rc.top + chgy,
|
||||
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(fodInfos->DlgInfos.hwndCustomDlg &&
|
||||
(fodInfos->ofnInfos->Flags & (OFN_ENABLETEMPLATE | OFN_ENABLETEMPLATEHANDLE)))
|
||||
{
|
||||
GetClientRect(hwnd, &rc);
|
||||
DeferWindowPos( hdwp,fodInfos->DlgInfos.hwndCustomDlg, NULL,
|
||||
0, 0, rc.right, rc.bottom, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
for( ctrl = GetWindow( fodInfos->DlgInfos.hwndCustomDlg, GW_CHILD);
|
||||
ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT))
|
||||
{
|
||||
|
@ -1096,6 +1122,11 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
}
|
||||
}
|
||||
/* size the custom dialog at the end: some applications do some
|
||||
* control re-arranging at this point */
|
||||
GetClientRect(hwnd, &rc);
|
||||
DeferWindowPos( hdwp,fodInfos->DlgInfos.hwndCustomDlg, NULL,
|
||||
0, 0, rc.right, rc.bottom, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
}
|
||||
EndDeferWindowPos( hdwp);
|
||||
/* should not be needed */
|
||||
|
@ -1111,7 +1142,7 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
#if 0
|
||||
TRACE("0x%04x 0x%04x\n", hwnd, uMsg);
|
||||
TRACE("%p 0x%04x\n", hwnd, uMsg);
|
||||
#endif
|
||||
|
||||
switch(uMsg)
|
||||
|
@ -1146,10 +1177,17 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
FILEDLG95_ResizeControls(hwnd, wParam, lParam);
|
||||
FILEDLG95_FillControls(hwnd, wParam, lParam);
|
||||
|
||||
if( fodInfos->DlgInfos.hwndCustomDlg)
|
||||
ShowWindow( fodInfos->DlgInfos.hwndCustomDlg, SW_SHOW);
|
||||
|
||||
if(fodInfos->ofnInfos->Flags & OFN_EXPLORER) {
|
||||
SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE);
|
||||
SendCustomDlgNotificationMessage(hwnd,CDN_FOLDERCHANGE);
|
||||
}
|
||||
|
||||
if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
|
||||
{
|
||||
GetWindowRect( hwnd, &rc);
|
||||
/* FIXME: should remember sizes of last invocation */
|
||||
fodInfos->sizedlg.cx = rc.right - rc.left;
|
||||
fodInfos->sizedlg.cy = rc.bottom - rc.top;
|
||||
fodInfos->initial_size.x = fodInfos->sizedlg.cx;
|
||||
|
@ -1158,14 +1196,16 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
SetWindowPos( fodInfos->DlgInfos.hwndGrip, NULL,
|
||||
rc.right - gripx, rc.bottom - gripy,
|
||||
0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
/* resize the dialog to the previous invocation */
|
||||
if( MemDialogSize.cx && MemDialogSize.cy)
|
||||
SetWindowPos( hwnd, NULL,
|
||||
0, 0, MemDialogSize.cx, MemDialogSize.cy,
|
||||
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
|
||||
{
|
||||
SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE);
|
||||
SendCustomDlgNotificationMessage(hwnd,CDN_FOLDERCHANGE);
|
||||
SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
case WM_SIZE:
|
||||
|
@ -1189,9 +1229,13 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
return FILEDLG95_OnWMGetIShellBrowser(hwnd);
|
||||
|
||||
case WM_DESTROY:
|
||||
RemovePropA(hwnd, FileOpenDlgInfosStr);
|
||||
return FALSE;
|
||||
|
||||
{
|
||||
FileOpenDlgInfos * fodInfos = GetPropA(hwnd,FileOpenDlgInfosStr);
|
||||
if (fodInfos && fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
|
||||
MemDialogSize = fodInfos->sizedlg;
|
||||
RemovePropA(hwnd, FileOpenDlgInfosStr);
|
||||
return FALSE;
|
||||
}
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnmh = (LPNMHDR)lParam;
|
||||
|
@ -1321,6 +1365,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
|
||||
/* FIXME: use TB_LOADIMAGES when implemented */
|
||||
/* SendMessageW(fodInfos->DlgInfos.hwndTB, TB_LOADIMAGES, IDB_VIEW_SMALL_COLOR, HINST_COMMCTRL);*/
|
||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_SETMAXTEXTROWS, 0, 0);
|
||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 12, (LPARAM) &tba[0]);
|
||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 1, (LPARAM) &tba[1]);
|
||||
|
||||
|
@ -1758,19 +1803,19 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
|
|||
/* First send CDN_FILEOK as MSDN doc says */
|
||||
if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
|
||||
retval = SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
|
||||
if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))
|
||||
if( retval)
|
||||
{
|
||||
TRACE("canceled\n");
|
||||
return (retval == 0);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* fodInfos->ofnInfos points to an ASCII or UNICODE structure as appropriate */
|
||||
retval = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg,
|
||||
fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
|
||||
if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))
|
||||
if( retval)
|
||||
{
|
||||
TRACE("canceled\n");
|
||||
return (retval == 0);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -3297,7 +3342,7 @@ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd)
|
|||
* Although shell32 is already linked the behaviour of exported StrRetToStrN
|
||||
* is dependent on whether emulated OS is unicode or not.
|
||||
*/
|
||||
static HRESULT COMDLG32_StrRetToStrNW (LPWSTR dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
|
||||
static HRESULT COMDLG32_StrRetToStrNW (LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
|
||||
{
|
||||
switch (src->uType)
|
||||
{
|
||||
|
|
|
@ -2366,7 +2366,7 @@ static inline BOOL is_metric(const pagesetup_data *data)
|
|||
return pagesetup_get_flags(data) & PSD_INHUNDREDTHSOFMILLIMETERS;
|
||||
}
|
||||
|
||||
static inline LONG tenths_mm_to_size(pagesetup_data *data, LONG size)
|
||||
static inline LONG tenths_mm_to_size(const pagesetup_data *data, LONG size)
|
||||
{
|
||||
if (is_metric(data))
|
||||
return 10 * size;
|
||||
|
@ -2374,7 +2374,7 @@ static inline LONG tenths_mm_to_size(pagesetup_data *data, LONG size)
|
|||
return 10 * size * 100 / 254;
|
||||
}
|
||||
|
||||
static inline LONG thousandths_inch_to_size(pagesetup_data *data, LONG size)
|
||||
static inline LONG thousandths_inch_to_size(const pagesetup_data *data, LONG size)
|
||||
{
|
||||
if (is_metric(data))
|
||||
return size * 254 / 100;
|
||||
|
@ -2539,7 +2539,7 @@ typedef enum
|
|||
} devnames_name;
|
||||
|
||||
|
||||
static inline WORD get_devname_offset(DEVNAMES *dn, devnames_name which)
|
||||
static inline WORD get_devname_offset(const DEVNAMES *dn, devnames_name which)
|
||||
{
|
||||
switch(which)
|
||||
{
|
||||
|
@ -3012,7 +3012,7 @@ static void update_margin_edits(HWND hDlg, const pagesetup_data *data, WORD id)
|
|||
}
|
||||
}
|
||||
|
||||
static void margin_edit_notification(HWND hDlg, pagesetup_data *data, WORD msg, WORD id)
|
||||
static void margin_edit_notification(HWND hDlg, const pagesetup_data *data, WORD msg, WORD id)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
|
|
|
@ -132,11 +132,7 @@ VOID WINAPI InitMUILanguage (LANGID uiLang);
|
|||
/* callback constants */
|
||||
#define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
|
||||
#define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
|
||||
#ifdef UNICODE
|
||||
#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKW
|
||||
#else
|
||||
#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKA
|
||||
#endif
|
||||
#define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
|
||||
|
||||
#define I_IMAGECALLBACK (-1)
|
||||
#define I_IMAGENONE (-2)
|
||||
|
@ -407,6 +403,7 @@ INT WINAPI LBItemFromPt (HWND, POINT, BOOL);
|
|||
static const WCHAR UPDOWN_CLASSW[] = { 'm','s','c','t','l','s','_',
|
||||
'u','p','d','o','w','n','3','2',0 };
|
||||
#endif
|
||||
#define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
|
||||
|
||||
typedef struct _UDACCEL
|
||||
{
|
||||
|
@ -475,6 +472,7 @@ HWND WINAPI CreateUpDownControl (DWORD, INT, INT, INT, INT,
|
|||
static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
|
||||
'p','r','o','g','r','e','s','s','3','2',0 };
|
||||
#endif
|
||||
#define PROGRESS_CLASS WINELIB_NAME_AW(PROGRESS_CLASS)
|
||||
|
||||
#define PBM_SETRANGE (WM_USER+1)
|
||||
#define PBM_SETPOS (WM_USER+2)
|
||||
|
@ -486,6 +484,8 @@ static const WCHAR PROGRESS_CLASSW[] = { 'm','s','c','t','l','s','_',
|
|||
#define PBM_GETPOS (WM_USER+8)
|
||||
#define PBM_SETBARCOLOR (WM_USER+9)
|
||||
#define PBM_SETMARQUEE (WM_USER+10)
|
||||
#define PBM_GETBKCOLOR (WM_USER+14)
|
||||
#define PBM_GETBARCOLOR (WM_USER+15)
|
||||
#define PBM_SETBKCOLOR CCM_SETBKCOLOR
|
||||
|
||||
#define PBS_SMOOTH 0x01
|
||||
|
@ -727,6 +727,7 @@ int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, COLORREF,
|
|||
#else
|
||||
static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
|
||||
#endif
|
||||
#define WC_HEADER WINELIB_NAME_AW(WC_HEADER)
|
||||
|
||||
#define HDS_HORZ 0x0000
|
||||
#define HDS_BUTTONS 0x0002
|
||||
|
@ -737,6 +738,8 @@ static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',
|
|||
#define HDS_FILTERBAR 0x0100
|
||||
#define HDS_FLAT 0x0200
|
||||
#define HDS_CHECKBOXES 0x0400
|
||||
#define HDS_NOSIZING 0x0800
|
||||
#define HDS_OVERFLOW 0x1000
|
||||
|
||||
#define HDI_WIDTH 0x0001
|
||||
#define HDI_HEIGHT HDI_WIDTH
|
||||
|
@ -748,6 +751,9 @@ static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',
|
|||
#define HDI_DI_SETITEM 0x0040
|
||||
#define HDI_ORDER 0x0080
|
||||
#define HDI_FILTER 0x0100
|
||||
#define HDI_STATE 0x0200
|
||||
|
||||
#define HDIS_FOCUSED 0x00000001
|
||||
|
||||
#define HDF_LEFT 0x0000
|
||||
#define HDF_RIGHT 0x0001
|
||||
|
@ -764,6 +770,7 @@ static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',
|
|||
#define HDF_BITMAP 0x2000
|
||||
#define HDF_STRING 0x4000
|
||||
#define HDF_OWNERDRAW 0x8000
|
||||
#define HDF_SPLITBUTTON 0x1000000
|
||||
|
||||
#define HHT_NOWHERE 0x0001
|
||||
#define HHT_ONHEADER 0x0002
|
||||
|
@ -776,6 +783,8 @@ static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',
|
|||
#define HHT_TORIGHT 0x0400
|
||||
#define HHT_TOLEFT 0x0800
|
||||
#define HHT_ONITEMSTATEICON 0x1000
|
||||
#define HHT_ONDROPDOWN 0x2000
|
||||
#define HHT_ONOVERFLOW 0x4000
|
||||
|
||||
#define HDM_FIRST 0x1200
|
||||
#define HDM_GETITEMCOUNT (HDM_FIRST+0)
|
||||
|
@ -863,10 +872,14 @@ typedef struct _HD_ITEMA
|
|||
INT cchTextMax;
|
||||
INT fmt;
|
||||
LPARAM lParam;
|
||||
/* (_WIN32_IE >= 0x0300) */
|
||||
INT iImage;
|
||||
INT iOrder;
|
||||
/* (_WIN32_IE >= 0x0500) */
|
||||
UINT type;
|
||||
LPVOID pvFilter;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
UINT state;
|
||||
} HDITEMA, *LPHDITEMA;
|
||||
|
||||
typedef struct _HD_ITEMW
|
||||
|
@ -878,10 +891,14 @@ typedef struct _HD_ITEMW
|
|||
INT cchTextMax;
|
||||
INT fmt;
|
||||
LPARAM lParam;
|
||||
/* (_WIN32_IE >= 0x0300) */
|
||||
INT iImage;
|
||||
INT iOrder;
|
||||
/* (_WIN32_IE >= 0x0500) */
|
||||
UINT type;
|
||||
LPVOID pvFilter;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
UINT state;
|
||||
} HDITEMW, *LPHDITEMW;
|
||||
|
||||
#define HDITEM WINELIB_NAME_AW(HDITEM)
|
||||
|
@ -975,14 +992,14 @@ typedef struct tagNMHDFILTERBTNCLICK
|
|||
} NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK;
|
||||
|
||||
#define Header_GetItemCount(hwndHD) \
|
||||
(INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L)
|
||||
(INT)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L)
|
||||
#define Header_InsertItemA(hwndHD,i,phdi) \
|
||||
(INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
|
||||
#define Header_InsertItemW(hwndHD,i,phdi) \
|
||||
(INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
|
||||
#define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
|
||||
#define Header_DeleteItem(hwndHD,i) \
|
||||
(BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
|
||||
(BOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
|
||||
#define Header_GetItemA(hwndHD,i,phdi) \
|
||||
(BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
|
||||
#define Header_GetItemW(hwndHD,i,phdi) \
|
||||
|
@ -994,27 +1011,27 @@ typedef struct tagNMHDFILTERBTNCLICK
|
|||
(BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
|
||||
#define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
|
||||
#define Header_Layout(hwndHD,playout) \
|
||||
(BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
|
||||
(BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
|
||||
#define Header_GetItemRect(hwnd,iItem,lprc) \
|
||||
(BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
|
||||
(BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
|
||||
#define Header_SetImageList(hwnd,himl) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
|
||||
(HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
|
||||
#define Header_GetImageList(hwnd) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0)
|
||||
(HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
|
||||
#define Header_OrderToIndex(hwnd,i) \
|
||||
(INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
|
||||
(INT)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
|
||||
#define Header_CreateDragImage(hwnd,i) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
|
||||
(HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
|
||||
#define Header_GetOrderArray(hwnd,iCount,lpi) \
|
||||
(BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
|
||||
(BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
|
||||
#define Header_SetOrderArray(hwnd,iCount,lpi) \
|
||||
(BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
|
||||
(BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
|
||||
#define Header_SetHotDivider(hwnd,fPos,dw) \
|
||||
(INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
|
||||
(INT)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
|
||||
#define Header_SetUnicodeFormat(hwnd,fUnicode) \
|
||||
(BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
|
||||
(BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
|
||||
#define Header_GetUnicodeFormat(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0)
|
||||
(BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
|
||||
|
||||
/* Win32 5.1 Button Theme */
|
||||
#define WC_BUTTONA "Button"
|
||||
|
@ -1025,6 +1042,7 @@ typedef struct tagNMHDFILTERBTNCLICK
|
|||
#else
|
||||
static const WCHAR WC_BUTTONW[] = { 'B','u','t','t','o','n',0 };
|
||||
#endif
|
||||
#define WC_BUTTON WINELIB_NAME_AW(WC_BUTTON)
|
||||
|
||||
#define BCN_FIRST (0U-1250U)
|
||||
#define BCN_LAST (0U-1350U)
|
||||
|
@ -1051,6 +1069,7 @@ typedef struct tagNMBCHOTITEM
|
|||
static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
|
||||
'W','i','n','d','o','w','3','2',0 };
|
||||
#endif
|
||||
#define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
|
||||
|
||||
#define CMB_MASKED 0x02
|
||||
|
||||
|
@ -1212,12 +1231,14 @@ static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
|
|||
#define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING)
|
||||
|
||||
/* undocumented messages in Toolbar */
|
||||
#ifdef __WINESRC__
|
||||
#define TB_UNKWN45D (WM_USER+93)
|
||||
#define TB_SETHOTITEM2 (WM_USER+94)
|
||||
#define TB_SETLISTGAP (WM_USER+96)
|
||||
#define TB_GETIMAGELISTCOUNT (WM_USER+98)
|
||||
#define TB_GETIDEALSIZE (WM_USER+99)
|
||||
#define TB_UNKWN464 (WM_USER+100)
|
||||
#endif
|
||||
|
||||
#define TB_GETMETRICS (WM_USER+101)
|
||||
#define TB_SETMETRICS (WM_USER+102)
|
||||
|
@ -1615,41 +1636,7 @@ CreateMappedBitmap (HINSTANCE, INT_PTR, UINT, LPCOLORMAP, INT);
|
|||
static const WCHAR TOOLTIPS_CLASSW[] = { 't','o','o','l','t','i','p','s','_',
|
||||
'c','l','a','s','s','3','2',0 };
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
#define UPDOWN_CLASS L"msctls_updown32"
|
||||
#define PROGRESS_CLASS L"msctls_progress32"
|
||||
#define WC_HEADER L"SysHeader32"
|
||||
#define WC_BUTTON L"Button"
|
||||
#define TOOLBARCLASSNAME L"ToolbarWindow32"
|
||||
#define TOOLTIPS_CLASS L"tooltips_class32"
|
||||
#else
|
||||
#define UPDOWN_CLASS "msctls_updown32"
|
||||
#define PROGRESS_CLASS "msctls_progress32"
|
||||
#define WC_HEADER "SysHeader32"
|
||||
#define WC_BUTTON "Button"
|
||||
#define TOOLBARCLASSNAME "ToolbarWindow32"
|
||||
#define TOOLTIPS_CLASS "tooltips_class32"
|
||||
#endif
|
||||
|
||||
#if (_WIN32_WINNT >= 0x501)
|
||||
#define BUTTON_IMAGELIST_ALIGN_LEFT 0
|
||||
#define BUTTON_IMAGELIST_ALIGN_RIGHT 1
|
||||
#define BUTTON_IMAGELIST_ALIGN_TOP 2
|
||||
#define BUTTON_IMAGELIST_ALIGN_BOTTOM 3
|
||||
#define BUTTON_IMAGELIST_ALIGN_CENTER 4
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HIMAGELIST himl;
|
||||
RECT margin;
|
||||
UINT uAlign;
|
||||
} BUTTON_IMAGELIST, *PBUTTON_IMAGELIST;
|
||||
|
||||
#define BCM_FIRST 0x1600
|
||||
#define BCM_GETIDEALSIZE (BCM_FIRST + 1)
|
||||
#define BCM_SETIMAGELIST (BCM_FIRST + 2)
|
||||
#endif /* _WIN32_WINNT */
|
||||
#define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
|
||||
|
||||
#define INFOTIPSIZE 1024
|
||||
|
||||
|
@ -2001,6 +1988,9 @@ typedef struct tagREBARBANDINFOA
|
|||
UINT cxIdeal;
|
||||
LPARAM lParam;
|
||||
UINT cxHeader;
|
||||
/* _WIN32_WINNT >= 0x0600 */
|
||||
RECT rcChevronLocation;
|
||||
UINT uChevronState;
|
||||
} REBARBANDINFOA, *LPREBARBANDINFOA;
|
||||
|
||||
typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
|
||||
|
@ -2027,6 +2017,9 @@ typedef struct tagREBARBANDINFOW
|
|||
UINT cxIdeal;
|
||||
LPARAM lParam;
|
||||
UINT cxHeader;
|
||||
/* _WIN32_WINNT >= 0x0600 */
|
||||
RECT rcChevronLocation;
|
||||
UINT uChevronState;
|
||||
} REBARBANDINFOW, *LPREBARBANDINFOW;
|
||||
|
||||
typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
|
||||
|
@ -2038,6 +2031,9 @@ typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
|
|||
#define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, wID)
|
||||
#define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
|
||||
#define REBARBANDINFO_V3_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), wID)
|
||||
#define REBARBANDINFOA_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA, cxHeader)
|
||||
#define REBARBANDINFOW_V6_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, cxHeader)
|
||||
#define REBARBANDINFO_V6_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(REBARBANDINFO), cxHeader)
|
||||
|
||||
typedef struct tagNMREBARCHILDSIZE
|
||||
{
|
||||
|
@ -2412,10 +2408,10 @@ static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
|
|||
#define TVIF_INTEGRAL 0x0080
|
||||
#define TVIF_DI_SETITEM 0x1000
|
||||
|
||||
#define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000) /* -65536 */
|
||||
#define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0x0FFFF) /* -65535 */
|
||||
#define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0x0FFFE) /* -65534 */
|
||||
#define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0x0FFFD) /* -65533 */
|
||||
#define TVI_ROOT ((HTREEITEM)-65536)
|
||||
#define TVI_FIRST ((HTREEITEM)-65535)
|
||||
#define TVI_LAST ((HTREEITEM)-65534)
|
||||
#define TVI_SORT ((HTREEITEM)-65533)
|
||||
|
||||
#define TVIS_FOCUSED 0x0001
|
||||
#define TVIS_SELECTED 0x0002
|
||||
|
@ -2537,6 +2533,9 @@ typedef struct {
|
|||
INT cChildren;
|
||||
LPARAM lParam;
|
||||
INT iIntegral;
|
||||
UINT uStateEx; /* _WIN32_IE >= 0x600 */
|
||||
HWND hwnd; /* _WIN32_IE >= 0x600 */
|
||||
INT iExpandedImage; /* _WIN32_IE >= 0x600 */
|
||||
} TVITEMEXA, *LPTVITEMEXA;
|
||||
|
||||
typedef struct {
|
||||
|
@ -2551,6 +2550,9 @@ typedef struct {
|
|||
INT cChildren;
|
||||
LPARAM lParam;
|
||||
INT iIntegral;
|
||||
UINT uStateEx; /* _WIN32_IE >= 0x600 */
|
||||
HWND hwnd; /* _WIN32_IE >= 0x600 */
|
||||
INT iExpandedImage; /* _WIN32_IE >= 0x600 */
|
||||
} TVITEMEXW, *LPTVITEMEXW;
|
||||
|
||||
#define TVITEMEX WINELIB_NAME_AW(TVITEMEX)
|
||||
|
@ -2626,8 +2628,20 @@ typedef struct tagTVDISPINFOW {
|
|||
TVITEMW item;
|
||||
} NMTVDISPINFOW, *LPNMTVDISPINFOW;
|
||||
|
||||
typedef struct tagTVDISPINFOEXA {
|
||||
NMHDR hdr;
|
||||
TVITEMEXA item;
|
||||
} NMTVDISPINFOEXA, *LPNMTVDISPINFOEXA;
|
||||
|
||||
typedef struct tagTVDISPINFOEXW {
|
||||
NMHDR hdr;
|
||||
TVITEMEXW item;
|
||||
} NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW;
|
||||
|
||||
#define NMTVDISPINFO WINELIB_NAME_AW(NMTVDISPINFO)
|
||||
#define LPNMTVDISPINFO WINELIB_NAME_AW(LPNMTVDISPINFO)
|
||||
#define NMTVDISPINFOEX WINELIB_NAME_AW(NMTVDISPINFOEX)
|
||||
#define LPNMTVDISPINFOEX WINELIB_NAME_AW(LPNMTVDISPINFOEX)
|
||||
#define TV_DISPINFOA NMTVDISPINFOA
|
||||
#define TV_DISPINFOW NMTVDISPINFOW
|
||||
#define TV_DISPINFO NMTVDISPINFO
|
||||
|
@ -2710,33 +2724,33 @@ typedef struct tagTVKEYDOWN
|
|||
#define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
|
||||
|
||||
#define TreeView_DeleteItem(hwnd, hItem) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
|
||||
(BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
|
||||
#define TreeView_DeleteAllItems(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
|
||||
(BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
|
||||
#define TreeView_Expand(hwnd, hitem, code) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_EXPAND, (WPARAM)code, \
|
||||
(BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)code, \
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_GetItemRect(hwnd, hitem, prc, code) \
|
||||
(*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSGA((hwnd), \
|
||||
(*(HTREEITEM *)prc = (hitem), (BOOL)SNDMSG((hwnd), \
|
||||
TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT *)(prc)))
|
||||
|
||||
#define TreeView_GetCount(hwnd) \
|
||||
(UINT)SNDMSGA((hwnd), TVM_GETCOUNT, 0, 0)
|
||||
(UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
|
||||
#define TreeView_GetIndent(hwnd) \
|
||||
(UINT)SNDMSGA((hwnd), TVM_GETINDENT, 0, 0)
|
||||
(UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
|
||||
#define TreeView_SetIndent(hwnd, indent) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
|
||||
(BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
|
||||
|
||||
#define TreeView_GetImageList(hwnd, iImage) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd), TVM_GETIMAGELIST, iImage, 0)
|
||||
(HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
|
||||
|
||||
#define TreeView_SetImageList(hwnd, himl, iImage) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd), TVM_SETIMAGELIST, iImage, \
|
||||
(HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, \
|
||||
(LPARAM)(HIMAGELIST)(himl))
|
||||
|
||||
#define TreeView_GetNextItem(hwnd, hitem, code) \
|
||||
(HTREEITEM)SNDMSGA((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
|
||||
(HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
|
||||
(LPARAM)(HTREEITEM) (hitem))
|
||||
|
||||
#define TreeView_GetChild(hwnd, hitem) \
|
||||
|
@ -2766,7 +2780,7 @@ typedef struct tagTVKEYDOWN
|
|||
|
||||
|
||||
#define TreeView_Select(hwnd, hitem, code) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_SELECTITEM, (WPARAM)(code), \
|
||||
(BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)(code), \
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
|
||||
|
@ -2791,79 +2805,79 @@ typedef struct tagTVKEYDOWN
|
|||
#define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
|
||||
|
||||
#define TreeView_EditLabel(hwnd, hitem) \
|
||||
(HWND)SNDMSGA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
|
||||
(HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_GetEditControl(hwnd) \
|
||||
(HWND)SNDMSGA((hwnd), TVM_GETEDITCONTROL, 0, 0)
|
||||
(HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
|
||||
|
||||
#define TreeView_GetVisibleCount(hwnd) \
|
||||
(UINT)SNDMSGA((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
|
||||
(UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
|
||||
|
||||
#define TreeView_HitTest(hwnd, lpht) \
|
||||
(HTREEITEM)SNDMSGA((hwnd), TVM_HITTEST, 0,\
|
||||
(HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0,\
|
||||
(LPARAM)(LPTVHITTESTINFO)(lpht))
|
||||
|
||||
#define TreeView_CreateDragImage(hwnd, hitem) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd), TVM_CREATEDRAGIMAGE, 0,\
|
||||
(HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0,\
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_SortChildren(hwnd, hitem, recurse) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
|
||||
(BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_EnsureVisible(hwnd, hitem) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem))
|
||||
(BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT)(hitem))
|
||||
|
||||
#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
|
||||
(BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
|
||||
(LPARAM)(LPTV_SORTCB)(psort))
|
||||
|
||||
#define TreeView_EndEditLabelNow(hwnd, fCancel) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
|
||||
(BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
|
||||
|
||||
#define TreeView_GetISearchString(hwnd, lpsz) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_GETISEARCHSTRING, 0, \
|
||||
(BOOL)SNDMSG((hwnd), TVM_GETISEARCHSTRING, 0, \
|
||||
(LPARAM)(LPTSTR)lpsz)
|
||||
|
||||
#define TreeView_SetToolTips(hwnd, hwndTT) \
|
||||
(HWND)SNDMSGA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
|
||||
(HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
|
||||
|
||||
#define TreeView_GetToolTips(hwnd) \
|
||||
(HWND)SNDMSGA((hwnd), TVM_GETTOOLTIPS, 0, 0)
|
||||
(HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
|
||||
|
||||
#define TreeView_SetItemHeight(hwnd, iHeight) \
|
||||
(INT)SNDMSGA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
|
||||
(INT)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
|
||||
|
||||
#define TreeView_GetItemHeight(hwnd) \
|
||||
(INT)SNDMSGA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
|
||||
(INT)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
|
||||
|
||||
#define TreeView_SetBkColor(hwnd, clr) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
|
||||
|
||||
#define TreeView_SetTextColor(hwnd, clr) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
|
||||
|
||||
#define TreeView_GetBkColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_GETBKCOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
|
||||
|
||||
#define TreeView_GetTextColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_GETTEXTCOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
|
||||
|
||||
#define TreeView_SetScrollTime(hwnd, uTime) \
|
||||
(UINT)SNDMSGA((hwnd), TVM_SETSCROLLTIME, uTime, 0)
|
||||
(UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
|
||||
|
||||
#define TreeView_GetScrollTime(hwnd) \
|
||||
(UINT)SNDMSGA((hwnd), TVM_GETSCROLLTIME, 0, 0)
|
||||
(UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
|
||||
|
||||
#define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
|
||||
(BOOL)SNDMSGA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
|
||||
(BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
|
||||
(LPARAM) (hItem))
|
||||
|
||||
#define TreeView_SetInsertMarkColor(hwnd, clr) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
|
||||
|
||||
#define TreeView_GetInsertMarkColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
|
||||
|
||||
#define TreeView_SetItemState(hwndTV, hti, data, _mask) \
|
||||
{ TVITEM _TVi; \
|
||||
|
@ -2875,16 +2889,16 @@ typedef struct tagTVKEYDOWN
|
|||
}
|
||||
|
||||
#define TreeView_GetItemState(hwndTV, hti, mask) \
|
||||
(UINT)SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
|
||||
(UINT)SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
|
||||
#define TreeView_GetCheckState(hwndTV, hti) \
|
||||
((((UINT)(SNDMSGA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
|
||||
((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
|
||||
TVIS_STATEIMAGEMASK))) >> 12) -1)
|
||||
|
||||
#define TreeView_SetLineColor(hwnd, clr) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
|
||||
(COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
|
||||
|
||||
#define TreeView_GetLineColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), TVM_GETLINECOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), TVM_GETLINECOLOR, 0, 0)
|
||||
|
||||
#define TreeView_MapAccIDToHTREEITEM(hwnd, id) \
|
||||
(HTREEITEM)SNDMSG((hwnd), TVM_MAPACCIDTOHTREEITEM, id, 0)
|
||||
|
@ -3249,6 +3263,7 @@ static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
|
|||
#define LVM_CANCELEDITLABEL (LVM_FIRST + 179)
|
||||
#define LVM_MAPINDEXTOID (LVM_FIRST + 180)
|
||||
#define LVM_MAPIDTOINDEX (LVM_FIRST + 181)
|
||||
#define LVM_ISITEMVISIBLE (LVM_FIRST + 182)
|
||||
|
||||
#define LVN_FIRST (0U-100U)
|
||||
#define LVN_LAST (0U-199U)
|
||||
|
@ -3284,12 +3299,20 @@ static const WCHAR WC_LISTVIEWW[] = { 'S','y','s',
|
|||
#define LVN_GETINFOTIPA (LVN_FIRST-57)
|
||||
#define LVN_GETINFOTIPW (LVN_FIRST-58)
|
||||
#define LVN_GETINFOTIP WINELIB_NAME_AW(LVN_GETINFOTIP)
|
||||
#define LVN_INCREMENTALSEARCHA (LVN_FIRST-62)
|
||||
#define LVN_INCREMENTALSEARCHW (LVN_FIRST-63)
|
||||
#define LVN_INCREMENTALSEARCH WINELIB_NAME_AW(LVN_INCREMENTALSEARCH)
|
||||
#define LVN_BEGINSCROLL (LVN_FIRST-80)
|
||||
#define LVN_ENDSCROLL (LVN_FIRST-81)
|
||||
#define LVN_LINKCLICK (LVN_FIRST-84)
|
||||
#define LVN_ASYNCDRAWN (LVN_FIRST-86)
|
||||
#define LVN_GETEMPTYMARKUP (LVN_FIRST-87)
|
||||
|
||||
/* LVN_INCREMENTALSEARCH return codes */
|
||||
#define LVNSCH_DEFAULT -1
|
||||
#define LVNSCH_ERROR -2
|
||||
#define LVNSCH_IGNORE -3
|
||||
|
||||
#define LVA_DEFAULT 0x0000
|
||||
#define LVA_ALIGNLEFT 0x0001
|
||||
#define LVA_ALIGNTOP 0x0002
|
||||
|
@ -3306,10 +3329,15 @@ typedef struct tagLVITEMA
|
|||
INT cchTextMax;
|
||||
INT iImage;
|
||||
LPARAM lParam;
|
||||
INT iIndent; /* (_WIN32_IE >= 0x0300) */
|
||||
int iGroupId; /* (_WIN32_IE >= 0x560) */
|
||||
UINT cColumns; /* (_WIN32_IE >= 0x560) */
|
||||
PUINT puColumns; /* (_WIN32_IE >= 0x560) */
|
||||
/* (_WIN32_IE >= 0x0300) */
|
||||
INT iIndent;
|
||||
/* (_WIN32_IE >= 0x0560) */
|
||||
INT iGroupId;
|
||||
UINT cColumns;
|
||||
PUINT puColumns;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
PINT piColFmt;
|
||||
INT iGroup;
|
||||
} LVITEMA, *LPLVITEMA;
|
||||
|
||||
typedef struct tagLVITEMW
|
||||
|
@ -3323,10 +3351,15 @@ typedef struct tagLVITEMW
|
|||
INT cchTextMax;
|
||||
INT iImage;
|
||||
LPARAM lParam;
|
||||
INT iIndent; /* (_WIN32_IE >= 0x0300) */
|
||||
int iGroupId; /* (_WIN32_IE >= 0x560) */
|
||||
UINT cColumns; /* (_WIN32_IE >= 0x560) */
|
||||
PUINT puColumns; /* (_WIN32_IE >= 0x560) */
|
||||
/* (_WIN32_IE >= 0x0300) */
|
||||
INT iIndent;
|
||||
/* (_WIN32_IE >= 0x0560) */
|
||||
INT iGroupId;
|
||||
UINT cColumns;
|
||||
PUINT puColumns;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
PINT piColFmt;
|
||||
INT iGroup;
|
||||
} LVITEMW, *LPLVITEMW;
|
||||
|
||||
#define LVITEM WINELIB_NAME_AW(LVITEM)
|
||||
|
@ -3336,6 +3369,10 @@ typedef struct tagLVITEMW
|
|||
#define LVITEM_V1_SIZEW CCSIZEOF_STRUCT(LVITEMW, lParam)
|
||||
#define LVITEM_V1_SIZE WINELIB_NAME_AW(LVITEM_V1_SIZE)
|
||||
|
||||
#define LVITEMA_V5_SIZE CCSIZEOF_STRUCT(LVITEMA, puColumns)
|
||||
#define LVITEMW_V5_SIZE CCSIZEOF_STRUCT(LVITEMW, puColumns)
|
||||
#define LVITEM_V5_SIZE WINELIB_NAME_AW(LVITEM_V5_SIZE)
|
||||
|
||||
#define LV_ITEM LVITEM
|
||||
#define LV_ITEMA LVITEMA
|
||||
#define LV_ITEMW LVITEMW
|
||||
|
@ -3399,8 +3436,13 @@ typedef struct tagLVCOLUMNA
|
|||
LPSTR pszText;
|
||||
INT cchTextMax;
|
||||
INT iSubItem;
|
||||
INT iImage; /* (_WIN32_IE >= 0x0300) */
|
||||
INT iOrder; /* (_WIN32_IE >= 0x0300) */
|
||||
/* (_WIN32_IE >= 0x0300) */
|
||||
INT iImage;
|
||||
INT iOrder;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
INT cxMin;
|
||||
INT cxDefault;
|
||||
INT cxIdeal;
|
||||
} LVCOLUMNA, *LPLVCOLUMNA;
|
||||
|
||||
typedef struct tagLVCOLUMNW
|
||||
|
@ -3411,8 +3453,13 @@ typedef struct tagLVCOLUMNW
|
|||
LPWSTR pszText;
|
||||
INT cchTextMax;
|
||||
INT iSubItem;
|
||||
INT iImage; /* (_WIN32_IE >= 0x0300) */
|
||||
INT iOrder; /* (_WIN32_IE >= 0x0300) */
|
||||
/* (_WIN32_IE >= 0x0300) */
|
||||
INT iImage;
|
||||
INT iOrder;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
INT cxMin;
|
||||
INT cxDefault;
|
||||
INT cxIdeal;
|
||||
} LVCOLUMNW, *LPLVCOLUMNW;
|
||||
|
||||
#define LVCOLUMN WINELIB_NAME_AW(LVCOLUMN)
|
||||
|
@ -3518,6 +3565,8 @@ typedef struct tagLVHITTESTINFO
|
|||
UINT flags;
|
||||
INT iItem;
|
||||
INT iSubItem;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
INT iGroup;
|
||||
} LVHITTESTINFO, *LPLVHITTESTINFO;
|
||||
|
||||
#define LV_HITTESTINFO LVHITTESTINFO
|
||||
|
@ -3556,15 +3605,32 @@ typedef struct LVGROUP
|
|||
UINT cbSize;
|
||||
UINT mask;
|
||||
LPWSTR pszHeader;
|
||||
int cchHeader;
|
||||
INT cchHeader;
|
||||
LPWSTR pszFooter;
|
||||
int cchFooter;
|
||||
int iGroupId;
|
||||
INT cchFooter;
|
||||
INT iGroupId;
|
||||
UINT stateMask;
|
||||
UINT state;
|
||||
UINT uAlign;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
LPWSTR pszSubtitle;
|
||||
UINT cchSubtitle;
|
||||
LPWSTR pszTask;
|
||||
UINT cchTask;
|
||||
LPWSTR pszDescriptionTop;
|
||||
UINT cchDescriptionTop;
|
||||
LPWSTR pszDescriptionBottom;
|
||||
UINT cchDescriptionBottom;
|
||||
INT iTitleImage;
|
||||
INT iExtendedImage;
|
||||
INT iFirstItem;
|
||||
UINT cItems;
|
||||
LPWSTR pszSubsetTitle;
|
||||
UINT cchSubsetTitle;
|
||||
} LVGROUP, *PLVGROUP;
|
||||
|
||||
#define LVGROUP_V5_SIZE CCSIZEOF_STRUCT(LVGROUP, uAlign)
|
||||
|
||||
typedef struct LVGROUPMETRICS
|
||||
{
|
||||
UINT cbSize;
|
||||
|
@ -3598,6 +3664,8 @@ typedef struct LVTILEINFO
|
|||
int iItem;
|
||||
UINT cColumns;
|
||||
PUINT puColumns;
|
||||
/* (_WIN32_WINNT >= 0x0600) */
|
||||
int* piColFmt;
|
||||
} LVTILEINFO, *PLVTILEINFO;
|
||||
|
||||
typedef struct LVTILEVIEWINFO
|
||||
|
@ -3698,13 +3766,13 @@ typedef struct NMLVSCROLL
|
|||
} NMLVSCROLL, *LPNMLVSCROLL;
|
||||
|
||||
#define ListView_SetItemCount(hwnd,count) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
|
||||
(BOOL)SNDMSG((hwnd),LVM_SETITEMCOUNT,(WPARAM)(INT)(count),0)
|
||||
#define ListView_SetTextBkColor(hwnd,clrBk) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
|
||||
(BOOL)SNDMSG((hwnd),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
|
||||
#define ListView_SetTextColor(hwnd,clrBk) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
|
||||
(BOOL)SNDMSG((hwnd),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(clrBk))
|
||||
#define ListView_DeleteColumn(hwnd,col)\
|
||||
(LRESULT)SNDMSGA((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
|
||||
(LRESULT)SNDMSG((hwnd),LVM_DELETECOLUMN,0,(LPARAM)(INT)(col))
|
||||
#define ListView_GetColumnA(hwnd,x,col)\
|
||||
(LRESULT)SNDMSGA((hwnd),LVM_GETCOLUMNA,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNA)(col))
|
||||
#define ListView_GetColumnW(hwnd,x,col)\
|
||||
|
@ -3716,13 +3784,13 @@ typedef struct NMLVSCROLL
|
|||
(LRESULT)SNDMSGW((hwnd),LVM_SETCOLUMNW,(WPARAM)(INT)(x),(LPARAM)(LPLVCOLUMNW)(col))
|
||||
#define ListView_SetColumn WINELIB_NAME_AW(ListView_SetColumn)
|
||||
#define ListView_GetColumnWidth(hwnd,x)\
|
||||
(INT)SNDMSGW((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(INT)(x),0L)
|
||||
(INT)SNDMSG((hwnd),LVM_GETCOLUMNWIDTH,(WPARAM)(INT)(x),0L)
|
||||
#define ListView_SetColumnWidth(hwnd,x,width)\
|
||||
(BOOL)SNDMSGW((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
|
||||
(BOOL)SNDMSG((hwnd),LVM_SETCOLUMNWIDTH,(WPARAM)(INT)(x),(LPARAM)(MAKELPARAM(width,0)))
|
||||
|
||||
|
||||
#define ListView_GetNextItem(hwnd,nItem,flags) \
|
||||
(INT)SNDMSGA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
|
||||
(INT)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
|
||||
#define ListView_FindItemA(hwnd,nItem,plvfi) \
|
||||
(INT)SNDMSGA((hwnd),LVM_FINDITEMA,(WPARAM)(INT)(nItem),(LPARAM)(LVFINDINFOA*)(plvfi))
|
||||
#define ListView_FindItemW(hwnd,nItem,plvfi) \
|
||||
|
@ -3730,11 +3798,11 @@ typedef struct NMLVSCROLL
|
|||
#define ListView_FindItem WINELIB_NAME_AW(ListView_FindItem)
|
||||
|
||||
#define ListView_Arrange(hwnd,code) \
|
||||
(INT)SNDMSGA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
|
||||
(INT)SNDMSG((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
|
||||
#define ListView_GetItemPosition(hwnd,i,ppt) \
|
||||
(INT)SNDMSGA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
|
||||
(INT)SNDMSG((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
|
||||
#define ListView_GetItemRect(hwnd,i,prc,code) \
|
||||
(BOOL)SNDMSGA((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
|
||||
(BOOL)SNDMSG((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
|
||||
((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
|
||||
*)(prc)) : (LPARAM)(RECT*)NULL))
|
||||
#define ListView_SetItemA(hwnd,pitem) \
|
||||
|
@ -3743,56 +3811,56 @@ typedef struct NMLVSCROLL
|
|||
(INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem))
|
||||
#define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem)
|
||||
#define ListView_SetItemState(hwnd,i,data,dataMask) \
|
||||
{ LVITEMA _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
|
||||
SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);}
|
||||
{ LVITEM _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\
|
||||
SNDMSG(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEM)&_LVi);}
|
||||
#define ListView_GetItemState(hwnd,i,mask) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
|
||||
(UINT)SNDMSG((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask))
|
||||
#define ListView_SetCheckState(hwndLV, i, bCheck) \
|
||||
{ LVITEM _LVi; _LVi.state = INDEXTOSTATEIMAGEMASK((bCheck)?2:1); _LVi.stateMask = LVIS_STATEIMAGEMASK; \
|
||||
SNDMSG(hwndLV, LVM_SETITEMSTATE, (WPARAM)(UINT)(i), (LPARAM)(LPLVITEM)&_LVi);}
|
||||
#define ListView_GetCheckState(hwndLV, i) \
|
||||
(((UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (i), LVIS_STATEIMAGEMASK) >> 12) - 1)
|
||||
#define ListView_GetCountPerPage(hwnd) \
|
||||
(BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
|
||||
(BOOL)SNDMSG((hwnd),LVM_GETCOUNTPERPAGE,0,0L)
|
||||
#define ListView_GetImageList(hwnd,iImageList) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
|
||||
(HIMAGELIST)SNDMSG((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L)
|
||||
#define ListView_GetStringWidthA(hwnd,pstr) \
|
||||
(INT)SNDMSGA((hwnd),LVM_GETSTRINGWIDTHA,0,(LPARAM)(LPCSTR)(pstr))
|
||||
#define ListView_GetStringWidthW(hwnd,pstr) \
|
||||
(INT)SNDMSGW((hwnd),LVM_GETSTRINGWIDTHW,0,(LPARAM)(LPCWSTR)(pstr))
|
||||
#define ListView_GetStringWidth WINELIB_NAME_AW(ListView_GetStringWidth)
|
||||
#define ListView_GetTopIndex(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_GETTOPINDEX,0,0L)
|
||||
(BOOL)SNDMSG((hwnd),LVM_GETTOPINDEX,0,0L)
|
||||
#define ListView_Scroll(hwnd,dx,dy) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
|
||||
(BOOL)SNDMSG((hwnd),LVM_SCROLL,(WPARAM)(INT)(dx),(LPARAM)(INT)(dy))
|
||||
#define ListView_EnsureVisible(hwnd,i,fPartialOk) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
|
||||
(BOOL)SNDMSG((hwnd),LVM_ENSUREVISIBLE,(WPARAM)(INT)i,(LPARAM)(BOOL)fPartialOk)
|
||||
#define ListView_SetBkColor(hwnd,clrBk) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
|
||||
(BOOL)SNDMSG((hwnd),LVM_SETBKCOLOR,0,(LPARAM)(COLORREF)(clrBk))
|
||||
#define ListView_SetImageList(hwnd,himl,iImageList) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
|
||||
(HIMAGELIST)SNDMSG((hwnd),LVM_SETIMAGELIST,(WPARAM)(iImageList),(LPARAM)(HIMAGELIST)(himl))
|
||||
#define ListView_GetItemCount(hwnd) \
|
||||
(INT)SNDMSGA((hwnd),LVM_GETITEMCOUNT,0,0L)
|
||||
(INT)SNDMSG((hwnd),LVM_GETITEMCOUNT,0,0L)
|
||||
#define ListView_RedrawItems(hwnd,first,last) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
|
||||
(BOOL)SNDMSG((hwnd),LVM_REDRAWITEMS,(WPARAM)(INT)(first),(LPARAM)(INT)(last))
|
||||
#define ListView_GetEditControl(hwnd) \
|
||||
(HWND)SNDMSGA((hwnd), LVM_GETEDITCONTROL, 0, 0)
|
||||
(HWND)SNDMSG((hwnd), LVM_GETEDITCONTROL, 0, 0)
|
||||
#define ListView_GetTextColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), LVM_GETTEXTCOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0)
|
||||
#define ListView_GetTextBkColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), LVM_GETTEXTBKCOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0)
|
||||
#define ListView_GetBkColor(hwnd) \
|
||||
(COLORREF)SNDMSGA((hwnd), LVM_GETBKCOLOR, 0, 0)
|
||||
(COLORREF)SNDMSG((hwnd), LVM_GETBKCOLOR, 0, 0)
|
||||
#define ListView_GetItemA(hwnd,pitem) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_GETITEMA,0,(LPARAM)(LVITEMA *)(pitem))
|
||||
#define ListView_GetItemW(hwnd,pitem) \
|
||||
(BOOL)SNDMSGW((hwnd),LVM_GETITEMW,0,(LPARAM)(LVITEMW *)(pitem))
|
||||
#define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
|
||||
#define ListView_GetOrigin(hwnd,ppt) \
|
||||
(BOOL)SNDMSGW((hwnd),LVM_GETORIGIN,0,(LPARAM)(POINT *)(ppt))
|
||||
(BOOL)SNDMSG((hwnd),LVM_GETORIGIN,0,(LPARAM)(POINT *)(ppt))
|
||||
|
||||
#define ListView_HitTest(hwnd,pinfo) \
|
||||
(INT)SNDMSGA((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
|
||||
(INT)SNDMSG((hwnd),LVM_HITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
|
||||
|
||||
#define ListView_InsertItemA(hwnd,pitem) \
|
||||
(INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
|
||||
|
@ -3801,7 +3869,7 @@ typedef struct NMLVSCROLL
|
|||
#define ListView_InsertItem WINELIB_NAME_AW(ListView_InsertItem)
|
||||
|
||||
#define ListView_DeleteAllItems(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd),LVM_DELETEALLITEMS,0,0L)
|
||||
(BOOL)SNDMSG((hwnd),LVM_DELETEALLITEMS,0,0L)
|
||||
|
||||
#define ListView_InsertColumnA(hwnd,iCol,pcol) \
|
||||
(INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
|
||||
|
@ -3810,19 +3878,19 @@ typedef struct NMLVSCROLL
|
|||
#define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)
|
||||
|
||||
#define ListView_SortItems(hwndLV,_pfnCompare,_lPrm) \
|
||||
(BOOL)SNDMSGA((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
|
||||
(BOOL)SNDMSG((hwndLV),LVM_SORTITEMS,(WPARAM)(LPARAM)_lPrm,(LPARAM)(PFNLVCOMPARE)_pfnCompare)
|
||||
#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
|
||||
(BOOL)SNDMSGA((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
|
||||
(BOOL)SNDMSG((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
|
||||
|
||||
#define ListView_SetItemPosition(hwndLV, i, x, y) \
|
||||
(BOOL)SNDMSGA((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
|
||||
(BOOL)SNDMSG((hwndLV),LVM_SETITEMPOSITION,(WPARAM)(INT)(i),MAKELPARAM((x),(y)))
|
||||
#define ListView_GetSelectedCount(hwndLV) \
|
||||
(UINT)SNDMSGA((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
|
||||
(UINT)SNDMSG((hwndLV),LVM_GETSELECTEDCOUNT,0,0L)
|
||||
|
||||
#define ListView_EditLabelA(hwndLV, i) \
|
||||
(HWND)SNDMSGA((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
|
||||
(HWND)SNDMSG((hwndLV),LVM_EDITLABELA,(WPARAM)(int)(i), 0L)
|
||||
#define ListView_EditLabelW(hwndLV, i) \
|
||||
(HWND)SNDMSGW((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
|
||||
(HWND)SNDMSG((hwndLV),LVM_EDITLABELW,(WPARAM)(int)(i), 0L)
|
||||
#define ListView_EditLabel WINELIB_NAME_AW(ListView_EditLabel)
|
||||
|
||||
#define ListView_GetItemTextA(hwndLV, i, _iSubItem, _pszText, _cchTextMax) \
|
||||
|
@ -3843,7 +3911,7 @@ typedef struct NMLVSCROLL
|
|||
}
|
||||
#define ListView_GetItemText WINELIB_NAME_AW(ListView_GetItemText)
|
||||
#define ListView_SetItemPosition32(hwnd,n,x1,y1) \
|
||||
{ POINT ptNewPos; ptNewPos.x = (x1); ptNewPos.y = (y1); SNDMSGA((hwnd), LVM_SETITEMPOSITION32, (WPARAM)(int)(n), (LPARAM)&ptNewPos); }
|
||||
{ POINT ptNewPos; ptNewPos.x = (x1); ptNewPos.y = (y1); SNDMSG((hwnd), LVM_SETITEMPOSITION32, (WPARAM)(int)(n), (LPARAM)&ptNewPos); }
|
||||
#define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
|
||||
{ LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
|
||||
SNDMSGA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
|
||||
|
@ -3853,40 +3921,40 @@ typedef struct NMLVSCROLL
|
|||
#define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
|
||||
|
||||
#define ListView_DeleteItem(hwndLV, i) \
|
||||
(BOOL)SNDMSGA(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
|
||||
(BOOL)SNDMSG(hwndLV, LVM_DELETEITEM, (WPARAM)(int)(i), 0L)
|
||||
#define ListView_Update(hwndLV, i) \
|
||||
(BOOL)SNDMSGA((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
|
||||
(BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)(i), 0L)
|
||||
#define ListView_GetColumnOrderArray(hwndLV, iCount, pi) \
|
||||
(BOOL)SNDMSGA((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
|
||||
(BOOL)SNDMSG((hwndLV), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
|
||||
#define ListView_GetExtendedListViewStyle(hwndLV) \
|
||||
(DWORD)SNDMSGA((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
|
||||
(DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0L)
|
||||
#define ListView_GetHotCursor(hwndLV) \
|
||||
(HCURSOR)SNDMSGA((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
|
||||
(HCURSOR)SNDMSG((hwndLV), LVM_GETHOTCURSOR, 0, 0L)
|
||||
#define ListView_GetHotItem(hwndLV) \
|
||||
(int)SNDMSGA((hwndLV), LVM_GETHOTITEM, 0, 0L)
|
||||
(int)SNDMSG((hwndLV), LVM_GETHOTITEM, 0, 0L)
|
||||
#define ListView_GetItemSpacing(hwndLV, fSmall) \
|
||||
(DWORD)SNDMSGA((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
|
||||
(DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, (WPARAM)fSmall, 0L)
|
||||
#define ListView_GetSubItemRect(hwndLV, iItem, iSubItem, code, prc) \
|
||||
(BOOL)SNDMSGA((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
|
||||
(BOOL)SNDMSG((hwndLV), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem), \
|
||||
((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : 0))
|
||||
#define ListView_GetToolTips(hwndLV) \
|
||||
(HWND)SNDMSGA((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
|
||||
(HWND)SNDMSG((hwndLV), LVM_GETTOOLTIPS, 0, 0L)
|
||||
#define ListView_SetColumnOrderArray(hwndLV, iCount, pi) \
|
||||
(BOOL)SNDMSGA((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
|
||||
(BOOL)SNDMSG((hwndLV), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
|
||||
#define ListView_SetExtendedListViewStyle(hwndLV, dw) \
|
||||
(DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
|
||||
(DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dw)
|
||||
#define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw) \
|
||||
(DWORD)SNDMSGA((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
|
||||
(DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)dwMask, (LPARAM)dw)
|
||||
#define ListView_SetHotCursor(hwndLV, hcur) \
|
||||
(HCURSOR)SNDMSGA((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
|
||||
(HCURSOR)SNDMSG((hwndLV), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
|
||||
#define ListView_SetHotItem(hwndLV, i) \
|
||||
(int)SNDMSGA((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
|
||||
(int)SNDMSG((hwndLV), LVM_SETHOTITEM, (WPARAM)i, 0L)
|
||||
#define ListView_SetIconSpacing(hwndLV, cx, cy) \
|
||||
(DWORD)SNDMSGA((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
|
||||
(DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
|
||||
#define ListView_SetToolTips(hwndLV, hwndNewHwnd) \
|
||||
(HWND)SNDMSGA((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
|
||||
(HWND)SNDMSG((hwndLV), LVM_SETTOOLTIPS, (WPARAM)hwndNewHwnd, 0L)
|
||||
#define ListView_SubItemHitTest(hwndLV, plvhti) \
|
||||
(int)SNDMSGA((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
|
||||
(int)SNDMSG((hwndLV), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
|
||||
#define ListView_GetSelectionMark(hwndLV) \
|
||||
(int)SNDMSG((hwndLV), LVM_GETSELECTIONMARK, 0, 0)
|
||||
#define ListView_SetSelectionMark(hwndLV, iItem) \
|
||||
|
@ -4063,11 +4131,11 @@ static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
|
|||
|
||||
/* TabCtrl Macros */
|
||||
#define TabCtrl_GetImageList(hwnd) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd), TCM_GETIMAGELIST, 0, 0L)
|
||||
(HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L)
|
||||
#define TabCtrl_SetImageList(hwnd, himl) \
|
||||
(HIMAGELIST)SNDMSGA((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
|
||||
(HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
|
||||
#define TabCtrl_GetItemCount(hwnd) \
|
||||
(int)SNDMSGA((hwnd), TCM_GETITEMCOUNT, 0, 0L)
|
||||
(int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0L)
|
||||
#define TabCtrl_GetItemA(hwnd, iItem, pitem) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_GETITEMA, (WPARAM)(int)iItem, (LPARAM)(TCITEMA *)(pitem))
|
||||
#define TabCtrl_GetItemW(hwnd, iItem, pitem) \
|
||||
|
@ -4084,49 +4152,49 @@ static const WCHAR WC_TABCONTROLW[] = { 'S','y','s',
|
|||
(int)SNDMSGW((hwnd), TCM_INSERTITEMW, (WPARAM)(int)iItem, (LPARAM)(const TCITEMW *)(pitem))
|
||||
#define TabCtrl_InsertItem WINELIB_NAME_AW(TabCtrl_InsertItem)
|
||||
#define TabCtrl_DeleteItem(hwnd, i) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
|
||||
(BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
|
||||
#define TabCtrl_DeleteAllItems(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_DELETEALLITEMS, 0, 0L)
|
||||
(BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L)
|
||||
#define TabCtrl_GetItemRect(hwnd, i, prc) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
|
||||
(BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT *)(prc))
|
||||
#define TabCtrl_GetCurSel(hwnd) \
|
||||
(int)SNDMSGA((hwnd), TCM_GETCURSEL, 0, 0)
|
||||
(int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
|
||||
#define TabCtrl_SetCurSel(hwnd, i) \
|
||||
(int)SNDMSGA((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
|
||||
(int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
|
||||
#define TabCtrl_HitTest(hwndTC, pinfo) \
|
||||
(int)SNDMSGA((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
|
||||
(int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO *)(pinfo))
|
||||
#define TabCtrl_SetItemExtra(hwndTC, cb) \
|
||||
(BOOL)SNDMSGA((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
|
||||
(BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
|
||||
#define TabCtrl_AdjustRect(hwnd, bLarger, prc) \
|
||||
(int)SNDMSGA(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
|
||||
(int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT *)prc)
|
||||
#define TabCtrl_SetItemSize(hwnd, x, y) \
|
||||
(DWORD)SNDMSGA((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
|
||||
(DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
|
||||
#define TabCtrl_RemoveImage(hwnd, i) \
|
||||
(void)SNDMSGA((hwnd), TCM_REMOVEIMAGE, i, 0L)
|
||||
(void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L)
|
||||
#define TabCtrl_SetPadding(hwnd, cx, cy) \
|
||||
(void)SNDMSGA((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
|
||||
(void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
|
||||
#define TabCtrl_GetRowCount(hwnd) \
|
||||
(int)SNDMSGA((hwnd), TCM_GETROWCOUNT, 0, 0L)
|
||||
(int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0L)
|
||||
#define TabCtrl_GetToolTips(hwnd) \
|
||||
(HWND)SNDMSGA((hwnd), TCM_GETTOOLTIPS, 0, 0L)
|
||||
(HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L)
|
||||
#define TabCtrl_SetToolTips(hwnd, hwndTT) \
|
||||
(void)SNDMSGA((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
|
||||
(void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
|
||||
#define TabCtrl_GetCurFocus(hwnd) \
|
||||
(int)SNDMSGA((hwnd), TCM_GETCURFOCUS, 0, 0)
|
||||
(int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
|
||||
#define TabCtrl_SetCurFocus(hwnd, i) \
|
||||
SNDMSGA((hwnd),TCM_SETCURFOCUS, i, 0)
|
||||
SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
|
||||
#define TabCtrl_SetMinTabWidth(hwnd, x) \
|
||||
(int)SNDMSGA((hwnd), TCM_SETMINTABWIDTH, 0, x)
|
||||
(int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
|
||||
#define TabCtrl_DeselectAll(hwnd, fExcludeFocus)\
|
||||
(void)SNDMSGA((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
|
||||
(void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
|
||||
#define TabCtrl_GetUnicodeFormat(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
|
||||
(BOOL)SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
|
||||
#define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
|
||||
(BOOL)SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)fUnicode, 0)
|
||||
#define TabCtrl_GetExtendedStyle(hwnd) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
|
||||
(BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
|
||||
#define TabCtrl_SetExtendedStyle(hwnd, dwExStyle) \
|
||||
(BOOL)SNDMSGA((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
|
||||
(BOOL)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, (LPARAM)dwExStyle)
|
||||
#define TabCtrl_HighlightItem(hwnd, i, fHighlight) \
|
||||
(BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG(fHighlight, 0))
|
||||
|
||||
|
@ -4455,13 +4523,13 @@ static const WCHAR ANIMATE_CLASSW[] = { 'S','y','s',
|
|||
(BOOL)SNDMSGW(hwnd,ACM_OPENW,(WPARAM)hInst,(LPARAM)(LPWSTR)(szName))
|
||||
#define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
|
||||
#define Animate_Play(hwnd,from,to,rep) \
|
||||
(BOOL)SNDMSGA(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
|
||||
(BOOL)SNDMSG(hwnd,ACM_PLAY,(WPARAM)(UINT)(rep),(LPARAM)MAKELONG(from,to))
|
||||
#define Animate_Stop(hwnd) \
|
||||
(BOOL)SNDMSGA(hwnd,ACM_STOP,0,0)
|
||||
(BOOL)SNDMSG(hwnd,ACM_STOP,0,0)
|
||||
#define Animate_Close(hwnd) \
|
||||
(BOOL)SNDMSGA(hwnd,ACM_OPENA,0,0)
|
||||
(BOOL)SNDMSG(hwnd,ACM_OPENA,0,0)
|
||||
#define Animate_Seek(hwnd,frame) \
|
||||
(BOOL)SNDMSGA(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
|
||||
(BOOL)SNDMSG(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
|
Loading…
Reference in a new issue