mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 23:55:07 +00:00
Sync to Wine-20050930:
Michael Jung <mjung@iss.tu-darmstadt.de> - Fixed inconsistency in LISTVIEW_DUMP macro. Robert Shearman <rob@codeweavers.com> - Add support for navigating a toolbar with the arrow keys. - Fix WrapToolbar in the case of no parent window. - Use the newly added NMTBINITCUSTOMIZE for sending the TBN_INITCUSTOMIZE so that it is safe on 64-bit platforms. Aric Stewart <aric@codeweavers.com> - Reading the MRUlist using the W functions we need to divide the size by sizeof(WCHAR) to get the count of characters. Alexandre Julliard <julliard@winehq.org> - Specify 64-bit integers as double instead of long long in spec files so that we get the correct number of arguments. - We are no longer generating .dbg.c files. Milko Krachounov <milko@3mhz.net> - Bulgarian resources for mpr, msi, user, commdlg, oleaut32, shdocvw, shell32, comctl32, msrle32, mshtml, winspool, wineps, serialui, setupapi, wininet, regedit, uninstaller, notepad, winecfg and winhelp. Dmitry Timoshkov <dmitry@codeweavers.com> - Call SetDIBits with a proper DC in order to set bitmap bits. Mike McCormack <mike@codeweavers.com> - Fix if's that are followed by semicolons. Alexander N. Sørnes <alex@thehandofagony.com> - Added Norwegian translation of comctl32 and shell32. Marcus Meissner <marcus@jet.franken.de> - The last argument to MultiByteToWideChar is wide character count and not the buffer size in bytes. Fixed all places where it was wrong. Frank Richter <frank.richter@gmail.com> - Unregister theming subclasses at comctl32 shutdown; should fix reported re-registration errors. Jason Edmeades <us@edmeades.me.uk> - Fix some off by one calculations in the comboboxex functions, and handle an out of range positive index the same as windows + unit test case. svn path=/trunk/; revision=18329
This commit is contained in:
parent
3e73bd8b79
commit
b09d85cc20
|
@ -50,6 +50,8 @@ typedef LPFINDINFOW LPLVFINDINFOW;
|
|||
#define TB_UNKWN463 (WM_USER+99)
|
||||
#define TB_UNKWN464 (WM_USER+100)
|
||||
|
||||
#define TBN_WRAPHOTITEM (TBN_FIRST-24) /* this is undocumented and the name is a guess */
|
||||
|
||||
#define RBBS_USECHEVRON 0x00000200
|
||||
#define RBHT_CHEVRON 0x0008
|
||||
#define RBN_CHEVRONPUSHED (RBN_FIRST-10)
|
||||
|
@ -82,4 +84,19 @@ static const WCHAR DRAGLISTMSGSTRINGW[] = { 'c','o','m','m','c','t','r','l', \
|
|||
'_','D','r','a','g','L','i','s','t','M','s','g',0 };
|
||||
#endif
|
||||
|
||||
/* these are undocumented and the names are guesses */
|
||||
typedef struct
|
||||
{
|
||||
NMHDR hdr;
|
||||
HWND hwndDialog;
|
||||
} NMTBINITCUSTOMIZE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
NMHDR hdr;
|
||||
INT idNew;
|
||||
INT iDirection; /* left is -1, right is 1 */
|
||||
DWORD dwReason; /* HICF_* */
|
||||
} NMTBWRAPHOTITEM;
|
||||
|
||||
#endif /* __WINE_COMMCTRL_H */
|
||||
|
|
|
@ -252,15 +252,12 @@ static void ANIMATE_TransparentBlt(ANIMATE_INFO *infoPtr, HDC hdcDest, HDC hdcSo
|
|||
|
||||
static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
|
||||
{
|
||||
void* pBitmapData = NULL;
|
||||
LPBITMAPINFO pBitmapInfo = NULL;
|
||||
|
||||
void *pBitmapData;
|
||||
LPBITMAPINFO pBitmapInfo;
|
||||
HDC hdcMem;
|
||||
HBITMAP hbmOld;
|
||||
|
||||
int nOffsetX = 0;
|
||||
int nOffsetY = 0;
|
||||
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
|
||||
|
@ -289,11 +286,11 @@ static BOOL ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
|
|||
infoPtr->hbmPrevFrame=CreateCompatibleBitmap(hDC, nWidth,nHeight );
|
||||
}
|
||||
|
||||
SetDIBits(hDC, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, (LPBITMAPINFO)pBitmapInfo, DIB_RGB_COLORS);
|
||||
|
||||
hdcMem = CreateCompatibleDC(hDC);
|
||||
hbmOld = SelectObject(hdcMem, infoPtr->hbmPrevFrame);
|
||||
|
||||
SetDIBits(hdcMem, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, pBitmapInfo, DIB_RGB_COLORS);
|
||||
|
||||
/*
|
||||
* we need to get the transparent color even without ACS_TRANSPARENT,
|
||||
* because the style can be changed later on and the color should always
|
||||
|
|
|
@ -473,7 +473,7 @@ static CBE_ITEMDATA * COMBOEX_FindItem(COMBOEX_INFO *infoPtr, INT index)
|
|||
CBE_ITEMDATA *item;
|
||||
INT i;
|
||||
|
||||
if ((index > infoPtr->nb_items) || (index < -1))
|
||||
if ((index >= infoPtr->nb_items) || (index < -1))
|
||||
return 0;
|
||||
if (index == -1)
|
||||
return infoPtr->edit;
|
||||
|
@ -509,7 +509,7 @@ static INT COMBOEX_DeleteItem (COMBOEX_INFO *infoPtr, INT index)
|
|||
TRACE("(index=%d)\n", index);
|
||||
|
||||
/* if item number requested does not exist then return failure */
|
||||
if ((index > infoPtr->nb_items) || (index < 0)) return CB_ERR;
|
||||
if ((index >= infoPtr->nb_items) || (index < 0)) return CB_ERR;
|
||||
if (!(item = COMBOEX_FindItem(infoPtr, index))) return CB_ERR;
|
||||
|
||||
/* doing this will result in WM_DELETEITEM being issued */
|
||||
|
@ -527,7 +527,7 @@ static BOOL COMBOEX_GetItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
TRACE("(...)\n");
|
||||
|
||||
/* if item number requested does not exist then return failure */
|
||||
if ((index > infoPtr->nb_items) || (index < -1)) return FALSE;
|
||||
if ((index >= infoPtr->nb_items) || (index < -1)) return FALSE;
|
||||
|
||||
/* if the item is the edit control and there is no edit control, skip */
|
||||
if ((index == -1) && !COMBOEX_HasEdit(infoPtr)) return FALSE;
|
||||
|
@ -587,7 +587,7 @@ static INT COMBOEX_InsertItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
/* get real index of item to insert */
|
||||
index = cit->iItem;
|
||||
if (index == -1) index = infoPtr->nb_items;
|
||||
if (index > infoPtr->nb_items) index = infoPtr->nb_items;
|
||||
if (index > infoPtr->nb_items) return -1;
|
||||
|
||||
/* get zero-filled space and chain it in */
|
||||
if(!(item = (CBE_ITEMDATA *)Alloc (sizeof(*item)))) return -1;
|
||||
|
@ -740,7 +740,7 @@ static BOOL COMBOEX_SetItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
if (TRACE_ON(comboex)) COMBOEX_DumpInput (cit);
|
||||
|
||||
/* if item number requested does not exist then return failure */
|
||||
if ((index > infoPtr->nb_items) || (index < -1)) return FALSE;
|
||||
if ((index >= infoPtr->nb_items) || (index < -1)) return FALSE;
|
||||
|
||||
/* if the item is the edit control and there is no edit control, skip */
|
||||
if ((index == -1) && !COMBOEX_HasEdit(infoPtr)) return FALSE;
|
||||
|
|
|
@ -250,6 +250,7 @@ static inline void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to)
|
|||
}
|
||||
|
||||
extern void THEMING_Initialize(void);
|
||||
extern void THEMING_Uninitialize(void);
|
||||
extern LRESULT THEMING_CallOriginalClass(HWND, UINT, WPARAM, LPARAM);
|
||||
extern void THEMING_SetSubclassData(HWND, ULONG_PTR);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
|
||||
#12 stub Cctl1632_ThunkData32
|
||||
13 stdcall MakeDragList(long)
|
||||
14 stdcall LBItemFromPt(long long long long)
|
||||
14 stdcall LBItemFromPt(long double long)
|
||||
15 stdcall DrawInsert(long long long)
|
||||
16 stdcall CreateUpDownControl(long long long long long long long long long long long long)
|
||||
17 stdcall InitCommonControls()
|
||||
|
|
|
@ -579,7 +579,7 @@ INT WINAPI AddMRUStringA(HANDLE hList, LPCSTR lpszString)
|
|||
if (!stringW)
|
||||
return -1;
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, lpszString, -1, stringW, len);
|
||||
MultiByteToWideChar(CP_ACP, 0, lpszString, -1, stringW, len/sizeof(WCHAR));
|
||||
ret = AddMRUData(hList, stringW, len);
|
||||
Free(stringW);
|
||||
return ret;
|
||||
|
@ -689,6 +689,8 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
|
|||
datasize = 2;
|
||||
*mp->realMRU = 0;
|
||||
}
|
||||
else
|
||||
datasize /= sizeof(WCHAR);
|
||||
|
||||
TRACE("MRU list = %s, datasize = %ld\n", debugstr_w(mp->realMRU), datasize);
|
||||
|
||||
|
|
89
reactos/lib/comctl32/comctl_Bg.rc
Normal file
89
reactos/lib/comctl32/comctl_Bg.rc
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* comctl (Bulgarian resource)
|
||||
*
|
||||
* Copyright 2005 Milko Krachounov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Ñâîéñòâà íà "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Îòìåíè", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Ïîòâúðäè", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Ïîìîù", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< Íà&çàä", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "Íà&ïðåä >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Ïðèêëþ÷è", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "Îòìåíè", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Ïîìîù", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 407, 125 /* 357 -> 407 ? */
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Ïåðñîíàëèçèðàíå íà ëåíòàòà ñ èíñòðóìåíòè"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Çàòâîðè", IDCANCEL,318,6,84,14 /* 44 -> 84; 308 -> 318 ? */
|
||||
PUSHBUTTON "&Âúçñòàíîâè", IDC_RESET_BTN,318,23,84,14 /* 44 -> 84 ? */
|
||||
PUSHBUTTON "&Ïîìîù", IDC_HELP_BTN,318,40,84,14 /* 44 -> 84 ? */
|
||||
PUSHBUTTON "Ïðåìåñòè íà&ãîðå", IDC_MOVEUP_BTN,318,74,84,14 /* 44 -> 84 ? */
|
||||
PUSHBUTTON "Ïðåìåñòè íà&äîëó", IDC_MOVEDN_BTN,318,91,84,14 /* 44 -> 84 ? */
|
||||
LTEXT "&Íàëè÷íè áóòîíè:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Äî&áàâè ->", IDOK, 131, 42, 54, 14 /* 44 -> 54 ? */
|
||||
PUSHBUTTON "<- Ïðå&ìàõíè", IDC_REMOVE_BTN,131,62,54,14 /* 44 -> 54 ? */
|
||||
LTEXT "&Áóòîíè íà ëåíòàòà ñ èíñòðóìåíòè:", -1,192,5,78,10 /* 182 -> 192 ? */
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 192,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP /* 182 -> 192 ? */
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Çàòâîðè"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Äíåñ:"
|
||||
IDM_GOTODAY "Èäè íà äíåñ"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Ðàçäåëèòåë"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Íèùî"
|
||||
}
|
87
reactos/lib/comctl32/comctl_No.rc
Normal file
87
reactos/lib/comctl32/comctl_No.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2005 Alexander N. Sørnes
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Egenskaper for "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Avbryt", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Bruk", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Hjelp", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Fane", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Veiviser"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< Til&bake", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Neste >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Fullfør", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "Avbryt", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Hjelp", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Fane", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Tilpass verktøylinje"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Lukk", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "Tilbak&estill", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Hjelp", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Flytt &opp", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Flytt ne&d", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Tilgjengelige &knapper:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Le&gg til ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- Fje&rn", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "Verk&tøylinje-knapper:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Lukk"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Idag:"
|
||||
IDM_GOTODAY "Gå til idag"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Adskiller"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Ingen"
|
||||
}
|
|
@ -150,6 +150,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
/* clean up subclassing */
|
||||
THEMING_Uninitialize();
|
||||
|
||||
/* unregister all common control classes */
|
||||
ANIMATE_Unregister ();
|
||||
COMBOEX_Unregister ();
|
||||
|
|
|
@ -390,7 +390,7 @@ typedef struct tagLISTVIEW_INFO
|
|||
#define LISTVIEW_DUMP(iP) do { \
|
||||
TRACE("hwndSelf=%p, clrBk=0x%06lx, clrText=0x%06lx, clrTextBk=0x%06lx, ItemHeight=%d, ItemWidth=%d, Style=0x%08lx\n", \
|
||||
iP->hwndSelf, iP->clrBk, iP->clrText, iP->clrTextBk, \
|
||||
iP->nItemHeight, iP->nItemWidth, infoPtr->dwStyle); \
|
||||
iP->nItemHeight, iP->nItemWidth, iP->dwStyle); \
|
||||
TRACE("hwndSelf=%p, himlNor=%p, himlSml=%p, himlState=%p, Focused=%d, Hot=%d, exStyle=0x%08lx, Focus=%d\n", \
|
||||
iP->hwndSelf, iP->himlNormal, iP->himlSmall, iP->himlState, \
|
||||
iP->nFocusedItem, iP->nHotItem, iP->dwLvExStyle, iP->bFocus ); \
|
||||
|
|
|
@ -2161,7 +2161,7 @@ static void PROPSHEET_SetTitleA(HWND hwndDlg, DWORD dwStyle, LPCSTR lpszText)
|
|||
{
|
||||
WCHAR szTitle[256];
|
||||
MultiByteToWideChar(CP_ACP, 0, lpszText, -1,
|
||||
szTitle, sizeof(szTitle));
|
||||
szTitle, sizeof(szTitle)/sizeof(WCHAR));
|
||||
PROPSHEET_SetTitleW(hwndDlg, dwStyle, szTitle);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -366,7 +366,7 @@ REBAR_DumpBandInfo( LPREBARBANDINFOA pB)
|
|||
{
|
||||
if( !TRACE_ON(rebar) ) return;
|
||||
TRACE("band info: ");
|
||||
if (pB->fMask & RBBIM_ID);
|
||||
if (pB->fMask & RBBIM_ID)
|
||||
TRACE("ID=%u, ", pB->wID);
|
||||
TRACE("size=%u, child=%p", pB->cbSize, pB->hwndChild);
|
||||
if (pB->fMask & RBBIM_COLORS)
|
||||
|
@ -415,7 +415,7 @@ REBAR_DumpBand (REBAR_INFO *iP)
|
|||
for (i = 0; i < iP->uNumBands; i++) {
|
||||
pB = &iP->bands[i];
|
||||
TRACE("band # %u:", i);
|
||||
if (pB->fMask & RBBIM_ID);
|
||||
if (pB->fMask & RBBIM_ID)
|
||||
TRACE(" ID=%u", pB->wID);
|
||||
if (pB->fMask & RBBIM_CHILD)
|
||||
TRACE(" child=%p", pB->hwndChild);
|
||||
|
|
|
@ -1192,6 +1192,7 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico
|
|||
* get localized bitmaps for example.
|
||||
*/
|
||||
|
||||
#include "comctl_Bg.rc"
|
||||
#include "comctl_Cn.rc"
|
||||
#include "comctl_Cs.rc"
|
||||
#include "comctl_De.rc"
|
||||
|
@ -1202,6 +1203,7 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico
|
|||
#include "comctl_Ja.rc"
|
||||
#include "comctl_Ko.rc"
|
||||
#include "comctl_Nl.rc"
|
||||
#include "comctl_No.rc"
|
||||
#include "comctl_Pl.rc"
|
||||
#include "comctl_Pt.rc"
|
||||
#include "comctl_Ru.rc"
|
||||
|
|
|
@ -146,6 +146,20 @@ void THEMING_Initialize (void)
|
|||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* THEMING_Uninitialize
|
||||
*
|
||||
* Unregister shadow classes for standard controls.
|
||||
*/
|
||||
void THEMING_Uninitialize (void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < NUM_SUBCLASSES; i++)
|
||||
{
|
||||
UnregisterClassW (subclasses[i].className, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* THEMING_CallOriginalClass
|
||||
*
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
* - WM_WININICHANGE
|
||||
* - Notifications:
|
||||
* - NM_CHAR
|
||||
* - NM_KEYDOWN
|
||||
* - TBN_GETOBJECT
|
||||
* - TBN_SAVE
|
||||
* - Button wrapping (under construction).
|
||||
|
@ -1278,12 +1277,21 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
|
|||
btnPtr = infoPtr->buttons;
|
||||
x = infoPtr->nIndent;
|
||||
|
||||
if (GetParent(hwnd))
|
||||
{
|
||||
/* this can get the parents width, to know how far we can extend
|
||||
* this toolbar. We cannot use its height, as there may be multiple
|
||||
* toolbars in a rebar control
|
||||
*/
|
||||
GetClientRect( GetParent(hwnd), &rc );
|
||||
infoPtr->nWidth = rc.right - rc.left;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetWindowRect( hwnd, &rc );
|
||||
infoPtr->nWidth = rc.right - rc.left;
|
||||
}
|
||||
|
||||
bButtonWrap = FALSE;
|
||||
|
||||
TRACE("start ButtonWidth=%d, BitmapWidth=%d, nWidth=%d, nIndent=%d\n",
|
||||
|
@ -2193,6 +2201,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
WCHAR Buffer[256];
|
||||
int i = 0;
|
||||
int index;
|
||||
NMTBINITCUSTOMIZE nmtbic;
|
||||
|
||||
infoPtr = custInfo->tbInfo;
|
||||
|
||||
|
@ -2202,10 +2211,9 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
if (!TOOLBAR_SendNotify(&nmtb.hdr, infoPtr, TBN_QUERYINSERT))
|
||||
return FALSE;
|
||||
|
||||
/* UNDOCUMENTED: dialog hwnd immediately follows NMHDR */
|
||||
memcpy(&nmtb.iItem, &hwnd, sizeof(hwnd));
|
||||
nmtbic.hwndDialog = hwnd;
|
||||
/* Send TBN_INITCUSTOMIZE notification */
|
||||
if (TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, TBN_INITCUSTOMIZE) ==
|
||||
if (TOOLBAR_SendNotify (&nmtbic.hdr, infoPtr, TBN_INITCUSTOMIZE) ==
|
||||
TBNRF_HIDEHELP)
|
||||
{
|
||||
TRACE("TBNRF_HIDEHELP requested\n");
|
||||
|
@ -5783,6 +5791,77 @@ TOOLBAR_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
TOOLBAR_SetRelativeHotItem(TOOLBAR_INFO *infoPtr, INT iDirection, DWORD dwReason)
|
||||
{
|
||||
INT i;
|
||||
INT nNewHotItem = infoPtr->nHotItem;
|
||||
|
||||
for (i = 0; i < infoPtr->nNumButtons; i++)
|
||||
{
|
||||
/* did we wrap? */
|
||||
if ((nNewHotItem + iDirection < 0) ||
|
||||
(nNewHotItem + iDirection >= infoPtr->nNumButtons))
|
||||
{
|
||||
NMTBWRAPHOTITEM nmtbwhi;
|
||||
nmtbwhi.idNew = infoPtr->buttons[nNewHotItem].idCommand;
|
||||
nmtbwhi.iDirection = iDirection;
|
||||
nmtbwhi.dwReason = dwReason;
|
||||
|
||||
if (TOOLBAR_SendNotify(&nmtbwhi.hdr, infoPtr, TBN_WRAPHOTITEM))
|
||||
return;
|
||||
}
|
||||
|
||||
nNewHotItem += iDirection;
|
||||
nNewHotItem = (nNewHotItem + infoPtr->nNumButtons) % infoPtr->nNumButtons;
|
||||
|
||||
if ((infoPtr->buttons[nNewHotItem].fsState & TBSTATE_ENABLED) &&
|
||||
!(infoPtr->buttons[nNewHotItem].fsStyle & BTNS_SEP))
|
||||
{
|
||||
TOOLBAR_SetHotItemEx(infoPtr, nNewHotItem, dwReason);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TOOLBAR_KeyDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||
NMKEY nmkey;
|
||||
|
||||
nmkey.nVKey = (UINT)wParam;
|
||||
nmkey.uFlags = HIWORD(lParam);
|
||||
|
||||
if (TOOLBAR_SendNotify(&nmkey.hdr, infoPtr, NM_KEYDOWN))
|
||||
return DefWindowProcW(hwnd, WM_KEYDOWN, wParam, lParam);
|
||||
|
||||
switch ((UINT)wParam)
|
||||
{
|
||||
case VK_LEFT:
|
||||
case VK_UP:
|
||||
TOOLBAR_SetRelativeHotItem(infoPtr, -1, HICF_ARROWKEYS);
|
||||
break;
|
||||
case VK_RIGHT:
|
||||
case VK_DOWN:
|
||||
TOOLBAR_SetRelativeHotItem(infoPtr, 1, HICF_ARROWKEYS);
|
||||
break;
|
||||
case VK_SPACE:
|
||||
case VK_RETURN:
|
||||
if ((infoPtr->nHotItem >= 0) &&
|
||||
(infoPtr->buttons[infoPtr->nHotItem].fsState & TBSTATE_ENABLED))
|
||||
{
|
||||
SendMessageW (infoPtr->hwndNotify, WM_COMMAND,
|
||||
MAKEWPARAM(infoPtr->buttons[infoPtr->nHotItem].idCommand, BN_CLICKED),
|
||||
(LPARAM)hwnd);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TOOLBAR_LButtonDblClk (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -6080,7 +6159,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
if (btnPtr->fsState & TBSTATE_ENABLED)
|
||||
{
|
||||
SendMessageW (infoPtr->hwndNotify, WM_COMMAND,
|
||||
MAKEWPARAM(infoPtr->buttons[nHit].idCommand, 0), (LPARAM)hwnd);
|
||||
MAKEWPARAM(infoPtr->buttons[nHit].idCommand, BN_CLICKED), (LPARAM)hwnd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6320,6 +6399,7 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
/* paranoid!! */
|
||||
infoPtr->dwStructSize = sizeof(TBBUTTON);
|
||||
infoPtr->nRows = 1;
|
||||
infoPtr->nWidth = 0;
|
||||
|
||||
/* fix instance handle, if the toolbar was created by CreateToolbarEx() */
|
||||
if (!GetWindowLongPtrW (hwnd, GWLP_HINSTANCE)) {
|
||||
|
@ -6483,23 +6563,24 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
|
|||
|
||||
TRACE("TBN_GETINFOTIPA - got string %s\n", debugstr_a(tbgit.pszText));
|
||||
|
||||
len = -1 + MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1, NULL, 0);
|
||||
if (len > sizeof(lpnmtdi->szText)/sizeof(lpnmtdi->szText[0])-1)
|
||||
len = MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1, NULL, 0);
|
||||
if (len > sizeof(lpnmtdi->szText)/sizeof(lpnmtdi->szText[0]))
|
||||
{
|
||||
/* need to allocate temporary buffer in infoPtr as there
|
||||
* isn't enough space in buffer passed to us by the
|
||||
* tooltip control */
|
||||
infoPtr->pszTooltipText = Alloc((len+1)*sizeof(WCHAR));
|
||||
infoPtr->pszTooltipText = Alloc(len*sizeof(WCHAR));
|
||||
if (infoPtr->pszTooltipText)
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, len+1, infoPtr->pszTooltipText, (len+1)*sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1, infoPtr->pszTooltipText, len);
|
||||
lpnmtdi->lpszText = infoPtr->pszTooltipText;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (len > 0)
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, len+1, lpnmtdi->lpszText, (len+1)*sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1,
|
||||
lpnmtdi->lpszText, sizeof(lpnmtdi->szText)/sizeof(lpnmtdi->szText[0]));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -6638,6 +6719,21 @@ TOOLBAR_Paint (HWND hwnd, WPARAM wParam)
|
|||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TOOLBAR_SetFocus (HWND hwnd, WPARAM wParam)
|
||||
{
|
||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||
|
||||
TRACE("nHotItem = %d\n", infoPtr->nHotItem);
|
||||
|
||||
/* make first item hot */
|
||||
if (infoPtr->nNumButtons > 0)
|
||||
TOOLBAR_SetHotItemEx(infoPtr, 0, HICF_OTHER);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TOOLBAR_SetRedraw (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
/*****************************************************
|
||||
|
@ -7091,7 +7187,9 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_GETFONT:
|
||||
return TOOLBAR_GetFont (hwnd, wParam, lParam);
|
||||
|
||||
/* case WM_KEYDOWN: */
|
||||
case WM_KEYDOWN:
|
||||
return TOOLBAR_KeyDown (hwnd, wParam, lParam);
|
||||
|
||||
/* case WM_KILLFOCUS: */
|
||||
|
||||
case WM_LBUTTONDBLCLK:
|
||||
|
@ -7139,6 +7237,9 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_PAINT:
|
||||
return TOOLBAR_Paint (hwnd, wParam);
|
||||
|
||||
case WM_SETFOCUS:
|
||||
return TOOLBAR_SetFocus (hwnd, wParam);
|
||||
|
||||
case WM_SETREDRAW:
|
||||
return TOOLBAR_SetRedraw (hwnd, wParam, lParam);
|
||||
|
||||
|
|
|
@ -775,8 +775,8 @@ TREEVIEW_UpdateDispInfo(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
|
|||
wineItem->pszText = newText;
|
||||
MultiByteToWideChar( CP_ACP, 0,
|
||||
(LPSTR)callback.item.pszText, -1,
|
||||
wineItem->pszText, buflen);
|
||||
wineItem->cchTextMax = buflen;
|
||||
wineItem->pszText, buflen/sizeof(WCHAR));
|
||||
wineItem->cchTextMax = buflen/sizeof(WCHAR);
|
||||
}
|
||||
/* If ReAlloc fails we have nothing to do, but keep original text */
|
||||
}
|
||||
|
@ -818,8 +818,8 @@ TREEVIEW_UpdateDispInfo(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
|
|||
wineItem->pszText = newText;
|
||||
MultiByteToWideChar( CP_ACP, 0,
|
||||
(LPSTR)callback.item.pszText, -1,
|
||||
wineItem->pszText, buflen);
|
||||
wineItem->cchTextMax = buflen;
|
||||
wineItem->pszText, buflen/sizeof(WCHAR));
|
||||
wineItem->cchTextMax = buflen/sizeof(WCHAR);
|
||||
if (oldText)
|
||||
Free(oldText);
|
||||
}
|
||||
|
|
|
@ -1982,6 +1982,12 @@ typedef struct {
|
|||
char szText[CBEMAXSTRLEN];
|
||||
int iWhy;
|
||||
} NMCBEENDEDITA, *LPNMCBEENDEDITA,*PNMCBEENDEDITA;
|
||||
typedef struct tagNMKEY
|
||||
{
|
||||
NMHDR hdr;
|
||||
UINT nVKey;
|
||||
UINT uFlags;
|
||||
} NMKEY, *LPNMKEY;
|
||||
typedef struct _COLORMAP {
|
||||
COLORREF from;
|
||||
COLORREF to;
|
||||
|
|
Loading…
Reference in a new issue