Sync trunk head (r47697).
svn path=/branches/header-work/; revision=47698
|
@ -717,7 +717,7 @@ static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lps
|
|||
|
||||
TRACE("(%s)\n", debugstr_w(lpszName));
|
||||
|
||||
if (HIWORD(lpszName))
|
||||
if (!IS_INTRESOURCE(lpszName))
|
||||
{
|
||||
if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName))
|
||||
{
|
||||
|
@ -775,7 +775,7 @@ static BOOL ANIMATE_OpenA(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPSTR lpsz
|
|||
LRESULT result;
|
||||
INT len;
|
||||
|
||||
if (!HIWORD(lpszName))
|
||||
if (IS_INTRESOURCE(lpszName))
|
||||
return ANIMATE_OpenW(infoPtr, hInstance, (LPWSTR)lpszName);
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, lpszName, -1, NULL, 0);
|
||||
|
|
|
@ -67,8 +67,6 @@ typedef struct
|
|||
HWND hwndNotify; /* my parent hwnd */
|
||||
HWND hwndCombo;
|
||||
HWND hwndEdit;
|
||||
WNDPROC prevEditWndProc; /* previous Edit WNDPROC value */
|
||||
WNDPROC prevComboWndProc; /* previous Combo WNDPROC value */
|
||||
DWORD dwExtStyle;
|
||||
INT selected; /* index of selected item */
|
||||
DWORD flags; /* WINE internal flags */
|
||||
|
@ -121,17 +119,15 @@ typedef struct
|
|||
/* Offset between image and text */
|
||||
#define CBE_SEP 4
|
||||
|
||||
static const WCHAR COMBOEX_SUBCLASS_PROP[] = {
|
||||
'C','C','C','o','m','b','o','E','x','3','2',
|
||||
'S','u','b','c','l','a','s','s','I','n','f','o',0
|
||||
};
|
||||
#define COMBO_SUBCLASSID 1
|
||||
#define EDIT_SUBCLASSID 2
|
||||
|
||||
#define COMBOEX_GetInfoPtr(hwnd) ((COMBOEX_INFO *)GetWindowLongPtrW (hwnd, 0))
|
||||
|
||||
|
||||
/* Things common to the entire DLL */
|
||||
static LRESULT WINAPI COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT WINAPI COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT CALLBACK COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
UINT_PTR uId, DWORD_PTR ref_data);
|
||||
static LRESULT CALLBACK COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
UINT_PTR uId, DWORD_PTR ref_data);
|
||||
static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr);
|
||||
typedef INT (WINAPI *cmp_func_t)(LPCWSTR, LPCWSTR);
|
||||
|
||||
|
@ -177,7 +173,7 @@ static void COMBOEX_DumpInput (COMBOBOXEXITEMW const *input)
|
|||
static inline CBE_ITEMDATA *get_item_data(const COMBOEX_INFO *infoPtr, INT index)
|
||||
{
|
||||
return (CBE_ITEMDATA *)SendMessageW (infoPtr->hwndCombo, CB_GETITEMDATA,
|
||||
(WPARAM)index, 0);
|
||||
index, 0);
|
||||
}
|
||||
|
||||
static inline cmp_func_t get_cmp_func(COMBOEX_INFO const *infoPtr)
|
||||
|
@ -455,10 +451,7 @@ static void COMBOEX_ReSize (const COMBOEX_INFO *infoPtr)
|
|||
static void COMBOEX_SetEditText (const COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item)
|
||||
{
|
||||
if (!infoPtr->hwndEdit) return;
|
||||
/* native issues the following messages to the {Edit} control */
|
||||
/* WM_SETTEXT (0,addr) */
|
||||
/* EM_SETSEL32 (0,0) */
|
||||
/* EM_SETSEL32 (0,-1) */
|
||||
|
||||
if (item->mask & CBEIF_TEXT) {
|
||||
SendMessageW (infoPtr->hwndEdit, WM_SETTEXT, 0, (LPARAM)COMBOEX_GetText(infoPtr, item));
|
||||
SendMessageW (infoPtr->hwndEdit, EM_SETSEL, 0, 0);
|
||||
|
@ -491,13 +484,6 @@ static CBE_ITEMDATA * COMBOEX_FindItem(const COMBOEX_INFO *infoPtr, INT_PTR inde
|
|||
return item;
|
||||
}
|
||||
|
||||
|
||||
static inline BOOL COMBOEX_HasEdit(COMBOEX_INFO const *infoPtr)
|
||||
{
|
||||
return infoPtr->hwndEdit ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* *** CBEM_xxx message support *** */
|
||||
|
||||
static UINT COMBOEX_GetListboxText(const COMBOEX_INFO *infoPtr, INT_PTR n, LPWSTR buf)
|
||||
|
@ -510,6 +496,17 @@ static UINT COMBOEX_GetListboxText(const COMBOEX_INFO *infoPtr, INT_PTR n, LPWST
|
|||
return 0;
|
||||
|
||||
str = COMBOEX_GetText(infoPtr, item);
|
||||
if (!str)
|
||||
{
|
||||
if (buf)
|
||||
{
|
||||
if (infoPtr->unicode)
|
||||
buf[0] = 0;
|
||||
else
|
||||
*((LPSTR)buf) = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (infoPtr->unicode)
|
||||
{
|
||||
|
@ -536,7 +533,7 @@ static INT COMBOEX_DeleteItem (const COMBOEX_INFO *infoPtr, INT_PTR index)
|
|||
if (!COMBOEX_FindItem(infoPtr, index)) return CB_ERR;
|
||||
|
||||
/* doing this will result in WM_DELETEITEM being issued */
|
||||
SendMessageW (infoPtr->hwndCombo, CB_DELETESTRING, (WPARAM)index, 0);
|
||||
SendMessageW (infoPtr->hwndCombo, CB_DELETESTRING, index, 0);
|
||||
|
||||
return infoPtr->nb_items;
|
||||
}
|
||||
|
@ -547,13 +544,13 @@ static BOOL COMBOEX_GetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
INT_PTR index = cit->iItem;
|
||||
CBE_ITEMDATA *item;
|
||||
|
||||
TRACE("(...)\n");
|
||||
TRACE("\n");
|
||||
|
||||
/* if item number requested does not exist then return failure */
|
||||
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;
|
||||
if ((index == -1) && !infoPtr->hwndEdit) return FALSE;
|
||||
|
||||
if (!(item = COMBOEX_FindItem(infoPtr, index))) return FALSE;
|
||||
|
||||
|
@ -567,7 +564,7 @@ static BOOL COMBOEX_GetItemA (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA *cit)
|
|||
{
|
||||
COMBOBOXEXITEMW tmpcit;
|
||||
|
||||
TRACE("(...)\n");
|
||||
TRACE("\n");
|
||||
|
||||
tmpcit.mask = cit->mask;
|
||||
tmpcit.iItem = cit->iItem;
|
||||
|
@ -600,8 +597,7 @@ static BOOL COMBOEX_GetItemA (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMA *cit)
|
|||
|
||||
static inline BOOL COMBOEX_HasEditChanged (COMBOEX_INFO const *infoPtr)
|
||||
{
|
||||
return COMBOEX_HasEdit(infoPtr) &&
|
||||
(infoPtr->flags & WCBE_EDITHASCHANGED) == WCBE_EDITHASCHANGED;
|
||||
return infoPtr->hwndEdit && (infoPtr->flags & WCBE_EDITHASCHANGED) == WCBE_EDITHASCHANGED;
|
||||
}
|
||||
|
||||
|
||||
|
@ -678,8 +674,7 @@ static INT COMBOEX_InsertItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW const *ci
|
|||
|
||||
if (TRACE_ON(comboex)) COMBOEX_DumpItem (item);
|
||||
|
||||
SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING,
|
||||
(WPARAM)cit->iItem, (LPARAM)item);
|
||||
SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING, cit->iItem, (LPARAM)item);
|
||||
|
||||
memset (&nmcit.ceItem, 0, sizeof(nmcit.ceItem));
|
||||
COMBOEX_CopyItem (item, &nmcit.ceItem);
|
||||
|
@ -751,7 +746,7 @@ static HIMAGELIST COMBOEX_SetImageList (COMBOEX_INFO *infoPtr, HIMAGELIST himl)
|
|||
{
|
||||
HIMAGELIST himlTemp = infoPtr->himl;
|
||||
|
||||
TRACE("(...)\n");
|
||||
TRACE("\n");
|
||||
|
||||
infoPtr->himl = himl;
|
||||
|
||||
|
@ -774,7 +769,7 @@ static BOOL COMBOEX_SetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
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;
|
||||
if ((index == -1) && !infoPtr->hwndEdit) return FALSE;
|
||||
|
||||
if (!(item = COMBOEX_FindItem(infoPtr, index))) return FALSE;
|
||||
|
||||
|
@ -802,7 +797,7 @@ static BOOL COMBOEX_SetItemW (const COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW *cit)
|
|||
if (cit->mask & CBEIF_INDENT)
|
||||
item->iIndent = cit->iIndent;
|
||||
if (cit->mask & CBEIF_LPARAM)
|
||||
cit->lParam = cit->lParam;
|
||||
item->lParam = cit->lParam;
|
||||
|
||||
if (TRACE_ON(comboex)) COMBOEX_DumpItem (item);
|
||||
|
||||
|
@ -968,12 +963,10 @@ static INT COMBOEX_SetItemHeight (COMBOEX_INFO const *infoPtr, INT index, UINT h
|
|||
|
||||
static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
||||
{
|
||||
static const WCHAR COMBOBOX[] = { 'C', 'o', 'm', 'b', 'o', 'B', 'o', 'x', 0 };
|
||||
static const WCHAR EDIT[] = { 'E', 'D', 'I', 'T', 0 };
|
||||
static const WCHAR NIL[] = { 0 };
|
||||
COMBOEX_INFO *infoPtr;
|
||||
LOGFONTW mylogfont;
|
||||
RECT wnrc1, clrc1, cmbwrc;
|
||||
RECT win_rect;
|
||||
INT i;
|
||||
|
||||
/* allocate memory for info structure */
|
||||
|
@ -998,11 +991,13 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
|
||||
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
|
||||
|
||||
/* create combo box */
|
||||
GetWindowRect(hwnd, &wnrc1);
|
||||
GetClientRect(hwnd, &clrc1);
|
||||
TRACE("EX window=(%s), client=(%s)\n",
|
||||
wine_dbgstr_rect(&wnrc1), wine_dbgstr_rect(&clrc1));
|
||||
if (TRACE_ON(comboex)) {
|
||||
RECT client, rect;
|
||||
GetWindowRect(hwnd, &rect);
|
||||
GetClientRect(hwnd, &client);
|
||||
TRACE("EX window=(%s), client=(%s)\n",
|
||||
wine_dbgstr_rect(&rect), wine_dbgstr_rect(&client));
|
||||
}
|
||||
|
||||
/* Native version of ComboEx creates the ComboBox with DROPDOWNLIST */
|
||||
/* specified. It then creates it's own version of the EDIT control */
|
||||
|
@ -1011,7 +1006,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
/* We also need to place the edit control at the proper location */
|
||||
/* (allow space for the icons). */
|
||||
|
||||
infoPtr->hwndCombo = CreateWindowW (COMBOBOX, NIL,
|
||||
infoPtr->hwndCombo = CreateWindowW (WC_COMBOBOXW, NIL,
|
||||
/* following line added to match native */
|
||||
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VSCROLL |
|
||||
CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST |
|
||||
|
@ -1030,22 +1025,16 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
* GetCurrentProcessId()
|
||||
*/
|
||||
|
||||
/*
|
||||
* Setup a property to hold the pointer to the COMBOBOXEX
|
||||
* data structure.
|
||||
*/
|
||||
SetPropW(infoPtr->hwndCombo, COMBOEX_SUBCLASS_PROP, hwnd);
|
||||
infoPtr->prevComboWndProc = (WNDPROC)SetWindowLongPtrW(infoPtr->hwndCombo,
|
||||
GWLP_WNDPROC, (DWORD_PTR)COMBOEX_ComboWndProc);
|
||||
SetWindowSubclass(infoPtr->hwndCombo, COMBOEX_ComboWndProc, COMBO_SUBCLASSID,
|
||||
(DWORD_PTR)hwnd);
|
||||
infoPtr->font = (HFONT)SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0);
|
||||
|
||||
|
||||
/*
|
||||
* Now create our own EDIT control so we can position it.
|
||||
* It is created only for CBS_DROPDOWN style
|
||||
*/
|
||||
if ((cs->style & CBS_DROPDOWNLIST) == CBS_DROPDOWN) {
|
||||
infoPtr->hwndEdit = CreateWindowExW (0, EDIT, NIL,
|
||||
infoPtr->hwndEdit = CreateWindowExW (0, WC_EDITW, NIL,
|
||||
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | ES_AUTOHSCROLL,
|
||||
0, 0, 0, 0, /* will set later */
|
||||
infoPtr->hwndCombo,
|
||||
|
@ -1058,14 +1047,9 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
* GetWindowThreadProcessId(hwndEdit, &???)
|
||||
* GetCurrentProcessId()
|
||||
*/
|
||||
SetWindowSubclass(infoPtr->hwndEdit, COMBOEX_EditWndProc, EDIT_SUBCLASSID,
|
||||
(DWORD_PTR)hwnd);
|
||||
|
||||
/*
|
||||
* Setup a property to hold the pointer to the COMBOBOXEX
|
||||
* data structure.
|
||||
*/
|
||||
SetPropW(infoPtr->hwndEdit, COMBOEX_SUBCLASS_PROP, hwnd);
|
||||
infoPtr->prevEditWndProc = (WNDPROC)SetWindowLongPtrW(infoPtr->hwndEdit,
|
||||
GWLP_WNDPROC, (DWORD_PTR)COMBOEX_EditWndProc);
|
||||
infoPtr->font = (HFONT)SendMessageW(infoPtr->hwndCombo, WM_GETFONT, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -1081,27 +1065,31 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
SendMessageW (infoPtr->hwndCombo, WM_SETFONT, (WPARAM)infoPtr->font, 0);
|
||||
if (infoPtr->hwndEdit) {
|
||||
SendMessageW (infoPtr->hwndEdit, WM_SETFONT, (WPARAM)infoPtr->font, 0);
|
||||
SendMessageW (infoPtr->hwndEdit, EM_SETMARGINS, (WPARAM)EC_USEFONTINFO, 0);
|
||||
SendMessageW (infoPtr->hwndEdit, EM_SETMARGINS, EC_USEFONTINFO, 0);
|
||||
}
|
||||
|
||||
COMBOEX_ReSize (infoPtr);
|
||||
|
||||
/* Above is fairly certain, below is much less certain. */
|
||||
|
||||
GetWindowRect(hwnd, &wnrc1);
|
||||
GetClientRect(hwnd, &clrc1);
|
||||
GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
|
||||
TRACE("EX window=(%s) client=(%s) CB wnd=(%s)\n",
|
||||
wine_dbgstr_rect(&wnrc1), wine_dbgstr_rect(&clrc1),
|
||||
wine_dbgstr_rect(&cmbwrc));
|
||||
SetWindowPos(infoPtr->hwndCombo, HWND_TOP,
|
||||
0, 0, wnrc1.right-wnrc1.left, wnrc1.bottom-wnrc1.top,
|
||||
GetWindowRect(hwnd, &win_rect);
|
||||
|
||||
if (TRACE_ON(comboex)) {
|
||||
RECT client, rect;
|
||||
GetClientRect(hwnd, &client);
|
||||
GetWindowRect(infoPtr->hwndCombo, &rect);
|
||||
TRACE("EX window=(%s) client=(%s) CB wnd=(%s)\n",
|
||||
wine_dbgstr_rect(&win_rect), wine_dbgstr_rect(&client),
|
||||
wine_dbgstr_rect(&rect));
|
||||
}
|
||||
SetWindowPos(infoPtr->hwndCombo, HWND_TOP, 0, 0,
|
||||
win_rect.right - win_rect.left, win_rect.bottom - win_rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOREDRAW);
|
||||
|
||||
GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
|
||||
TRACE("CB window=(%s)\n", wine_dbgstr_rect(&cmbwrc));
|
||||
SetWindowPos(hwnd, HWND_TOP,
|
||||
0, 0, cmbwrc.right-cmbwrc.left, cmbwrc.bottom-cmbwrc.top,
|
||||
GetWindowRect(infoPtr->hwndCombo, &win_rect);
|
||||
TRACE("CB window=(%s)\n", wine_dbgstr_rect(&win_rect));
|
||||
SetWindowPos(hwnd, HWND_TOP, 0, 0,
|
||||
win_rect.right - win_rect.left, win_rect.bottom - win_rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
|
||||
|
||||
COMBOEX_AdjustEditPos (infoPtr);
|
||||
|
@ -1158,7 +1146,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
|
|||
*/
|
||||
ShowWindow (infoPtr->hwndEdit, SW_SHOW);
|
||||
InvalidateRect (infoPtr->hwndCombo, 0, TRUE);
|
||||
InvalidateRect (infoPtr->hwndEdit, 0, TRUE);
|
||||
if (infoPtr->hwndEdit) InvalidateRect (infoPtr->hwndEdit, 0, TRUE);
|
||||
cursel = SendMessageW (infoPtr->hwndCombo, CB_GETCURSEL, 0, 0);
|
||||
if (cursel == -1) {
|
||||
cmp_func_t cmptext = get_cmp_func(infoPtr);
|
||||
|
@ -1173,8 +1161,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
|
|||
if ((cursel == n) || ((INT_PTR)item == CB_ERR)) {
|
||||
TRACE("failed to find match??? item=%p cursel=%d\n",
|
||||
item, cursel);
|
||||
if (infoPtr->hwndEdit)
|
||||
SetFocus(infoPtr->hwndEdit);
|
||||
if (infoPtr->hwndEdit) SetFocus(infoPtr->hwndEdit);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -1183,8 +1170,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
|
|||
if ((INT_PTR)item == CB_ERR) {
|
||||
TRACE("failed to find match??? item=%p cursel=%d\n",
|
||||
item, cursel);
|
||||
if (infoPtr->hwndEdit)
|
||||
SetFocus(infoPtr->hwndEdit);
|
||||
if (infoPtr->hwndEdit) SetFocus(infoPtr->hwndEdit);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -1280,8 +1266,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
|
|||
* after passing the command to the parent of the ComboEx.
|
||||
*/
|
||||
lret = SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
|
||||
if (infoPtr->hwndEdit)
|
||||
SetFocus(infoPtr->hwndEdit);
|
||||
if (infoPtr->hwndEdit) SetFocus(infoPtr->hwndEdit);
|
||||
return lret;
|
||||
}
|
||||
return 0;
|
||||
|
@ -1377,14 +1362,12 @@ static LRESULT COMBOEX_DrawItem (const COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT con
|
|||
(dis->itemAction == ODA_DRAWENTIRE)) {
|
||||
/* draw of edit control data */
|
||||
|
||||
/* testing */
|
||||
{
|
||||
if (TRACE_ON(comboex)) {
|
||||
RECT exrc, cbrc, edrc;
|
||||
GetWindowRect (infoPtr->hwndSelf, &exrc);
|
||||
GetWindowRect (infoPtr->hwndCombo, &cbrc);
|
||||
edrc.left=edrc.top=edrc.right=edrc.bottom=-1;
|
||||
if (infoPtr->hwndEdit)
|
||||
GetWindowRect (infoPtr->hwndEdit, &edrc);
|
||||
edrc.left = edrc.top = edrc.right = edrc.bottom = -1;
|
||||
if (infoPtr->hwndEdit) GetWindowRect (infoPtr->hwndEdit, &edrc);
|
||||
TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n",
|
||||
wine_dbgstr_rect(&exrc), wine_dbgstr_rect(&cbrc),
|
||||
wine_dbgstr_rect(&edrc));
|
||||
|
@ -1595,8 +1578,12 @@ static void COMBOEX_ResetContent (COMBOEX_INFO *infoPtr)
|
|||
static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr)
|
||||
{
|
||||
if (infoPtr->hwndCombo)
|
||||
DestroyWindow (infoPtr->hwndCombo);
|
||||
RemoveWindowSubclass(infoPtr->hwndCombo, COMBOEX_ComboWndProc, COMBO_SUBCLASSID);
|
||||
|
||||
if (infoPtr->hwndEdit)
|
||||
RemoveWindowSubclass(infoPtr->hwndEdit, COMBOEX_EditWndProc, EDIT_SUBCLASSID);
|
||||
|
||||
COMBOEX_FreeText (infoPtr->edit);
|
||||
Free (infoPtr->edit);
|
||||
infoPtr->edit = 0;
|
||||
|
||||
|
@ -1720,11 +1707,11 @@ static LRESULT COMBOEX_WindowPosChanging (const COMBOEX_INFO *infoPtr, WINDOWPOS
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT WINAPI
|
||||
COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT CALLBACK
|
||||
COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
UINT_PTR uId, DWORD_PTR ref_data)
|
||||
{
|
||||
HWND hwndComboex = GetPropW(hwnd, COMBOEX_SUBCLASS_PROP);
|
||||
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwndComboex);
|
||||
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr ((HWND)ref_data);
|
||||
NMCBEENDEDITW cbeend;
|
||||
WCHAR edit_text[260];
|
||||
COLORREF obkc;
|
||||
|
@ -1744,8 +1731,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
/* handle (ignore) the return character */
|
||||
if (wParam == VK_RETURN) return 0;
|
||||
/* all other characters pass into the real Edit */
|
||||
return CallWindowProcW (infoPtr->prevEditWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
/*
|
||||
|
@ -1757,8 +1743,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
TRACE("erasing (%s)\n", wine_dbgstr_rect(&rect));
|
||||
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
||||
SetBkColor (hDC, obkc);
|
||||
return CallWindowProcW (infoPtr->prevEditWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_KEYDOWN: {
|
||||
INT_PTR oldItem, selected, step = 1;
|
||||
|
@ -1864,8 +1849,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
oldItem = SendMessageW (infoPtr->hwndCombo,CB_GETCURSEL, 0, 0);
|
||||
if (oldItem != -1) {
|
||||
/* if something is selected, then deselect it */
|
||||
SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL,
|
||||
(WPARAM)-1, 0);
|
||||
SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL, -1, 0);
|
||||
}
|
||||
InvalidateRect (infoPtr->hwndCombo, 0, 0);
|
||||
SetFocus(infoPtr->hwndEdit);
|
||||
|
@ -1880,16 +1864,14 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
SendMessageW (infoPtr->hwndSelf, CB_SETCURSEL, oldItem + step, 0);
|
||||
return 0;
|
||||
default:
|
||||
return CallWindowProcW (infoPtr->prevEditWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
case WM_SETFOCUS:
|
||||
/* remember the focus to set state of icon */
|
||||
lret = CallWindowProcW (infoPtr->prevEditWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
lret = DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
infoPtr->flags |= WCBE_EDITFOCUSED;
|
||||
return lret;
|
||||
|
||||
|
@ -1912,17 +1894,16 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
/* fall through */
|
||||
|
||||
default:
|
||||
return CallWindowProcW (infoPtr->prevEditWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static LRESULT WINAPI
|
||||
COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT CALLBACK
|
||||
COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
UINT_PTR uId, DWORD_PTR ref_data)
|
||||
{
|
||||
HWND hwndComboex = GetPropW(hwnd, COMBOEX_SUBCLASS_PROP);
|
||||
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwndComboex);
|
||||
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr ((HWND)ref_data);
|
||||
NMCBEENDEDITW cbeend;
|
||||
NMMOUSE nmmse;
|
||||
COLORREF obkc;
|
||||
|
@ -1947,8 +1928,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
* that ComboEx knows this is listbox.
|
||||
*/
|
||||
((DRAWITEMSTRUCT *)lParam)->itemState |= ODS_COMBOEXLBOX;
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
/*
|
||||
|
@ -1960,8 +1940,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
TRACE("erasing (%s)\n", wine_dbgstr_rect(&rect));
|
||||
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
||||
SetBkColor (hDC, obkc);
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_SETCURSOR:
|
||||
/*
|
||||
|
@ -1975,8 +1954,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
nmmse.pt.y = 0;
|
||||
nmmse.dwHitInfo = lParam;
|
||||
COMBOEX_Notify (infoPtr, NM_SETCURSOR, (NMHDR *)&nmmse);
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
GetClientRect (hwnd, &rect);
|
||||
|
@ -1986,16 +1964,16 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
if (PtInRect(&rect, pt))
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
infoPtr->flags |= WCBE_MOUSECAPTURED;
|
||||
SetCapture(hwnd);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if (!(infoPtr->flags & WCBE_MOUSECAPTURED))
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
ReleaseCapture();
|
||||
infoPtr->flags &= ~WCBE_MOUSECAPTURED;
|
||||
if (infoPtr->flags & WCBE_MOUSEDRAGGED) {
|
||||
|
@ -2012,8 +1990,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
COMBOEX_NotifyDragBegin(infoPtr, edit_text);
|
||||
infoPtr->flags |= WCBE_MOUSEDRAGGED;
|
||||
}
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (HIWORD(wParam)) {
|
||||
|
@ -2157,8 +2134,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
}/* fall through */
|
||||
default:
|
||||
return CallWindowProcW (infoPtr->prevComboWndProc,
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -231,18 +231,7 @@ extern void UPDOWN_Unregister(void);
|
|||
|
||||
|
||||
int MONTHCAL_MonthLength(int month, int year);
|
||||
|
||||
static inline void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to)
|
||||
{
|
||||
to->wYear = from->wYear;
|
||||
to->wMonth = from->wMonth;
|
||||
to->wDayOfWeek = from->wDayOfWeek;
|
||||
to->wDay = from->wDay;
|
||||
to->wHour = from->wHour;
|
||||
to->wMinute = from->wMinute;
|
||||
to->wSecond = from->wSecond;
|
||||
to->wMilliseconds = from->wMilliseconds;
|
||||
}
|
||||
int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace);
|
||||
|
||||
extern void THEMING_Initialize(void);
|
||||
extern void THEMING_Uninitialize(void);
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
<file>treeview.c</file>
|
||||
<file>updown.c</file>
|
||||
<file>rsrc.rc</file>
|
||||
<library>uuid</library>
|
||||
<library>wine</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
|
|
|
@ -885,9 +885,11 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
|||
} else {
|
||||
lenA = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
|
||||
NULL, 0, NULL, NULL);
|
||||
datasize = min( witem->size, nBufferSize );
|
||||
datasize = min( lenA, nBufferSize );
|
||||
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
|
||||
lpBuffer, datasize, NULL, NULL);
|
||||
((char *)lpBuffer)[ datasize - 1 ] = '\0';
|
||||
datasize = lenA - 1;
|
||||
}
|
||||
TRACE("(%p, %d, %p, %d): returning len=%d\n",
|
||||
hList, nItemPos, lpBuffer, nBufferSize, datasize);
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
/* Czech strings in CP1250 */
|
||||
|
|
|
@ -16,11 +16,15 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Schließen"
|
||||
IDS_CLOSE "Schließen"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@ -41,7 +45,7 @@ STRINGTABLE DISCARDABLE
|
|||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Eigenschaften für %s"
|
||||
CAPTION "Eigenschaften für %s"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
|
@ -57,9 +61,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
|||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Zurück", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "< &Zurück", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Weiter >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Beenden", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Fertig", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "Abbrechen", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "&Hilfe", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
|
@ -73,15 +77,15 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
|||
CAPTION "Toolbar einrichten"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Schließen", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Zurücksetzen", IDC_RESET_BTN,308,23,44,14
|
||||
DEFPUSHBUTTON "&Schließen", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Zurücksetzen", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Hilfe", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Nach &Oben verschieben", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Nach &Unten verschieben", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Vorhandene Knöpfe:", -1,4,5,84,10
|
||||
LTEXT "&Vorhandene Knöpfe:", -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 "H&inzufügen ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Löschen", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbarknöpfe:", -1,182,5,78,10
|
||||
PUSHBUTTON "H&inzufügen ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Löschen", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbarknöpfe:", -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
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* French language support
|
||||
*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2003 Vincent Béron
|
||||
* Copyright 2003 Vincent Béron
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -20,11 +20,16 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Propriétés pour %s"
|
||||
CAPTION "Propriétés pour %s"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
|
@ -40,9 +45,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
|||
CAPTION "Assistant"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Précédent", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Suivant >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Terminer", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Précédent", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Suivant >", IDC_NEXT_BUTTON,123,138,50,14
|
||||
DEFPUSHBUTTON "Terminer", IDC_FINISH_BUTTON,123,138,50,14
|
||||
PUSHBUTTON "Annuler", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Aide", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
|
@ -57,15 +62,15 @@ CAPTION "Personnaliser la barre d'outils"
|
|||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Fermer", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Réinitialiser", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Réinitialiser", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "Aid&e", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "&Monter", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "&Descendre", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Boutons disponibles :", -1,4,5,84,10
|
||||
LTEXT "Boutons &disponibles :", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "A&jouter ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- E&nlever", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Boutons de la barre d'outils :", -1,182,5,78,10
|
||||
LTEXT "&Boutons de la barre d'outils :", -1,182,5,93,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
|
||||
|
||||
|
@ -77,12 +82,12 @@ STRINGTABLE DISCARDABLE
|
|||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Aujourd'hui:"
|
||||
IDM_GOTODAY "Aller à aujourd'hui"
|
||||
IDM_GOTODAY "Aller à aujourd'hui"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Séparateur"
|
||||
IDS_SEPARATOR "Séparateur"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
|
@ -23,7 +25,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
|||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Properties for %s"
|
||||
CAPTION "%sのプロパティ"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
|
@ -36,11 +38,11 @@ END
|
|||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
CAPTION "ウィザード"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< 戻る(&B)", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "進む(&N) >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "次へ(&N) >", 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
|
||||
|
@ -52,7 +54,7 @@ END
|
|||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Customize Toolbar"
|
||||
CAPTION "ツールバーのカスタマイズ"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "閉じる(&C)", IDCANCEL,308,6,44,14
|
||||
|
@ -60,33 +62,31 @@ BEGIN
|
|||
PUSHBUTTON "ヘルプ(&H)", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "上へ (&U)", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "下へ (&D)", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "A&vailable buttons:", -1,4,5,84,10
|
||||
LTEXT "利用可能なボタン(&V):", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "追加(&A) ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- 削除(&R)", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbar buttons:", -1,182,5,78,10
|
||||
LTEXT "ツールバーのボタン(&T):", -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 "Close"
|
||||
IDS_CLOSE "閉じる"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Today:"
|
||||
IDM_GOTODAY "Go to today"
|
||||
IDM_TODAY "今日:"
|
||||
IDM_GOTODAY "今日へ移動"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separator"
|
||||
IDS_SEPARATOR "区切り"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "None"
|
||||
HKY_NONE "なし"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
|
@ -88,5 +90,3 @@ STRINGTABLE DISCARDABLE
|
|||
{
|
||||
HKY_NONE "Joks"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
@ -75,7 +77,7 @@ STRINGTABLE DISCARDABLE
|
|||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Vandaag:"
|
||||
IDM_GOTODAY "Ga vandaag naar"
|
||||
IDM_GOTODAY "Ga naar vandaag"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright 2003 Marcelo Duarte
|
||||
* Copyright 2006-2007 Américo José Melo
|
||||
* Copyright 2006-2007 Américo José Melo
|
||||
* Copyright 2009 Ricardo Filipe
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -17,21 +18,11 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
#include "comctl32.h"
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Propriedades para %s"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Cancelar", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Aplicar", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Ajuda", 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
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
|
@ -45,27 +36,21 @@ BEGIN
|
|||
CONTROL "Separador", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Assistente"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Voltar", IDC_BACK_BUTTON,71,138,50,14
|
||||
DEFPUSHBUTTON "&Avançar >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Avançar >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Finalizar", IDC_FINISH_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "Cancelar", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Ajuda", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
CONTROL "Separador", 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
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Personalizar barra de ferramentas"
|
||||
|
@ -76,42 +61,30 @@ BEGIN
|
|||
PUSHBUTTON "&Ajuda", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "A&cima", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "A&baixo", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Botões &disponíveis:", -1,4,5,84,10
|
||||
LTEXT "Botões &disponíveis:", -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 "&Adicionar ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Remover", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Botões da barra de ferramentas:", -1,182,5,78,10
|
||||
LTEXT "&Botões da barra de ferramentas:", -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
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Fechar"
|
||||
}
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Hoje:"
|
||||
IDM_GOTODAY "Ir para hoje"
|
||||
}
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separador"
|
||||
}
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Nenhum"
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
#pragma code_page(65001)
|
||||
|
@ -88,5 +90,3 @@ STRINGTABLE DISCARDABLE
|
|||
{
|
||||
HKY_NONE "Nimic"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
|
|
@ -18,31 +18,36 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Ñâîéñòâà äëÿ %s"
|
||||
CAPTION "Свойства для %s"
|
||||
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
|
||||
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 "Ìàñòåð"
|
||||
CAPTION "Мастер"
|
||||
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
|
||||
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
|
||||
|
@ -51,39 +56,39 @@ END
|
|||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Íàñòðîéêà ïàíåëè èíñòðóìåíòîâ"
|
||||
CAPTION "Настройка панели инструментов"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Çàêðûòü", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "Ñ&áðîñèòü", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Ñïðàâêà", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Ïåðåìåñòèòü &ââåðõ", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Ïåðåìåñòèòü &âíèç", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Äîñòóïíûå êíîïêè:", -1,4,5,84,10
|
||||
DEFPUSHBUTTON "&Закрыть", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "С&бросить", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Справка", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Переместить &вверх", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Переместить &вниз", IDC_MOVEDN_BTN,308,91,44,14
|
||||
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, 44, 14
|
||||
PUSHBUTTON "<- &Óäàëèòü", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Êíîïêè ïàíåëè èíñòðóìåíòîâ:", -1,182,5,78,10
|
||||
PUSHBUTTON "&Добавить ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Удалить", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Кнопки панели инструментов:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Çàêðûòü"
|
||||
IDS_CLOSE "Закрыть"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Ñåãîäíÿ:"
|
||||
IDM_GOTODAY "Òåêóùàÿ äàòà"
|
||||
IDM_TODAY "Сегодня:"
|
||||
IDM_GOTODAY "Текущая дата"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Ðàçäåëèòåëü"
|
||||
IDS_SEPARATOR "Разделитель"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Íåò"
|
||||
HKY_NONE "Нет"
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
#pragma code_page(65001)
|
||||
|
||||
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
|
||||
|
@ -87,5 +89,3 @@ STRINGTABLE DISCARDABLE
|
|||
{
|
||||
HKY_NONE "Brez"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
/* Slovak strings in CP1250 */
|
||||
|
||||
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_THAI, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "comctl32.h"
|
||||
|
||||
/* Chinese text is encoded in UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
|
@ -161,5 +163,3 @@ STRINGTABLE DISCARDABLE
|
|||
{
|
||||
HKY_NONE "無"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
|
|
@ -784,7 +784,7 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
|
|||
if(hwndTB) {
|
||||
TBADDBITMAP tbab;
|
||||
|
||||
SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM)uStructSize, 0);
|
||||
SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, uStructSize, 0);
|
||||
|
||||
/* set bitmap and button size */
|
||||
/*If CreateToolbarEx receives 0, windows sets default values*/
|
||||
|
@ -811,12 +811,11 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
|
|||
tbab.hInst = hBMInst;
|
||||
tbab.nID = wBMID;
|
||||
|
||||
SendMessageW (hwndTB, TB_ADDBITMAP, (WPARAM)nBitmaps, (LPARAM)&tbab);
|
||||
SendMessageW (hwndTB, TB_ADDBITMAP, nBitmaps, (LPARAM)&tbab);
|
||||
}
|
||||
/* add buttons */
|
||||
if(iNumButtons > 0)
|
||||
SendMessageW (hwndTB, TB_ADDBUTTONSW,
|
||||
(WPARAM)iNumButtons, (LPARAM)lpButtons);
|
||||
SendMessageW (hwndTB, TB_ADDBUTTONSW, iNumButtons, (LPARAM)lpButtons);
|
||||
}
|
||||
|
||||
return hwndTB;
|
||||
|
@ -923,8 +922,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
|
|||
if (hbm) {
|
||||
HDC hdcDst = CreateCompatibleDC (hdcScreen);
|
||||
HBITMAP hbmOld = SelectObject (hdcDst, hbm);
|
||||
const BYTE *lpBits = (const BYTE *)(lpBitmap + 1);
|
||||
lpBits += nColorTableSize * sizeof(RGBQUAD);
|
||||
const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
|
||||
StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
|
||||
lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
|
||||
SRCCOPY);
|
||||
|
@ -1403,9 +1401,8 @@ COMCTL32_CreateToolTip(HWND hwndOwner)
|
|||
nmttc.hdr.code = NM_TOOLTIPSCREATED;
|
||||
nmttc.hwndToolTips = hwndToolTip;
|
||||
|
||||
SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY,
|
||||
(WPARAM)GetWindowLongPtrW(hwndTrueOwner, GWLP_ID),
|
||||
(LPARAM)&nmttc);
|
||||
SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY,
|
||||
GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), (LPARAM)&nmttc);
|
||||
}
|
||||
|
||||
return hwndToolTip;
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
* TODO:
|
||||
* -- DTS_APPCANPARSE
|
||||
* -- DTS_SHORTDATECENTURYFORMAT
|
||||
* -- DTN_CLOSEUP
|
||||
* -- DTN_FORMAT
|
||||
* -- DTN_FORMATQUERY
|
||||
* -- DTN_USERSTRING
|
||||
|
@ -88,6 +87,7 @@ typedef struct
|
|||
|
||||
/* in monthcal.c */
|
||||
extern int MONTHCAL_MonthLength(int month, int year);
|
||||
extern int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace);
|
||||
|
||||
/* this list of defines is closely related to `allowedformatchars' defined
|
||||
* in datetime.c; the high nibble indicates the `base type' of the format
|
||||
|
@ -125,10 +125,11 @@ extern int MONTHCAL_MonthLength(int month, int year);
|
|||
|
||||
#define DTHT_DATEFIELD 0xff /* for hit-testing */
|
||||
|
||||
#define DTHT_NONE 0
|
||||
#define DTHT_CHECKBOX 0x200 /* these should end at '00' , to make */
|
||||
#define DTHT_MCPOPUP 0x300 /* & DTHT_DATEFIELD 0 when DATETIME_KeyDown */
|
||||
#define DTHT_GOTFOCUS 0x400 /* tests for date-fields */
|
||||
#define DTHT_NONE 0x1000
|
||||
#define DTHT_CHECKBOX 0x2000 /* these should end at '00' , to make */
|
||||
#define DTHT_MCPOPUP 0x3000 /* & DTHT_DATEFIELD 0 when DATETIME_KeyDown */
|
||||
#define DTHT_GOTFOCUS 0x4000 /* tests for date-fields */
|
||||
#define DTHT_NODATEMASK 0xf000 /* to mask check and drop down from others */
|
||||
|
||||
static BOOL DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code);
|
||||
static BOOL DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr);
|
||||
|
@ -138,43 +139,45 @@ static const int maxrepetition [] = {4,2,2,2,4,2,2,4,-1};
|
|||
|
||||
|
||||
static DWORD
|
||||
DATETIME_GetSystemTime (const DATETIME_INFO *infoPtr, SYSTEMTIME *lprgSysTimeArray)
|
||||
DATETIME_GetSystemTime (const DATETIME_INFO *infoPtr, SYSTEMTIME *systime)
|
||||
{
|
||||
if (!lprgSysTimeArray) return GDT_NONE;
|
||||
if (!systime) return GDT_NONE;
|
||||
|
||||
if ((infoPtr->dwStyle & DTS_SHOWNONE) &&
|
||||
(SendMessageW (infoPtr->hwndCheckbut, BM_GETCHECK, 0, 0) == BST_UNCHECKED))
|
||||
return GDT_NONE;
|
||||
|
||||
MONTHCAL_CopyTime (&infoPtr->date, lprgSysTimeArray);
|
||||
*systime = infoPtr->date;
|
||||
|
||||
return GDT_VALID;
|
||||
}
|
||||
|
||||
|
||||
static BOOL
|
||||
DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *lprgSysTimeArray)
|
||||
DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *systime)
|
||||
{
|
||||
if (!lprgSysTimeArray) return 0;
|
||||
if (!systime) return 0;
|
||||
|
||||
TRACE("%04d/%02d/%02d %02d:%02d:%02d\n",
|
||||
lprgSysTimeArray->wYear, lprgSysTimeArray->wMonth, lprgSysTimeArray->wDay,
|
||||
lprgSysTimeArray->wHour, lprgSysTimeArray->wMinute, lprgSysTimeArray->wSecond);
|
||||
systime->wYear, systime->wMonth, systime->wDay,
|
||||
systime->wHour, systime->wMinute, systime->wSecond);
|
||||
|
||||
if (flag == GDT_VALID) {
|
||||
if (lprgSysTimeArray->wYear < 1601 || lprgSysTimeArray->wYear > 30827 ||
|
||||
lprgSysTimeArray->wMonth < 1 || lprgSysTimeArray->wMonth > 12 ||
|
||||
lprgSysTimeArray->wDayOfWeek > 6 ||
|
||||
lprgSysTimeArray->wDay < 1 || lprgSysTimeArray->wDay > 31 ||
|
||||
lprgSysTimeArray->wHour > 23 ||
|
||||
lprgSysTimeArray->wMinute > 59 ||
|
||||
lprgSysTimeArray->wSecond > 59 ||
|
||||
lprgSysTimeArray->wMilliseconds > 999
|
||||
if (systime->wYear < 1601 || systime->wYear > 30827 ||
|
||||
systime->wMonth < 1 || systime->wMonth > 12 ||
|
||||
systime->wDay < 1 || systime->wDay > 31 ||
|
||||
systime->wHour > 23 ||
|
||||
systime->wMinute > 59 ||
|
||||
systime->wSecond > 59 ||
|
||||
systime->wMilliseconds > 999
|
||||
)
|
||||
return 0;
|
||||
return FALSE;
|
||||
|
||||
infoPtr->dateValid = TRUE;
|
||||
MONTHCAL_CopyTime (lprgSysTimeArray, &infoPtr->date);
|
||||
infoPtr->date = *systime;
|
||||
/* always store a valid day of week */
|
||||
MONTHCAL_CalculateDayOfWeek(&infoPtr->date, TRUE);
|
||||
|
||||
SendMessageW (infoPtr->hMonthCal, MCM_SETCURSEL, 0, (LPARAM)(&infoPtr->date));
|
||||
SendMessageW (infoPtr->hwndCheckbut, BM_SETCHECK, BST_CHECKED, 0);
|
||||
} else if ((infoPtr->dwStyle & DTS_SHOWNONE) && (flag == GDT_NONE)) {
|
||||
|
@ -182,7 +185,7 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *lp
|
|||
SendMessageW (infoPtr->hwndCheckbut, BM_SETCHECK, BST_UNCHECKED, 0);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
return FALSE;
|
||||
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
return TRUE;
|
||||
|
@ -286,7 +289,7 @@ DATETIME_SetFormatW (DATETIME_INFO *infoPtr, LPCWSTR lpszFormat)
|
|||
format_item = LOCALE_STIMEFORMAT;
|
||||
else /* DTS_SHORTDATEFORMAT */
|
||||
format_item = LOCALE_SSHORTDATE;
|
||||
GetLocaleInfoW( GetSystemDefaultLCID(), format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0]));
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0]));
|
||||
lpszFormat = format_buf;
|
||||
}
|
||||
|
||||
|
@ -407,12 +410,12 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int
|
|||
wsprintfW (result, fmt__2dW, date.wMonth);
|
||||
break;
|
||||
case THREECHARMONTH:
|
||||
GetLocaleInfoW(GetSystemDefaultLCID(), LOCALE_SMONTHNAME1+date.wMonth -1,
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1,
|
||||
buffer, sizeof(buffer)/sizeof(buffer[0]));
|
||||
wsprintfW (result, fmt__3sW, buffer);
|
||||
break;
|
||||
case FULLMONTH:
|
||||
GetLocaleInfoW(GetSystemDefaultLCID(),LOCALE_SMONTHNAME1+date.wMonth -1,
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1,
|
||||
result, resultSize);
|
||||
break;
|
||||
case ONELETTERAMPM:
|
||||
|
@ -444,19 +447,6 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int
|
|||
TRACE ("arg%d=%x->[%s]\n", count, infoPtr->fieldspec[count], debugstr_w(result));
|
||||
}
|
||||
|
||||
/* Offsets of days in the week to the weekday of january 1 in a leap year. */
|
||||
static const int DayOfWeekTable[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
|
||||
|
||||
/* returns the day in the week(0 == sunday, 6 == saturday) */
|
||||
/* day(1 == 1st, 2 == 2nd... etc), year is the year value */
|
||||
static int DATETIME_CalculateDayOfWeek(DWORD day, DWORD month, DWORD year)
|
||||
{
|
||||
year-=(month < 3);
|
||||
|
||||
return((year + year/4 - year/100 + year/400 +
|
||||
DayOfWeekTable[month-1] + day ) % 7);
|
||||
}
|
||||
|
||||
static int wrap(int val, int delta, int minVal, int maxVal)
|
||||
{
|
||||
val += delta;
|
||||
|
@ -480,14 +470,14 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta)
|
|||
case TWODIGITYEAR:
|
||||
case FULLYEAR:
|
||||
date->wYear = wrap(date->wYear, delta, 1752, 9999);
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(date->wDay,date->wMonth,date->wYear);
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
break;
|
||||
case ONEDIGITMONTH:
|
||||
case TWODIGITMONTH:
|
||||
case THREECHARMONTH:
|
||||
case FULLMONTH:
|
||||
date->wMonth = wrap(date->wMonth, delta, 1, 12);
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(date->wDay,date->wMonth,date->wYear);
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
delta = 0;
|
||||
/* fall through */
|
||||
case ONEDIGITDAY:
|
||||
|
@ -495,7 +485,7 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta)
|
|||
case THREECHARDAY:
|
||||
case FULLDAY:
|
||||
date->wDay = wrap(date->wDay, delta, 1, MONTHCAL_MonthLength(date->wMonth, date->wYear));
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(date->wDay,date->wMonth,date->wYear);
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
break;
|
||||
case ONELETTERAMPM:
|
||||
case TWOLETTERAMPM:
|
||||
|
@ -537,7 +527,7 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta)
|
|||
|
||||
|
||||
static void
|
||||
DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHORT *fieldWidthPtr)
|
||||
DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHORT *width)
|
||||
{
|
||||
/* fields are a fixed width, determined by the largest possible string */
|
||||
/* presumably, these widths should be language dependent */
|
||||
|
@ -546,10 +536,6 @@ DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHO
|
|||
static const WCHAR fld_d4W[] = { '2', '2', '2', '2', 0 };
|
||||
static const WCHAR fld_am1[] = { 'A', 0 };
|
||||
static const WCHAR fld_am2[] = { 'A', 'M', 0 };
|
||||
static const WCHAR fld_day[] = { 'W', 'e', 'd', 'n', 'e', 's', 'd', 'a', 'y', 0 };
|
||||
static const WCHAR fld_day3[] = { 'W', 'e', 'd', 0 };
|
||||
static const WCHAR fld_mon[] = { 'S', 'e', 'p', 't', 'e', 'm', 'b', 'e', 'r', 0 };
|
||||
static const WCHAR fld_mon3[] = { 'D', 'e', 'c', 0 };
|
||||
int spec;
|
||||
WCHAR buffer[80];
|
||||
LPCWSTR bufptr;
|
||||
|
@ -596,18 +582,64 @@ DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHO
|
|||
case FULLYEAR:
|
||||
bufptr = fld_d4W;
|
||||
break;
|
||||
case THREECHARDAY:
|
||||
bufptr = fld_day3;
|
||||
break;
|
||||
case FULLDAY:
|
||||
bufptr = fld_day;
|
||||
break;
|
||||
case THREECHARMONTH:
|
||||
bufptr = fld_mon3;
|
||||
break;
|
||||
case FULLMONTH:
|
||||
bufptr = fld_mon;
|
||||
break;
|
||||
case THREECHARDAY:
|
||||
case FULLDAY:
|
||||
{
|
||||
static const WCHAR fld_day[] = {'W','e','d','n','e','s','d','a','y',0};
|
||||
static const WCHAR fld_abbrday[] = {'W','e','d',0};
|
||||
static const WCHAR fld_mon[] = {'S','e','p','t','e','m','b','e','r',0};
|
||||
static const WCHAR fld_abbrmon[] = {'D','e','c',0};
|
||||
|
||||
const WCHAR *fall;
|
||||
LCTYPE lctype;
|
||||
INT i, max_count;
|
||||
LONG cx;
|
||||
|
||||
/* choose locale data type and fallback string */
|
||||
switch (spec) {
|
||||
case THREECHARDAY:
|
||||
fall = fld_abbrday;
|
||||
lctype = LOCALE_SABBREVDAYNAME1;
|
||||
max_count = 7;
|
||||
break;
|
||||
case FULLDAY:
|
||||
fall = fld_day;
|
||||
lctype = LOCALE_SDAYNAME1;
|
||||
max_count = 7;
|
||||
break;
|
||||
case THREECHARMONTH:
|
||||
fall = fld_abbrmon;
|
||||
lctype = LOCALE_SABBREVMONTHNAME1;
|
||||
max_count = 12;
|
||||
break;
|
||||
default: /* FULLMONTH */
|
||||
fall = fld_mon;
|
||||
lctype = LOCALE_SMONTHNAME1;
|
||||
max_count = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
cx = 0;
|
||||
for (i = 0; i < max_count; i++)
|
||||
{
|
||||
if(GetLocaleInfoW(LOCALE_USER_DEFAULT, lctype + i,
|
||||
buffer, lstrlenW(buffer)))
|
||||
{
|
||||
GetTextExtentPoint32W(hdc, buffer, lstrlenW(buffer), &size);
|
||||
if (size.cx > cx) cx = size.cx;
|
||||
}
|
||||
else /* locale independent fallback on failure */
|
||||
{
|
||||
GetTextExtentPoint32W(hdc, fall, lstrlenW(fall), &size);
|
||||
cx = size.cx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*width = cx;
|
||||
return;
|
||||
}
|
||||
case ONELETTERAMPM:
|
||||
bufptr = fld_am1;
|
||||
break;
|
||||
|
@ -620,25 +652,21 @@ DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHO
|
|||
}
|
||||
}
|
||||
GetTextExtentPoint32W (hdc, bufptr, strlenW(bufptr), &size);
|
||||
*fieldWidthPtr = size.cx;
|
||||
*width = size.cx;
|
||||
}
|
||||
|
||||
static void
|
||||
DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
int i,prevright;
|
||||
RECT *field;
|
||||
RECT *rcDraw = &infoPtr->rcDraw;
|
||||
RECT *calbutton = &infoPtr->calbutton;
|
||||
RECT *checkbox = &infoPtr->checkbox;
|
||||
SIZE size;
|
||||
COLORREF oldTextColor;
|
||||
SHORT fieldWidth = 0;
|
||||
|
||||
/* draw control edge */
|
||||
TRACE("\n");
|
||||
|
||||
if (infoPtr->dateValid) {
|
||||
int i, prevright;
|
||||
RECT *field;
|
||||
RECT *rcDraw = &infoPtr->rcDraw;
|
||||
SIZE size;
|
||||
COLORREF oldTextColor;
|
||||
SHORT fieldWidth = 0;
|
||||
HFONT oldFont = SelectObject (hdc, infoPtr->hFont);
|
||||
INT oldBkMode = SetBkMode (hdc, TRANSPARENT);
|
||||
WCHAR txt[80];
|
||||
|
@ -647,25 +675,36 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
|||
GetTextExtentPoint32W (hdc, txt, strlenW(txt), &size);
|
||||
rcDraw->bottom = size.cy + 2;
|
||||
|
||||
prevright = checkbox->right = ((infoPtr->dwStyle & DTS_SHOWNONE) ? 18 : 2);
|
||||
prevright = infoPtr->checkbox.right = ((infoPtr->dwStyle & DTS_SHOWNONE) ? 18 : 2);
|
||||
|
||||
for (i = 0; i < infoPtr->nrFields; i++) {
|
||||
DATETIME_ReturnTxt (infoPtr, i, txt, sizeof(txt)/sizeof(txt[0]));
|
||||
GetTextExtentPoint32W (hdc, txt, strlenW(txt), &size);
|
||||
DATETIME_ReturnFieldWidth (infoPtr, hdc, i, &fieldWidth);
|
||||
field = &infoPtr->fieldRect[i];
|
||||
field->left = prevright;
|
||||
field->right = prevright + fieldWidth;
|
||||
field->top = rcDraw->top;
|
||||
field->left = prevright;
|
||||
field->right = prevright + fieldWidth;
|
||||
field->top = rcDraw->top;
|
||||
field->bottom = rcDraw->bottom;
|
||||
prevright = field->right;
|
||||
|
||||
if (infoPtr->dwStyle & WS_DISABLED)
|
||||
oldTextColor = SetTextColor (hdc, comctl32_color.clrGrayText);
|
||||
else if ((infoPtr->haveFocus) && (i == infoPtr->select)) {
|
||||
/* fill if focussed */
|
||||
RECT selection;
|
||||
|
||||
/* fill if focused */
|
||||
HBRUSH hbr = CreateSolidBrush (comctl32_color.clrActiveCaption);
|
||||
FillRect(hdc, field, hbr);
|
||||
|
||||
selection.left = 0;
|
||||
selection.top = 0;
|
||||
selection.right = size.cx;
|
||||
selection.bottom = size.cy;
|
||||
/* center rectangle */
|
||||
OffsetRect(&selection, (field->right + field->left - size.cx)/2,
|
||||
(field->bottom - size.cy)/2);
|
||||
|
||||
FillRect(hdc, &selection, hbr);
|
||||
DeleteObject (hbr);
|
||||
oldTextColor = SetTextColor (hdc, comctl32_color.clrWindow);
|
||||
}
|
||||
|
@ -673,7 +712,7 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
|||
oldTextColor = SetTextColor (hdc, comctl32_color.clrWindowText);
|
||||
|
||||
/* draw the date text using the colour set above */
|
||||
DrawTextW (hdc, txt, strlenW(txt), field, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
|
||||
DrawTextW (hdc, txt, strlenW(txt), field, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
SetTextColor (hdc, oldTextColor);
|
||||
}
|
||||
SetBkMode (hdc, oldBkMode);
|
||||
|
@ -681,7 +720,7 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
|||
}
|
||||
|
||||
if (!(infoPtr->dwStyle & DTS_UPDOWN)) {
|
||||
DrawFrameControl(hdc, calbutton, DFC_SCROLL,
|
||||
DrawFrameControl(hdc, &infoPtr->calbutton, DFC_SCROLL,
|
||||
DFCS_SCROLLDOWN | (infoPtr->bCalDepressed ? DFCS_PUSHED : 0) |
|
||||
(infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) );
|
||||
}
|
||||
|
@ -698,30 +737,54 @@ DATETIME_HitTest (const DATETIME_INFO *infoPtr, POINT pt)
|
|||
if (PtInRect (&infoPtr->calbutton, pt)) return DTHT_MCPOPUP;
|
||||
if (PtInRect (&infoPtr->checkbox, pt)) return DTHT_CHECKBOX;
|
||||
|
||||
for (i=0; i < infoPtr->nrFields; i++) {
|
||||
for (i = 0; i < infoPtr->nrFields; i++) {
|
||||
if (PtInRect (&infoPtr->fieldRect[i], pt)) return i;
|
||||
}
|
||||
|
||||
return DTHT_NONE;
|
||||
}
|
||||
|
||||
/* Returns index of a closest date field from given counting to left
|
||||
or -1 if there's no such fields at left */
|
||||
static int DATETIME_GetPrevDateField(const DATETIME_INFO *infoPtr, int i)
|
||||
{
|
||||
for(--i; i >= 0; i--)
|
||||
{
|
||||
if (infoPtr->fieldspec[i] & DTHT_DATEFIELD) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
DATETIME_LButtonDown (DATETIME_INFO *infoPtr, INT x, INT y)
|
||||
{
|
||||
POINT pt;
|
||||
int old, new;
|
||||
int new;
|
||||
|
||||
pt.x = x;
|
||||
pt.y = y;
|
||||
old = infoPtr->select;
|
||||
new = DATETIME_HitTest (infoPtr, pt);
|
||||
|
||||
/* FIXME: might be conditions where we don't want to update infoPtr->select */
|
||||
infoPtr->select = new;
|
||||
|
||||
SetFocus(infoPtr->hwndSelf);
|
||||
|
||||
if (!(new & DTHT_NODATEMASK) || (new == DTHT_NONE))
|
||||
{
|
||||
if (new == DTHT_NONE)
|
||||
new = infoPtr->nrFields - 1;
|
||||
else
|
||||
{
|
||||
/* hitting string part moves selection to next date field to left */
|
||||
if (infoPtr->fieldspec[new] & DT_STRING)
|
||||
{
|
||||
new = DATETIME_GetPrevDateField(infoPtr, new);
|
||||
if (new == -1) return 0;
|
||||
}
|
||||
/* never select full day of week */
|
||||
if (infoPtr->fieldspec[new] == FULLDAY) return 0;
|
||||
}
|
||||
}
|
||||
infoPtr->select = new;
|
||||
|
||||
if (infoPtr->select == DTHT_MCPOPUP) {
|
||||
RECT rcMonthCal;
|
||||
SendMessageW(infoPtr->hMonthCal, MCM_GETMINREQRECT, 0, (LPARAM)&rcMonthCal);
|
||||
|
@ -746,20 +809,23 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, INT x, INT y)
|
|||
|
||||
if(IsWindowVisible(infoPtr->hMonthCal)) {
|
||||
ShowWindow(infoPtr->hMonthCal, SW_HIDE);
|
||||
infoPtr->bDropdownEnabled = FALSE;
|
||||
DATETIME_SendSimpleNotify (infoPtr, DTN_CLOSEUP);
|
||||
} else {
|
||||
const SYSTEMTIME *lprgSysTimeArray = &infoPtr->date;
|
||||
TRACE("update calendar %04d/%02d/%02d\n",
|
||||
lprgSysTimeArray->wYear, lprgSysTimeArray->wMonth, lprgSysTimeArray->wDay);
|
||||
SendMessageW(infoPtr->hMonthCal, MCM_SETCURSEL, 0, (LPARAM)(&infoPtr->date));
|
||||
|
||||
if (infoPtr->bDropdownEnabled)
|
||||
if (infoPtr->bDropdownEnabled) {
|
||||
ShowWindow(infoPtr->hMonthCal, SW_SHOW);
|
||||
DATETIME_SendSimpleNotify (infoPtr, DTN_DROPDOWN);
|
||||
}
|
||||
infoPtr->bDropdownEnabled = TRUE;
|
||||
}
|
||||
|
||||
TRACE ("dt:%p mc:%p mc parent:%p, desktop:%p\n",
|
||||
infoPtr->hwndSelf, infoPtr->hMonthCal, infoPtr->hwndNotify, GetDesktopWindow ());
|
||||
DATETIME_SendSimpleNotify (infoPtr, DTN_DROPDOWN);
|
||||
}
|
||||
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
|
@ -865,7 +931,7 @@ DATETIME_EraseBackground (const DATETIME_INFO *infoPtr, HDC hdc)
|
|||
|
||||
|
||||
static LRESULT
|
||||
DATETIME_Notify (DATETIME_INFO *infoPtr, LPNMHDR lpnmh)
|
||||
DATETIME_Notify (DATETIME_INFO *infoPtr, const NMHDR *lpnmh)
|
||||
{
|
||||
TRACE ("Got notification %x from %p\n", lpnmh->code, lpnmh->hwndFrom);
|
||||
TRACE ("info: %p %p %p\n", infoPtr->hwndSelf, infoPtr->hMonthCal, infoPtr->hUpdown);
|
||||
|
@ -879,9 +945,10 @@ DATETIME_Notify (DATETIME_INFO *infoPtr, LPNMHDR lpnmh)
|
|||
SendMessageW (infoPtr->hwndCheckbut, BM_SETCHECK, BST_CHECKED, 0);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
DATETIME_SendDateTimeChangeNotify (infoPtr);
|
||||
DATETIME_SendSimpleNotify(infoPtr, DTN_CLOSEUP);
|
||||
}
|
||||
if ((lpnmh->hwndFrom == infoPtr->hUpdown) && (lpnmh->code == UDN_DELTAPOS)) {
|
||||
LPNMUPDOWN lpnmud = (LPNMUPDOWN)lpnmh;
|
||||
const NM_UPDOWN *lpnmud = (const NM_UPDOWN*)lpnmh;
|
||||
TRACE("Delta pos %d\n", lpnmud->iDelta);
|
||||
infoPtr->pendingUpdown = lpnmud->iDelta;
|
||||
}
|
||||
|
@ -964,15 +1031,14 @@ DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode)
|
|||
case TWODIGITYEAR:
|
||||
date->wYear = date->wYear - (date->wYear%100) +
|
||||
(date->wYear%10)*10 + num;
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(
|
||||
date->wDay,date->wMonth,date->wYear);
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
DATETIME_SendDateTimeChangeNotify (infoPtr);
|
||||
break;
|
||||
case INVALIDFULLYEAR:
|
||||
case FULLYEAR:
|
||||
date->wYear = (date->wYear%1000)*10 + num;
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(
|
||||
date->wDay,date->wMonth,date->wYear);
|
||||
/* reset current year initialy */
|
||||
date->wYear = ((date->wYear/1000) ? 0 : 1)*(date->wYear%1000)*10 + num;
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
DATETIME_SendDateTimeChangeNotify (infoPtr);
|
||||
break;
|
||||
case ONEDIGITMONTH:
|
||||
|
@ -981,8 +1047,7 @@ DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode)
|
|||
date->wMonth = num;
|
||||
else
|
||||
date->wMonth = (date->wMonth%10)*10+num;
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(
|
||||
date->wDay,date->wMonth,date->wYear);
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
DATETIME_SendDateTimeChangeNotify (infoPtr);
|
||||
break;
|
||||
case ONEDIGITDAY:
|
||||
|
@ -992,8 +1057,7 @@ DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode)
|
|||
date->wDay = num;
|
||||
else
|
||||
date->wDay = newDays;
|
||||
date->wDayOfWeek = DATETIME_CalculateDayOfWeek(
|
||||
date->wDay,date->wMonth,date->wYear);
|
||||
MONTHCAL_CalculateDayOfWeek(date, TRUE);
|
||||
DATETIME_SendDateTimeChangeNotify (infoPtr);
|
||||
break;
|
||||
case ONEDIGIT12HOUR:
|
||||
|
@ -1126,9 +1190,9 @@ DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr)
|
|||
dtdtc.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
||||
dtdtc.nmhdr.code = DTN_DATETIMECHANGE;
|
||||
|
||||
dtdtc.dwFlags = (infoPtr->dwStyle & DTS_SHOWNONE) ? GDT_NONE : GDT_VALID;
|
||||
dtdtc.dwFlags = infoPtr->dateValid ? GDT_VALID : GDT_NONE;
|
||||
|
||||
MONTHCAL_CopyTime (&infoPtr->date, &dtdtc.st);
|
||||
dtdtc.st = infoPtr->date;
|
||||
return (BOOL) SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
||||
dtdtc.nmhdr.idFrom, (LPARAM)&dtdtc);
|
||||
}
|
||||
|
@ -1186,12 +1250,27 @@ DATETIME_Size (DATETIME_INFO *infoPtr, INT width, INT height)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
DATETIME_StyleChanging(DATETIME_INFO *infoPtr, WPARAM wStyleType, STYLESTRUCT *lpss)
|
||||
{
|
||||
TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||
|
||||
/* block DTS_SHOWNONE change */
|
||||
if ((lpss->styleNew ^ lpss->styleOld) & DTS_SHOWNONE)
|
||||
{
|
||||
if (lpss->styleOld & DTS_SHOWNONE)
|
||||
lpss->styleNew |= DTS_SHOWNONE;
|
||||
else
|
||||
lpss->styleNew &= ~DTS_SHOWNONE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
|
||||
{
|
||||
static const WCHAR buttonW[] = { 'b', 'u', 't', 't', 'o', 'n', 0 };
|
||||
|
||||
TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||
|
||||
|
@ -1200,7 +1279,7 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRU
|
|||
infoPtr->dwStyle = lpss->styleNew;
|
||||
|
||||
if ( !(lpss->styleOld & DTS_SHOWNONE) && (lpss->styleNew & DTS_SHOWNONE) ) {
|
||||
infoPtr->hwndCheckbut = CreateWindowExW (0, buttonW, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
|
||||
infoPtr->hwndCheckbut = CreateWindowExW (0, WC_BUTTONW, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
|
||||
2, 2, 13, 13, infoPtr->hwndSelf, 0,
|
||||
(HINSTANCE)GetWindowLongPtrW (infoPtr->hwndSelf, GWLP_HINSTANCE), 0);
|
||||
SendMessageW (infoPtr->hwndCheckbut, BM_SETCHECK, 1, 0);
|
||||
|
@ -1235,7 +1314,6 @@ DATETIME_SetFont (DATETIME_INFO *infoPtr, HFONT font, BOOL repaint)
|
|||
static LRESULT
|
||||
DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||
{
|
||||
static const WCHAR SysMonthCal32W[] = { 'S', 'y', 's', 'M', 'o', 'n', 't', 'h', 'C', 'a', 'l', '3', '2', 0 };
|
||||
DATETIME_INFO *infoPtr = Alloc (sizeof(DATETIME_INFO));
|
||||
STYLESTRUCT ss = { 0, lpcs->style };
|
||||
|
||||
|
@ -1256,7 +1334,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
DATETIME_SetFormatW (infoPtr, 0);
|
||||
|
||||
/* create the monthcal control */
|
||||
infoPtr->hMonthCal = CreateWindowExW (0, SysMonthCal32W, 0, WS_BORDER | WS_POPUP | WS_CLIPSIBLINGS,
|
||||
infoPtr->hMonthCal = CreateWindowExW (0, MONTHCAL_CLASSW, 0, WS_BORDER | WS_POPUP | WS_CLIPSIBLINGS,
|
||||
0, 0, 0, 0, infoPtr->hwndSelf, 0, 0, 0);
|
||||
|
||||
/* initialize info structure */
|
||||
|
@ -1281,11 +1359,34 @@ DATETIME_Destroy (DATETIME_INFO *infoPtr)
|
|||
if (infoPtr->hMonthCal)
|
||||
DestroyWindow(infoPtr->hMonthCal);
|
||||
SetWindowLongPtrW( infoPtr->hwndSelf, 0, 0 ); /* clear infoPtr */
|
||||
Free (infoPtr->buflen);
|
||||
Free (infoPtr->fieldRect);
|
||||
Free (infoPtr->fieldspec);
|
||||
Free (infoPtr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static INT
|
||||
DATETIME_GetText (DATETIME_INFO *infoPtr, INT count, LPWSTR dst)
|
||||
{
|
||||
WCHAR buf[80];
|
||||
int i;
|
||||
|
||||
if (!dst || (count <= 0)) return 0;
|
||||
|
||||
dst[0] = 0;
|
||||
for (i = 0; i < infoPtr->nrFields; i++)
|
||||
{
|
||||
DATETIME_ReturnTxt(infoPtr, i, buf, sizeof(buf)/sizeof(buf[0]));
|
||||
if ((strlenW(dst) + strlenW(buf)) < count)
|
||||
strcatW(dst, buf);
|
||||
else break;
|
||||
}
|
||||
return strlenW(dst);
|
||||
}
|
||||
|
||||
|
||||
static LRESULT WINAPI
|
||||
DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -1385,6 +1486,9 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_COMMAND:
|
||||
return DATETIME_Command (infoPtr, wParam, lParam);
|
||||
|
||||
case WM_STYLECHANGING:
|
||||
return DATETIME_StyleChanging(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
|
||||
|
||||
case WM_STYLECHANGED:
|
||||
return DATETIME_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
|
||||
|
||||
|
@ -1394,6 +1498,12 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_GETFONT:
|
||||
return (LRESULT) infoPtr->hFont;
|
||||
|
||||
case WM_GETTEXT:
|
||||
return (LRESULT) DATETIME_GetText(infoPtr, wParam, (LPWSTR)lParam);
|
||||
|
||||
case WM_SETTEXT:
|
||||
return CB_ERR;
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
|
||||
ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
|
||||
|
|
|
@ -426,12 +426,27 @@ BOOL WINAPI DPA_Destroy (const HDPA hdpa)
|
|||
*/
|
||||
BOOL WINAPI DPA_Grow (HDPA hdpa, INT nGrow)
|
||||
{
|
||||
INT items;
|
||||
TRACE("(%p %d)\n", hdpa, nGrow);
|
||||
|
||||
if (!hdpa)
|
||||
return FALSE;
|
||||
|
||||
hdpa->nGrow = max(8, nGrow);
|
||||
nGrow = max( 8, nGrow );
|
||||
items = nGrow * (((hdpa->nMaxCount - 1) / nGrow) + 1);
|
||||
if (items > hdpa->nMaxCount)
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
if (hdpa->ptrs)
|
||||
ptr = HeapReAlloc( hdpa->hHeap, HEAP_ZERO_MEMORY, hdpa->ptrs, items * sizeof(LPVOID) );
|
||||
else
|
||||
ptr = HeapAlloc( hdpa->hHeap, HEAP_ZERO_MEMORY, items * sizeof(LPVOID) );
|
||||
if (!ptr) return FALSE;
|
||||
hdpa->nMaxCount = items;
|
||||
hdpa->ptrs = ptr;
|
||||
}
|
||||
hdpa->nGrow = nGrow;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
|
|||
|
||||
dwLastScrollTime = dwScrollTime;
|
||||
|
||||
SendMessageW (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
|
||||
SendMessageW (hwndLB, LB_SETTOPINDEX, nIndex, 0);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
@ -374,8 +374,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
|
|||
dis.rcItem = phdi->rect;
|
||||
dis.itemData = phdi->lParam;
|
||||
oldBkMode = SetBkMode(hdc, TRANSPARENT);
|
||||
SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM,
|
||||
(WPARAM)dis.CtlID, (LPARAM)&dis);
|
||||
SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis);
|
||||
if (oldBkMode != TRANSPARENT)
|
||||
SetBkMode(hdc, oldBkMode);
|
||||
}
|
||||
|
@ -1214,20 +1213,64 @@ HEADER_GetOrderArray(const HEADER_INFO *infoPtr, INT size, LPINT order)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* Returns index of first duplicate 'value' from [0,to) range,
|
||||
or -1 if there isn't any */
|
||||
static INT has_duplicate(INT *array, INT to, INT value)
|
||||
{
|
||||
INT i;
|
||||
for(i = 0; i < to; i++)
|
||||
if (array[i] == value) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* returns next available value from [0,max] not to duplicate in [0,to) */
|
||||
static INT get_nextvalue(INT *array, INT to, INT max)
|
||||
{
|
||||
INT i;
|
||||
for(i = 0; i < max; i++)
|
||||
if (has_duplicate(array, to, i) == -1) return i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
HEADER_SetOrderArray(HEADER_INFO *infoPtr, INT size, const INT *order)
|
||||
{
|
||||
INT i;
|
||||
HEADER_ITEM *lpItem;
|
||||
INT i;
|
||||
|
||||
if ((UINT)size <infoPtr->uNumItem)
|
||||
if ((UINT)size != infoPtr->uNumItem)
|
||||
return FALSE;
|
||||
memcpy(infoPtr->order, order, infoPtr->uNumItem * sizeof(INT));
|
||||
|
||||
for (i=0; i<size; i++)
|
||||
{
|
||||
lpItem = &infoPtr->items[*order++];
|
||||
lpItem->iOrder=i;
|
||||
}
|
||||
{
|
||||
if (order[i] >= size || order[i] < 0)
|
||||
/* on invalid index get next available */
|
||||
/* FIXME: if i==0 array item is out of range behaviour is
|
||||
different, see tests */
|
||||
infoPtr->order[i] = get_nextvalue(infoPtr->order, i, size);
|
||||
else
|
||||
{
|
||||
INT j, dup;
|
||||
|
||||
infoPtr->order[i] = order[i];
|
||||
j = i;
|
||||
/* remove duplicates */
|
||||
while ((dup = has_duplicate(infoPtr->order, j, order[j])) != -1)
|
||||
{
|
||||
INT next;
|
||||
|
||||
next = get_nextvalue(infoPtr->order, j, size);
|
||||
infoPtr->order[dup] = next;
|
||||
j--;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* sync with item data */
|
||||
for (i=0; i<size; i++)
|
||||
{
|
||||
lpItem = &infoPtr->items[infoPtr->order[i]];
|
||||
lpItem->iOrder = i;
|
||||
}
|
||||
HEADER_SetItemBounds(infoPtr);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||
return TRUE;
|
||||
|
@ -1704,7 +1747,7 @@ HEADER_NotifyFormat (HEADER_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
case NF_REQUERY:
|
||||
infoPtr->nNotifyFormat =
|
||||
SendMessageW ((HWND)wParam, WM_NOTIFYFORMAT,
|
||||
(WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY);
|
||||
(WPARAM)infoPtr->hwndSelf, NF_QUERY);
|
||||
return infoPtr->nNotifyFormat;
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 12 KiB |
|
@ -27,32 +27,35 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
||||
/* the ones with offsets at the end are the same as in Windows */
|
||||
struct _IMAGELIST
|
||||
{
|
||||
DWORD magic; /* 00: 'SAMX' */
|
||||
INT cCurImage; /* 04: ImageCount */
|
||||
INT cMaxImage; /* 08: maximages */
|
||||
INT cGrow; /* 0c: cGrow */
|
||||
INT cx; /* 10: cx */
|
||||
INT cy; /* 14: cy */
|
||||
const struct IImageListVtbl *lpVtbl; /* 00: IImageList vtable */
|
||||
|
||||
INT cCurImage; /* 04: ImageCount */
|
||||
INT cMaxImage; /* 08: maximages */
|
||||
INT cGrow; /* 0C: cGrow */
|
||||
INT cx; /* 10: cx */
|
||||
INT cy; /* 14: cy */
|
||||
DWORD x4;
|
||||
UINT flags; /* 1c: flags */
|
||||
COLORREF clrFg; /* 20: foreground color */
|
||||
COLORREF clrBk; /* 24: background color */
|
||||
UINT flags; /* 1C: flags */
|
||||
COLORREF clrFg; /* 20: foreground color */
|
||||
COLORREF clrBk; /* 24: background color */
|
||||
|
||||
|
||||
HBITMAP hbmImage; /* 30: images Bitmap */
|
||||
HBITMAP hbmMask; /* 34: masks Bitmap */
|
||||
HDC hdcImage; /* 38: images MemDC */
|
||||
HDC hdcMask; /* 3C: masks MemDC */
|
||||
INT nOvlIdx[15]; /* 40: overlay images index */
|
||||
HBITMAP hbmImage; /* 28: images Bitmap */
|
||||
HBITMAP hbmMask; /* 2C: masks Bitmap */
|
||||
HDC hdcImage; /* 30: images MemDC */
|
||||
HDC hdcMask; /* 34: masks MemDC */
|
||||
INT nOvlIdx[15]; /* 38: overlay images index */
|
||||
|
||||
/* not yet found out */
|
||||
HBRUSH hbrBlend25;
|
||||
HBRUSH hbrBlend50;
|
||||
INT cInitial;
|
||||
UINT uBitsPixel;
|
||||
char *has_alpha;
|
||||
|
||||
LONG ref; /* reference count */
|
||||
};
|
||||
|
||||
#define IMAGELIST_MAGIC 0x53414D58
|
||||
|
|
|
@ -189,7 +189,6 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
|
|||
|
||||
static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
|
||||
{
|
||||
static const WCHAR EDIT[] = { 'E', 'd', 'i', 't', 0 };
|
||||
IPADDRESS_INFO *infoPtr;
|
||||
RECT rcClient, edit;
|
||||
int i, fieldsize;
|
||||
|
@ -230,7 +229,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
|
|||
edit.left = rcClient.left + i*fieldsize + 6;
|
||||
edit.right = rcClient.left + (i+1)*fieldsize - 2;
|
||||
part->EditHwnd =
|
||||
CreateWindowW (EDIT, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER,
|
||||
CreateWindowW (WC_EDITW, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER,
|
||||
edit.left, edit.top, edit.right - edit.left,
|
||||
edit.bottom - edit.top, hwnd, (HMENU) 1,
|
||||
(HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), NULL);
|
||||
|
|
|
@ -168,6 +168,9 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(listview);
|
||||
|
||||
/* make sure you set this to 0 for production use! */
|
||||
#define DEBUG_RANGES 1
|
||||
|
||||
typedef struct tagCOLUMN_INFO
|
||||
{
|
||||
RECT rcHeader; /* tracks the header's rectangle */
|
||||
|
@ -2965,7 +2968,11 @@ static INT CALLBACK ranges_cmp(LPVOID range1, LPVOID range2, LPARAM flags)
|
|||
return cmp;
|
||||
}
|
||||
|
||||
#define ranges_check(ranges, desc) if (TRACE_ON(listview)) ranges_assert(ranges, desc, __FUNCTION__, __LINE__)
|
||||
#if DEBUG_RANGES
|
||||
#define ranges_check(ranges, desc) ranges_assert(ranges, desc, __FUNCTION__, __LINE__)
|
||||
#else
|
||||
#define ranges_check(ranges, desc) do { } while(0)
|
||||
#endif
|
||||
|
||||
static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line)
|
||||
{
|
||||
|
@ -6946,7 +6953,7 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT
|
|||
*/
|
||||
static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lprc)
|
||||
{
|
||||
POINT Position, Origin;
|
||||
POINT Position;
|
||||
LVITEMW lvItem;
|
||||
INT nColumn;
|
||||
|
||||
|
@ -6954,7 +6961,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
|
|||
|
||||
nColumn = lprc->top;
|
||||
|
||||
TRACE("(nItem=%d, nSubItem=%d, type=%d)\n", nItem, lprc->top, lprc->left);
|
||||
TRACE("(nItem=%d, nSubItem=%d)\n", nItem, lprc->top);
|
||||
/* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
|
||||
if (lprc->top == 0)
|
||||
return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
|
||||
|
@ -6979,8 +6986,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
|
|||
}
|
||||
}
|
||||
|
||||
if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE;
|
||||
LISTVIEW_GetOrigin(infoPtr, &Origin);
|
||||
LISTVIEW_GetOrigin(infoPtr, &Position);
|
||||
|
||||
if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE;
|
||||
|
||||
|
@ -6988,6 +6994,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
|
|||
lvItem.iItem = nItem;
|
||||
lvItem.iSubItem = nColumn;
|
||||
|
||||
if (lvItem.mask && !LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE;
|
||||
switch(lprc->left)
|
||||
{
|
||||
case LVIR_ICON:
|
||||
|
@ -7004,9 +7011,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
OffsetRect(lprc, Origin.x, Position.y);
|
||||
TRACE("return rect %s\n", wine_dbgstr_rect(lprc));
|
||||
|
||||
OffsetRect(lprc, Position.x, Position.y);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,27 +92,29 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico
|
|||
|
||||
#include "comctl_Bg.rc"
|
||||
#include "comctl_Cs.rc"
|
||||
#include "comctl_De.rc"
|
||||
#include "comctl_El.rc"
|
||||
#include "comctl_En.rc"
|
||||
#include "comctl_Eo.rc"
|
||||
#include "comctl_En.rc"
|
||||
#include "comctl_Es.rc"
|
||||
#include "comctl_Fr.rc"
|
||||
#include "comctl_Hu.rc"
|
||||
#include "comctl_It.rc"
|
||||
#include "comctl_Ja.rc"
|
||||
#include "comctl_Ko.rc"
|
||||
#include "comctl_Lt.rc"
|
||||
#include "comctl_Nl.rc"
|
||||
#include "comctl_No.rc"
|
||||
#include "comctl_Pl.rc"
|
||||
#include "comctl_Pt.rc"
|
||||
#include "comctl_Ro.rc"
|
||||
#include "comctl_Ru.rc"
|
||||
#include "comctl_Si.rc"
|
||||
#include "comctl_Sk.rc"
|
||||
#include "comctl_Sv.rc"
|
||||
#include "comctl_Th.rc"
|
||||
#include "comctl_Tr.rc"
|
||||
#include "comctl_Uk.rc"
|
||||
|
||||
/* UTF-8 */
|
||||
#include "comctl_De.rc"
|
||||
#include "comctl_Fr.rc"
|
||||
#include "comctl_Ja.rc"
|
||||
#include "comctl_Lt.rc"
|
||||
#include "comctl_Pt.rc"
|
||||
#include "comctl_Ro.rc"
|
||||
#include "comctl_Ru.rc"
|
||||
#include "comctl_Si.rc"
|
||||
#include "comctl_Zh.rc"
|
||||
|
|
|
@ -1698,37 +1698,45 @@ IntReadConsole(HANDLE hConsoleInput,
|
|||
PVOID lpBuffer,
|
||||
DWORD nNumberOfCharsToRead,
|
||||
LPDWORD lpNumberOfCharsRead,
|
||||
PCONSOLE_READCONSOLE_CONTROL lpReserved,
|
||||
PCONSOLE_READCONSOLE_CONTROL pInputControl,
|
||||
BOOL bUnicode)
|
||||
{
|
||||
PCSR_API_MESSAGE Request;
|
||||
ULONG CsrRequest;
|
||||
NTSTATUS Status;
|
||||
ULONG CharSize, CharsRead = 0;
|
||||
CSR_API_MESSAGE Request;
|
||||
PCSR_CAPTURE_BUFFER CaptureBuffer;
|
||||
ULONG CsrRequest = MAKE_CSR_API(READ_CONSOLE, CSR_CONSOLE);
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
ULONG CharSize = (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
|
||||
|
||||
CharSize = (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
|
||||
Request = RtlAllocateHeap(RtlGetProcessHeap(),
|
||||
0,
|
||||
max(sizeof(CSR_API_MESSAGE),
|
||||
CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE) + min(nNumberOfCharsToRead,
|
||||
CSRSS_MAX_READ_CONSOLE / CharSize) * CharSize));
|
||||
if (Request == NULL)
|
||||
CaptureBuffer = CsrAllocateCaptureBuffer(1, nNumberOfCharsToRead * CharSize);
|
||||
if (CaptureBuffer == NULL)
|
||||
{
|
||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Request->Status = STATUS_SUCCESS;
|
||||
Request->Data.ReadConsoleRequest.ConsoleHandle = hConsoleInput;
|
||||
Request->Data.ReadConsoleRequest.Unicode = bUnicode;
|
||||
Request->Data.ReadConsoleRequest.FullReadSize = (WORD)nNumberOfCharsToRead;
|
||||
CsrRequest = MAKE_CSR_API(READ_CONSOLE, CSR_CONSOLE);
|
||||
CsrAllocateMessagePointer(CaptureBuffer,
|
||||
nNumberOfCharsToRead * CharSize,
|
||||
&Request.Data.ReadConsoleRequest.Buffer);
|
||||
|
||||
Request.Data.ReadConsoleRequest.ConsoleHandle = hConsoleInput;
|
||||
Request.Data.ReadConsoleRequest.Unicode = bUnicode;
|
||||
Request.Data.ReadConsoleRequest.NrCharactersToRead = (WORD)nNumberOfCharsToRead;
|
||||
Request.Data.ReadConsoleRequest.NrCharactersRead = 0;
|
||||
Request.Data.ReadConsoleRequest.CtrlWakeupMask = 0;
|
||||
if (pInputControl && pInputControl->nLength == sizeof(CONSOLE_READCONSOLE_CONTROL))
|
||||
{
|
||||
Request.Data.ReadConsoleRequest.NrCharactersRead = pInputControl->nInitialChars;
|
||||
memcpy(Request.Data.ReadConsoleRequest.Buffer,
|
||||
lpBuffer,
|
||||
pInputControl->nInitialChars * sizeof(WCHAR));
|
||||
Request.Data.ReadConsoleRequest.CtrlWakeupMask = pInputControl->dwCtrlWakeupMask;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (Request->Status == STATUS_PENDING)
|
||||
if (Status == STATUS_PENDING)
|
||||
{
|
||||
Status = NtWaitForSingleObject(Request->Data.ReadConsoleRequest.EventHandle,
|
||||
Status = NtWaitForSingleObject(Request.Data.ReadConsoleRequest.EventHandle,
|
||||
FALSE,
|
||||
0);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -1738,37 +1746,28 @@ IntReadConsole(HANDLE hConsoleInput,
|
|||
}
|
||||
}
|
||||
|
||||
Request->Data.ReadConsoleRequest.NrCharactersToRead = (WORD)min(nNumberOfCharsToRead, CSRSS_MAX_READ_CONSOLE / CharSize);
|
||||
|
||||
Status = CsrClientCallServer(Request,
|
||||
NULL,
|
||||
CsrRequest,
|
||||
max(sizeof(CSR_API_MESSAGE),
|
||||
CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE)
|
||||
+ Request->Data.ReadConsoleRequest.NrCharactersToRead * CharSize));
|
||||
|
||||
if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request->Status))
|
||||
Status = CsrClientCallServer(&Request, CaptureBuffer, CsrRequest, sizeof(CSR_API_MESSAGE));
|
||||
if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
|
||||
{
|
||||
DPRINT1("CSR returned error in ReadConsole\n");
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, Request);
|
||||
CsrFreeCaptureBuffer(CaptureBuffer);
|
||||
SetLastErrorByStatus(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
nNumberOfCharsToRead -= Request->Data.ReadConsoleRequest.NrCharactersRead;
|
||||
memcpy((PVOID)((ULONG_PTR)lpBuffer + (ULONG_PTR)(CharsRead * CharSize)),
|
||||
Request->Data.ReadConsoleRequest.Buffer,
|
||||
Request->Data.ReadConsoleRequest.NrCharactersRead * CharSize);
|
||||
CharsRead += Request->Data.ReadConsoleRequest.NrCharactersRead;
|
||||
}
|
||||
while (Request->Status == STATUS_PENDING && nNumberOfCharsToRead > 0);
|
||||
while (Status == STATUS_PENDING);
|
||||
|
||||
memcpy(lpBuffer,
|
||||
Request.Data.ReadConsoleRequest.Buffer,
|
||||
Request.Data.ReadConsoleRequest.NrCharactersRead * CharSize);
|
||||
|
||||
if (lpNumberOfCharsRead != NULL)
|
||||
{
|
||||
*lpNumberOfCharsRead = CharsRead;
|
||||
}
|
||||
*lpNumberOfCharsRead = Request.Data.ReadConsoleRequest.NrCharactersRead;
|
||||
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, Request);
|
||||
if (pInputControl && pInputControl->nLength == sizeof(CONSOLE_READCONSOLE_CONTROL))
|
||||
pInputControl->dwControlKeyState = Request.Data.ReadConsoleRequest.ControlKeyState;
|
||||
|
||||
CsrFreeCaptureBuffer(CaptureBuffer);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1791,7 +1790,7 @@ ReadConsoleA(HANDLE hConsoleInput,
|
|||
lpBuffer,
|
||||
nNumberOfCharsToRead,
|
||||
lpNumberOfCharsRead,
|
||||
pInputControl,
|
||||
NULL,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -457,15 +457,16 @@ WdmAudReadWrite(
|
|||
Status = KsProbeStreamIrp(Irp, KSPROBE_STREAMREAD | KSPROBE_ALLOCATEMDL | KSPROBE_PROBEANDLOCK, Length);
|
||||
}
|
||||
|
||||
/* now free the mdl */
|
||||
IoFreeMdl(Mdl);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("KsProbeStreamIrp failed with Status %x Cancel %u\n", Status, Irp->Cancel);
|
||||
Irp->MdlAddress = Mdl;
|
||||
return SetIrpIoStatus(Irp, Status, 0);
|
||||
}
|
||||
|
||||
/* now free the mdl */
|
||||
IoFreeMdl(Mdl);
|
||||
|
||||
/* get device info */
|
||||
DeviceInfo = (PWDMAUD_DEVICE_INFO)Irp->AssociatedIrp.SystemBuffer;
|
||||
ASSERT(DeviceInfo);
|
||||
|
|
|
@ -201,6 +201,41 @@ HaliReferenceHandlerForConfigSpace(IN BUS_DATA_TYPE ConfigType,
|
|||
return HalpLookupHandler(HalpConfigTable, ConfigType, BusNumber, TRUE);
|
||||
}
|
||||
|
||||
PBUS_HANDLER
|
||||
NTAPI
|
||||
HalpContextToBusHandler(IN ULONG_PTR ContextValue)
|
||||
{
|
||||
PLIST_ENTRY NextEntry;
|
||||
PHAL_BUS_HANDLER BusHandler, ThisHandler;
|
||||
|
||||
/* Start lookup */
|
||||
NextEntry = HalpAllBusHandlers.Flink;
|
||||
ThisHandler = CONTAINING_RECORD(NextEntry, HAL_BUS_HANDLER, AllHandlers);
|
||||
if (ContextValue)
|
||||
{
|
||||
/* If the list is empty, quit */
|
||||
if (IsListEmpty(&HalpAllBusHandlers)) return NULL;
|
||||
|
||||
/* Otherwise, scan the list */
|
||||
BusHandler = CONTAINING_RECORD(ContextValue, HAL_BUS_HANDLER, Handler);
|
||||
do
|
||||
{
|
||||
/* Check if we've reached the right one */
|
||||
ThisHandler = CONTAINING_RECORD(NextEntry, HAL_BUS_HANDLER, AllHandlers);
|
||||
if (ThisHandler == BusHandler) break;
|
||||
|
||||
/* Try the next one */
|
||||
NextEntry = NextEntry->Flink;
|
||||
} while (NextEntry != &HalpAllBusHandlers);
|
||||
}
|
||||
|
||||
/* If we looped back to the end, we didn't find anything */
|
||||
if (NextEntry == &HalpAllBusHandlers) return NULL;
|
||||
|
||||
/* Otherwise return the handler */
|
||||
return &ThisHandler->Handler;
|
||||
}
|
||||
|
||||
#ifndef _MINIHAL_
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -262,7 +297,7 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType,
|
|||
ConfigBusNumberArray = HalpAllocateArray(BusNumber);
|
||||
|
||||
/* Only proceed if all allocations succeeded */
|
||||
if (InterfaceArray && InterfaceBusNumberArray && ConfigArray && ConfigBusNumberArray)
|
||||
if ((InterfaceArray) && (InterfaceBusNumberArray) && (ConfigArray) && (ConfigBusNumberArray))
|
||||
{
|
||||
/* Find the parent handler if any */
|
||||
ParentHandler = HaliReferenceHandlerForBus(ParentBusType, ParentBusNumber);
|
||||
|
@ -407,15 +442,8 @@ HalpInitBusHandler(VOID)
|
|||
HalDereferenceBusHandler = HaliDereferenceBusHandler;
|
||||
#endif
|
||||
HalPciAssignSlotResources = HalpAssignSlotResources;
|
||||
/* FIXME: Fix later */
|
||||
#if 0
|
||||
HalPciTranslateBusAddress = HaliTranslateBusAddress;
|
||||
HalPciTranslateBusAddress = HaliTranslateBusAddress; /* PCI Driver can override */
|
||||
if (!HalFindBusAddressTranslation) HalFindBusAddressTranslation = HaliFindBusAddressTranslation;
|
||||
#else
|
||||
/* These should be written by the PCI driver later, but we give defaults */
|
||||
HalPciTranslateBusAddress = HalpTranslateBusAddress;
|
||||
HalFindBusAddressTranslation = HalpFindBusAddressTranslation;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -24,9 +24,28 @@ HalpTranslateIsaBusAddress(IN PBUS_HANDLER BusHandler,
|
|||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress)
|
||||
{
|
||||
DPRINT1("ISA Translate\n");
|
||||
while (TRUE);
|
||||
return FALSE;
|
||||
BOOLEAN Status;
|
||||
|
||||
/* Use system translation */
|
||||
Status = HalpTranslateSystemBusAddress(BusHandler,
|
||||
RootHandler,
|
||||
BusAddress,
|
||||
AddressSpace,
|
||||
TranslatedAddress);
|
||||
|
||||
/* If it didn't work and it was memory address space... */
|
||||
if (!(Status) && (*AddressSpace == 0))
|
||||
{
|
||||
/* Try EISA translation instead */
|
||||
Status = HalTranslateBusAddress(Eisa,
|
||||
BusHandler->BusNumber,
|
||||
BusAddress,
|
||||
AddressSpace,
|
||||
TranslatedAddress);
|
||||
}
|
||||
|
||||
/* Return the result */
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -516,9 +516,16 @@ HalpGetPCIIntOnISABus(IN PBUS_HANDLER BusHandler,
|
|||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
while (TRUE);
|
||||
return 0;
|
||||
/* Validate the level first */
|
||||
if (BusInterruptLevel < 1) return 0;
|
||||
|
||||
/* PCI has its IRQs on top of ISA IRQs, so pass it on to the ISA handler */
|
||||
return HalGetInterruptVector(Isa,
|
||||
0,
|
||||
BusInterruptLevel,
|
||||
0,
|
||||
Irql,
|
||||
Affinity);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -641,6 +648,7 @@ HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
|
|||
PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor;
|
||||
PCI_SLOT_NUMBER SlotNumber;
|
||||
ULONG WriteBuffer;
|
||||
DPRINT1("WARNING: PCI Slot Resource Assignment is FOOBAR\n");
|
||||
|
||||
/* FIXME: Should handle 64-bit addresses */
|
||||
|
||||
|
|
|
@ -24,11 +24,121 @@ HalpTranslateSystemBusAddress(IN PBUS_HANDLER BusHandler,
|
|||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress)
|
||||
{
|
||||
DPRINT1("SYSTEM Translate\n");
|
||||
while (TRUE);
|
||||
PSUPPORTED_RANGE Range = NULL;
|
||||
|
||||
/* Check what kind of address space this is */
|
||||
switch (*AddressSpace)
|
||||
{
|
||||
/* Memory address */
|
||||
case 0:
|
||||
|
||||
/* Loop all prefetech memory */
|
||||
for (Range = &BusHandler->BusAddresses->PrefetchMemory;
|
||||
Range;
|
||||
Range = Range->Next)
|
||||
{
|
||||
/* Check if it's in a valid range */
|
||||
if ((BusAddress.QuadPart >= Range->Base) &&
|
||||
(BusAddress.QuadPart <= Range->Limit))
|
||||
{
|
||||
/* Get out */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if we haven't found anything yet */
|
||||
if (!Range)
|
||||
{
|
||||
/* Loop all bus memory */
|
||||
for (Range = &BusHandler->BusAddresses->Memory;
|
||||
Range;
|
||||
Range = Range->Next)
|
||||
{
|
||||
/* Check if it's in a valid range */
|
||||
if ((BusAddress.QuadPart >= Range->Base) &&
|
||||
(BusAddress.QuadPart <= Range->Limit))
|
||||
{
|
||||
/* Get out */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Done */
|
||||
break;
|
||||
|
||||
/* I/O Space */
|
||||
case 1:
|
||||
|
||||
/* Loop all bus I/O memory */
|
||||
for (Range = &BusHandler->BusAddresses->IO;
|
||||
Range;
|
||||
Range = Range->Next)
|
||||
{
|
||||
/* Check if it's in a valid range */
|
||||
if ((BusAddress.QuadPart >= Range->Base) &&
|
||||
(BusAddress.QuadPart <= Range->Limit))
|
||||
{
|
||||
/* Get out */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Done */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if we found a range */
|
||||
if (Range)
|
||||
{
|
||||
/* Do the translation and return the kind of address space this is */
|
||||
TranslatedAddress->QuadPart = BusAddress.QuadPart + Range->SystemBase;
|
||||
if ((TranslatedAddress->QuadPart != BusAddress.QuadPart) ||
|
||||
(*AddressSpace != Range->SystemAddressSpace))
|
||||
{
|
||||
/* Different than what the old HAL would do */
|
||||
DPRINT1("Translation of %I64x is %I64x %s\n",
|
||||
BusAddress.QuadPart, TranslatedAddress->QuadPart,
|
||||
Range->SystemAddressSpace ? "In I/O Space" : "In RAM");
|
||||
}
|
||||
*AddressSpace = Range->SystemAddressSpace;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Nothing found */
|
||||
DPRINT1("Translation of %I64x failed!\n", BusAddress.QuadPart);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpGetRootInterruptVector(IN ULONG BusInterruptLevel,
|
||||
IN ULONG BusInterruptVector,
|
||||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
ULONG SystemVector;
|
||||
|
||||
/* Get the system vector */
|
||||
SystemVector = PRIMARY_VECTOR_BASE + BusInterruptLevel;
|
||||
|
||||
/* Validate it */
|
||||
if ((SystemVector < PRIMARY_VECTOR_BASE) || (SystemVector > PRIMARY_VECTOR_BASE + 27))
|
||||
{
|
||||
/* Invalid vector */
|
||||
DPRINT1("Vector %lx is too low or too high!\n", SystemVector);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return the IRQL and affinity */
|
||||
*Irql = (PRIMARY_VECTOR_BASE + 27) - SystemVector;
|
||||
*Affinity = HalpDefaultInterruptAffinity;
|
||||
ASSERT(HalpDefaultInterruptAffinity);
|
||||
|
||||
/* Return the vector */
|
||||
return SystemVector;
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpGetSystemInterruptVector(IN PBUS_HANDLER BusHandler,
|
||||
|
@ -38,10 +148,17 @@ HalpGetSystemInterruptVector(IN PBUS_HANDLER BusHandler,
|
|||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
ULONG Vector;
|
||||
|
||||
/* Get the root vector */
|
||||
DPRINT1("SYSTEM GetVector\n");
|
||||
while (TRUE);
|
||||
return 0;
|
||||
Vector = HalpGetRootInterruptVector(BusInterruptLevel,
|
||||
BusInterruptVector,
|
||||
Irql,
|
||||
Affinity);
|
||||
|
||||
/* Check if the vector is owned by the HAL and fail if it is */
|
||||
if (HalpIDTUsageFlags[Vector].Flags & IDT_REGISTERED) DPRINT1("Vector %lx is ALREADY IN USE!\n", Vector);
|
||||
return (HalpIDTUsageFlags[Vector].Flags & IDT_REGISTERED) ? 0 : Vector;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -82,7 +82,6 @@ HalpRegisterInternalBusHandlers(VOID)
|
|||
InterfaceTypeUndefined,
|
||||
0,
|
||||
0);
|
||||
DPRINT1("Registering Internal Bus: %p\n", Bus);
|
||||
if (Bus)
|
||||
{
|
||||
/* Set it up */
|
||||
|
@ -97,7 +96,6 @@ HalpRegisterInternalBusHandlers(VOID)
|
|||
InterfaceTypeUndefined,
|
||||
0,
|
||||
0);
|
||||
DPRINT1("Registering CMOS Bus: %p\n", Bus);
|
||||
if (Bus)
|
||||
{
|
||||
/* Set it up */
|
||||
|
@ -112,7 +110,6 @@ HalpRegisterInternalBusHandlers(VOID)
|
|||
InterfaceTypeUndefined,
|
||||
0,
|
||||
0);
|
||||
DPRINT1("Registering CMOS Bus: %p\n", Bus);
|
||||
if (Bus)
|
||||
{
|
||||
/* Set it up */
|
||||
|
@ -127,7 +124,6 @@ HalpRegisterInternalBusHandlers(VOID)
|
|||
Internal,
|
||||
0,
|
||||
0);
|
||||
DPRINT1("Registering ISA Bus: %p\n", Bus);
|
||||
if (Bus)
|
||||
{
|
||||
/* Set it up */
|
||||
|
@ -654,7 +650,6 @@ HalpFixupPciSupportedRanges(IN ULONG BusCount)
|
|||
DPRINT("Warning: Bus addresses not being optimized!\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -828,6 +823,7 @@ HalpDebugPciBus(IN ULONG i,
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -1130,76 +1126,135 @@ HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath,
|
|||
IN ULONG SlotNumber,
|
||||
IN OUT PCM_RESOURCE_LIST *AllocatedResources)
|
||||
{
|
||||
BUS_HANDLER BusHandler;
|
||||
PBUS_HANDLER Handler;
|
||||
NTSTATUS Status;
|
||||
PAGED_CODE();
|
||||
DPRINT1("Slot assignment for %d on bus %d\n", BusType, BusNumber);
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HalReferenceHandlerForBus(BusType, BusNumber);
|
||||
if (!Handler) return STATUS_NOT_FOUND;
|
||||
|
||||
/* Only PCI is supported */
|
||||
if (BusType != PCIBus) return STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
/* Setup fake PCI Bus handler */
|
||||
RtlCopyMemory(&BusHandler, &HalpFakePciBusHandler, sizeof(BUS_HANDLER));
|
||||
BusHandler.BusNumber = BusNumber;
|
||||
|
||||
/* Call the PCI function */
|
||||
return HalpAssignPCISlotResources(&BusHandler,
|
||||
&BusHandler,
|
||||
RegistryPath,
|
||||
DriverClassName,
|
||||
DriverObject,
|
||||
DeviceObject,
|
||||
SlotNumber,
|
||||
AllocatedResources);
|
||||
/* Do the assignment */
|
||||
Status = Handler->AssignSlotResources(Handler,
|
||||
Handler,
|
||||
RegistryPath,
|
||||
DriverClassName,
|
||||
DriverObject,
|
||||
DeviceObject,
|
||||
SlotNumber,
|
||||
AllocatedResources);
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Status;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalpTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
|
||||
IN ULONG BusNumber,
|
||||
IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress)
|
||||
{
|
||||
/* Translation is easy */
|
||||
TranslatedAddress->QuadPart = BusAddress.QuadPart;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpGetSystemInterruptVector_Acpi(IN ULONG BusNumber,
|
||||
IN ULONG BusInterruptLevel,
|
||||
IN ULONG BusInterruptVector,
|
||||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
ULONG Vector = IRQ2VECTOR(BusInterruptLevel);
|
||||
*Irql = (KIRQL)VECTOR2IRQL(Vector);
|
||||
*Affinity = 0xFFFFFFFF;
|
||||
return Vector;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress,
|
||||
HaliFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress,
|
||||
IN OUT PULONG_PTR Context,
|
||||
IN BOOLEAN NextBus)
|
||||
{
|
||||
PHAL_BUS_HANDLER BusHandler;
|
||||
PBUS_HANDLER Handler;
|
||||
PLIST_ENTRY NextEntry;
|
||||
ULONG ContextValue;
|
||||
|
||||
/* Make sure we have a context */
|
||||
if (!Context) return FALSE;
|
||||
|
||||
/* If we have data in the context, then this shouldn't be a new lookup */
|
||||
if ((*Context) && (NextBus == TRUE)) return FALSE;
|
||||
|
||||
/* Return bus data */
|
||||
TranslatedAddress->QuadPart = BusAddress.QuadPart;
|
||||
|
||||
/* Set context value and return success */
|
||||
*Context = 1;
|
||||
ASSERT((*Context) || (NextBus == TRUE));
|
||||
|
||||
/* Read the context */
|
||||
ContextValue = *Context;
|
||||
|
||||
/* Find the bus handler */
|
||||
Handler = HalpContextToBusHandler(ContextValue);
|
||||
if (!Handler) return FALSE;
|
||||
|
||||
/* Check if this is an ongoing lookup */
|
||||
if (NextBus)
|
||||
{
|
||||
/* Get the HAL bus handler */
|
||||
BusHandler = CONTAINING_RECORD(Handler, HAL_BUS_HANDLER, Handler);
|
||||
NextEntry = &BusHandler->AllHandlers;
|
||||
|
||||
/* Get the next one if we were already with one */
|
||||
if (ContextValue) NextEntry = NextEntry->Flink;
|
||||
|
||||
/* Start scanning */
|
||||
while (TRUE)
|
||||
{
|
||||
/* Check if this is the last one */
|
||||
if (NextEntry == &HalpAllBusHandlers)
|
||||
{
|
||||
/* Quit */
|
||||
*Context = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Call this translator */
|
||||
BusHandler = CONTAINING_RECORD(NextEntry, HAL_BUS_HANDLER, AllHandlers);
|
||||
if (HalTranslateBusAddress(BusHandler->Handler.InterfaceType,
|
||||
BusHandler->Handler.BusNumber,
|
||||
BusAddress,
|
||||
AddressSpace,
|
||||
TranslatedAddress)) break;
|
||||
|
||||
/* Try the next one */
|
||||
NextEntry = NextEntry->Flink;
|
||||
}
|
||||
|
||||
/* If we made it, we're done */
|
||||
*Context = (ULONG_PTR)Handler;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Try the first one through */
|
||||
if (!HalTranslateBusAddress(Handler->InterfaceType,
|
||||
Handler->BusNumber,
|
||||
BusAddress,
|
||||
AddressSpace,
|
||||
TranslatedAddress)) return FALSE;
|
||||
|
||||
/* Remember for next time */
|
||||
*Context = (ULONG_PTR)Handler;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HaliTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
|
||||
IN ULONG BusNumber,
|
||||
IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress)
|
||||
{
|
||||
PBUS_HANDLER Handler;
|
||||
BOOLEAN Status;
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
|
||||
if (!(Handler) || !(Handler->TranslateBusAddress))
|
||||
{
|
||||
DPRINT1("No translator!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Do the assignment */
|
||||
Status = Handler->TranslateBusAddress(Handler,
|
||||
Handler,
|
||||
BusAddress,
|
||||
AddressSpace,
|
||||
TranslatedAddress);
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* PUBLIC FUNCTIONS **********************************************************/
|
||||
|
||||
/*
|
||||
|
@ -1207,10 +1262,25 @@ HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress,
|
|||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HalAdjustResourceList(IN PCM_RESOURCE_LIST Resources)
|
||||
HalAdjustResourceList(IN PIO_RESOURCE_REQUIREMENTS_LIST *ResourceList)
|
||||
{
|
||||
/* Deprecated, return success */
|
||||
return STATUS_SUCCESS;
|
||||
PBUS_HANDLER Handler;
|
||||
ULONG Status;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HalReferenceHandlerForBus((*ResourceList)->InterfaceType,
|
||||
(*ResourceList)->BusNumber);
|
||||
if (!Handler) return STATUS_SUCCESS;
|
||||
|
||||
/* Do the assignment */
|
||||
Status = Handler->AdjustResourceList(Handler,
|
||||
Handler,
|
||||
ResourceList);
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1227,6 +1297,8 @@ HalAssignSlotResources(IN PUNICODE_STRING RegistryPath,
|
|||
IN ULONG SlotNumber,
|
||||
IN OUT PCM_RESOURCE_LIST *AllocatedResources)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
/* Check the bus type */
|
||||
if (BusType != PCIBus)
|
||||
{
|
||||
|
@ -1286,38 +1358,24 @@ HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType,
|
|||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
BUS_HANDLER BusHandler;
|
||||
|
||||
/* Look as the bus type */
|
||||
if (BusDataType == Cmos)
|
||||
{
|
||||
/* Call CMOS Function */
|
||||
return HalpGetCmosData(0, SlotNumber, Buffer, Length);
|
||||
}
|
||||
else if (BusDataType == EisaConfiguration)
|
||||
{
|
||||
/* FIXME: TODO */
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
else if ((BusDataType == PCIConfiguration) &&
|
||||
(HalpPCIConfigInitialized) &&
|
||||
((BusNumber >= HalpMinPciBus) && (BusNumber <= HalpMaxPciBus)))
|
||||
{
|
||||
/* Setup fake PCI Bus handler */
|
||||
RtlCopyMemory(&BusHandler, &HalpFakePciBusHandler, sizeof(BUS_HANDLER));
|
||||
BusHandler.BusNumber = BusNumber;
|
||||
|
||||
/* Call PCI function */
|
||||
return HalpGetPCIData(&BusHandler,
|
||||
&BusHandler,
|
||||
*(PPCI_SLOT_NUMBER)&SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
}
|
||||
|
||||
/* Invalid bus */
|
||||
return 0;
|
||||
PBUS_HANDLER Handler;
|
||||
ULONG Status;
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HaliReferenceHandlerForConfigSpace(BusDataType, BusNumber);
|
||||
if (!Handler) return 0;
|
||||
|
||||
/* Do the assignment */
|
||||
Status = Handler->GetBusData(Handler,
|
||||
Handler,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1332,12 +1390,38 @@ HalGetInterruptVector(IN INTERFACE_TYPE InterfaceType,
|
|||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
/* Call the system bus translator */
|
||||
return HalpGetSystemInterruptVector_Acpi(BusNumber,
|
||||
BusInterruptLevel,
|
||||
BusInterruptVector,
|
||||
Irql,
|
||||
Affinity);
|
||||
PBUS_HANDLER Handler;
|
||||
ULONG Vector;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Defaults */
|
||||
*Irql = 0;
|
||||
*Affinity = 0;
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
|
||||
if (!Handler) return 0;
|
||||
|
||||
/* Do the assignment */
|
||||
Vector = Handler->GetInterruptVector(Handler,
|
||||
Handler,
|
||||
BusInterruptLevel,
|
||||
BusInterruptVector,
|
||||
Irql,
|
||||
Affinity);
|
||||
if ((Vector != IRQ2VECTOR(BusInterruptLevel)) ||
|
||||
(*Irql != VECTOR2IRQL(IRQ2VECTOR(BusInterruptLevel))))
|
||||
{
|
||||
DPRINT1("Returning IRQL %lx, Vector %lx for Level/Vector: %lx/%lx\n",
|
||||
*Irql, Vector, BusInterruptLevel, BusInterruptVector);
|
||||
DPRINT1("Old HAL would've returned IRQL %lx and Vector %lx\n",
|
||||
VECTOR2IRQL(IRQ2VECTOR(BusInterruptLevel)),
|
||||
IRQ2VECTOR(BusInterruptLevel));
|
||||
}
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Vector;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1372,31 +1456,24 @@ HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType,
|
|||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
BUS_HANDLER BusHandler;
|
||||
|
||||
/* Look as the bus type */
|
||||
if (BusDataType == Cmos)
|
||||
{
|
||||
/* Call CMOS Function */
|
||||
return HalpSetCmosData(0, SlotNumber, Buffer, Length);
|
||||
}
|
||||
else if ((BusDataType == PCIConfiguration) && (HalpPCIConfigInitialized))
|
||||
{
|
||||
/* Setup fake PCI Bus handler */
|
||||
RtlCopyMemory(&BusHandler, &HalpFakePciBusHandler, sizeof(BUS_HANDLER));
|
||||
BusHandler.BusNumber = BusNumber;
|
||||
|
||||
/* Call PCI function */
|
||||
return HalpSetPCIData(&BusHandler,
|
||||
&BusHandler,
|
||||
*(PPCI_SLOT_NUMBER)&SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
}
|
||||
|
||||
/* Invalid bus */
|
||||
return 0;
|
||||
PBUS_HANDLER Handler;
|
||||
ULONG Status;
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HaliReferenceHandlerForConfigSpace(BusDataType, BusNumber);
|
||||
if (!Handler) return 0;
|
||||
|
||||
/* Do the assignment */
|
||||
Status = Handler->SetBusData(Handler,
|
||||
Handler,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1422,9 +1499,12 @@ HalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Translation is easy */
|
||||
TranslatedAddress->QuadPart = BusAddress.QuadPart;
|
||||
return TRUE;
|
||||
/* Call the bus handler */
|
||||
return HaliTranslateBusAddress(InterfaceType,
|
||||
BusNumber,
|
||||
BusAddress,
|
||||
AddressSpace,
|
||||
TranslatedAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -407,6 +407,26 @@ HalpRegisterPciDebuggingDeviceInfo(
|
|||
|
||||
/* LEGACY */
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HaliTranslateBusAddress(
|
||||
IN INTERFACE_TYPE InterfaceType,
|
||||
IN ULONG BusNumber,
|
||||
IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HaliFindBusAddressTranslation(
|
||||
IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress,
|
||||
IN OUT PULONG_PTR Context,
|
||||
IN BOOLEAN NextBus
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HalpAdjustPCIResourceList(IN PBUS_HANDLER BusHandler,
|
||||
|
@ -449,6 +469,19 @@ HalpInitBusHandler(
|
|||
VOID
|
||||
);
|
||||
|
||||
PBUS_HANDLER
|
||||
NTAPI
|
||||
HalpContextToBusHandler(
|
||||
IN ULONG_PTR ContextValue
|
||||
);
|
||||
|
||||
PBUS_HANDLER
|
||||
FASTCALL
|
||||
HaliReferenceHandlerForConfigSpace(
|
||||
IN BUS_DATA_TYPE ConfigType,
|
||||
IN ULONG BusNumber
|
||||
);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpNoBusData(
|
||||
|
@ -517,5 +550,6 @@ extern ULONG HalpBusType;
|
|||
extern BOOLEAN HalpPCIConfigInitialized;
|
||||
extern BUS_HANDLER HalpFakePciBusHandler;
|
||||
extern ULONG HalpMinPciBus, HalpMaxPciBus;
|
||||
extern LIST_ENTRY HalpAllBusHandlers;
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -816,3 +816,8 @@ extern KAFFINITY HalpActiveProcessors;
|
|||
extern BOOLEAN HalDisableFirmwareMapper;
|
||||
extern PWCHAR HalHardwareIdString;
|
||||
extern PWCHAR HalName;
|
||||
|
||||
extern KAFFINITY HalpDefaultInterruptAffinity;
|
||||
|
||||
extern IDTUsageFlags HalpIDTUsageFlags[MAXIMUM_IDTVECTOR];
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
KAFFINITY HalpActiveProcessors;
|
||||
KAFFINITY HalpActiveProcessors, HalpDefaultInterruptAffinity;
|
||||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
|
|
|
@ -417,6 +417,8 @@ extern "C" {
|
|||
WINCOMMCTRLAPI WINBOOL WINAPI ImageList_GetImageInfo(HIMAGELIST himl,int i,IMAGEINFO *pImageInfo);
|
||||
WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1,int i1,HIMAGELIST himl2,int i2,int dx,int dy);
|
||||
WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himl);
|
||||
WINCOMMCTRLAPI HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST himl, REFIID riid, void **ppv);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef NOHEADER
|
||||
|
@ -4447,11 +4449,16 @@ typedef struct tagTVDISPINFOEXW {
|
|||
|
||||
#define MCN_SELECT (MCN_FIRST+4)
|
||||
|
||||
#define MCS_DAYSTATE 0x1
|
||||
#define MCS_MULTISELECT 0x2
|
||||
#define MCS_WEEKNUMBERS 0x4
|
||||
#define MCS_NOTODAYCIRCLE 0x8
|
||||
#define MCS_NOTODAY 0x10
|
||||
#define MCS_DAYSTATE 0x0001
|
||||
#define MCS_MULTISELECT 0x0002
|
||||
#define MCS_WEEKNUMBERS 0x0004
|
||||
#define MCS_NOTODAYCIRCLE 0x0008
|
||||
#define MCS_NOTODAY 0x0010
|
||||
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
||||
#define MCS_NOTRAILINGDATES 0x0040
|
||||
#define MCS_SHORTDAYSOFWEEK 0x0080
|
||||
#define MCS_NOSELCHANGEONNAV 0x0100
|
||||
#endif
|
||||
|
||||
#define GMR_VISIBLE 0
|
||||
#define GMR_DAYSTATE 1
|
||||
|
|
|
@ -70,11 +70,13 @@ typedef struct
|
|||
{
|
||||
HANDLE ConsoleHandle;
|
||||
BOOL Unicode;
|
||||
WORD FullReadSize;
|
||||
WORD NrCharactersToRead;
|
||||
WORD NrCharactersRead;
|
||||
HANDLE EventHandle;
|
||||
ULONG NrCharactersRead;
|
||||
BYTE Buffer[0];
|
||||
PVOID Buffer;
|
||||
UNICODE_STRING ExeName;
|
||||
DWORD CtrlWakeupMask;
|
||||
DWORD ControlKeyState;
|
||||
} CSRSS_READ_CONSOLE, *PCSRSS_READ_CONSOLE;
|
||||
|
||||
typedef struct
|
||||
|
@ -515,7 +517,6 @@ typedef struct
|
|||
#define CSRSS_MAX_WRITE_CONSOLE (LPC_MAX_DATA_LENGTH - CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE))
|
||||
#define CSRSS_MAX_WRITE_CONSOLE_OUTPUT_CHAR (LPC_MAX_DATA_LENGTH - CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE_OUTPUT_CHAR))
|
||||
#define CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB (LPC_MAX_DATA_LENGTH - CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB))
|
||||
#define CSRSS_MAX_READ_CONSOLE (LPC_MAX_DATA_LENGTH - CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE))
|
||||
#define CSRSS_MAX_READ_CONSOLE_OUTPUT_CHAR (LPC_MAX_DATA_LENGTH - CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE_OUTPUT_CHAR))
|
||||
#define CSRSS_MAX_READ_CONSOLE_OUTPUT_ATTRIB (LPC_MAX_DATA_LENGTH - CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE_OUTPUT_ATTRIB))
|
||||
|
||||
|
|
|
@ -37,13 +37,18 @@ CSR_API(CsrReadConsole)
|
|||
|
||||
CharSize = (Request->Data.ReadConsoleRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR));
|
||||
|
||||
/* truncate length to CSRSS_MAX_READ_CONSOLE_REQUEST */
|
||||
nNumberOfCharsToRead = min(Request->Data.ReadConsoleRequest.NrCharactersToRead, CSRSS_MAX_READ_CONSOLE / CharSize);
|
||||
nNumberOfCharsToRead = Request->Data.ReadConsoleRequest.NrCharactersToRead;
|
||||
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
||||
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
||||
|
||||
Buffer = (PCHAR)Request->Data.ReadConsoleRequest.Buffer;
|
||||
UnicodeBuffer = (PWCHAR)Buffer;
|
||||
if (!Win32CsrValidateBuffer(ProcessData, Buffer, nNumberOfCharsToRead, CharSize))
|
||||
return STATUS_ACCESS_VIOLATION;
|
||||
|
||||
if (Request->Data.ReadConsoleRequest.NrCharactersRead * sizeof(WCHAR) > nNumberOfCharsToRead * CharSize)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
Status = ConioLockConsole(ProcessData, Request->Data.ReadConsoleRequest.ConsoleHandle,
|
||||
&Console, GENERIC_READ);
|
||||
if (! NT_SUCCESS(Status))
|
||||
|
@ -58,7 +63,7 @@ CSR_API(CsrReadConsole)
|
|||
if (Console->LineBuffer == NULL)
|
||||
{
|
||||
/* Starting a new line */
|
||||
Console->LineMaxSize = max(256, Request->Data.ReadConsoleRequest.FullReadSize);
|
||||
Console->LineMaxSize = max(256, nNumberOfCharsToRead);
|
||||
Console->LineBuffer = HeapAlloc(Win32CsrApiHeap, 0, Console->LineMaxSize * sizeof(WCHAR));
|
||||
if (Console->LineBuffer == NULL)
|
||||
{
|
||||
|
@ -66,9 +71,19 @@ CSR_API(CsrReadConsole)
|
|||
goto done;
|
||||
}
|
||||
Console->LineComplete = FALSE;
|
||||
Console->LineSize = 0;
|
||||
Console->LinePos = 0;
|
||||
Console->LineUpPressed = FALSE;
|
||||
Console->LineInsertToggle = 0;
|
||||
Console->LineWakeupMask = Request->Data.ReadConsoleRequest.CtrlWakeupMask;
|
||||
Console->LineSize = Request->Data.ReadConsoleRequest.NrCharactersRead;
|
||||
Console->LinePos = Console->LineSize;
|
||||
/* pre-filling the buffer is only allowed in the Unicode API,
|
||||
* so we don't need to worry about conversion */
|
||||
memcpy(Console->LineBuffer, Buffer, Console->LineSize * sizeof(WCHAR));
|
||||
if (Console->LineSize == Console->LineMaxSize)
|
||||
{
|
||||
Console->LineComplete = TRUE;
|
||||
Console->LinePos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we don't have a complete line yet, process the pending input */
|
||||
|
@ -87,6 +102,7 @@ CSR_API(CsrReadConsole)
|
|||
&& Input->InputEvent.Event.KeyEvent.bKeyDown)
|
||||
{
|
||||
LineInputKeyDown(Console, &Input->InputEvent.Event.KeyEvent);
|
||||
Request->Data.ReadConsoleRequest.ControlKeyState = Input->InputEvent.Event.KeyEvent.dwControlKeyState;
|
||||
}
|
||||
HeapFree(Win32CsrApiHeap, 0, Input);
|
||||
}
|
||||
|
@ -104,10 +120,11 @@ CSR_API(CsrReadConsole)
|
|||
}
|
||||
if (Console->LinePos == Console->LineSize)
|
||||
{
|
||||
/* Entire line has been read */
|
||||
HeapFree(Win32CsrApiHeap, 0, Console->LineBuffer);
|
||||
Console->LineBuffer = NULL;
|
||||
Status = STATUS_SUCCESS; /* Entire line has been read */
|
||||
}
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -142,12 +159,6 @@ done:
|
|||
Request->Data.ReadConsoleRequest.NrCharactersRead = i;
|
||||
ConioUnlockConsole(Console);
|
||||
|
||||
if (CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE) + i * CharSize > sizeof(CSR_API_MESSAGE))
|
||||
{
|
||||
Request->Header.u1.s1.TotalLength = CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE) + i * CharSize;
|
||||
Request->Header.u1.s1.DataLength = Request->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -355,6 +366,12 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
|
|||
current_entry = current_entry->Flink;
|
||||
ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current);
|
||||
}
|
||||
if (Console->LineBuffer && !Console->LineComplete)
|
||||
{
|
||||
/* Line input is in progress; end it */
|
||||
Console->LinePos = Console->LineSize = 0;
|
||||
Console->LineComplete = TRUE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,8 @@ typedef struct tagCSRSS_CONSOLE
|
|||
WORD LinePos; /* current position within line */
|
||||
BOOLEAN LineComplete; /* user pressed enter, ready to send back to client */
|
||||
BOOLEAN LineUpPressed;
|
||||
BOOLEAN LineInsertToggle; /* replace character over cursor instead of inserting */
|
||||
ULONG LineWakeupMask; /* bitmap of which control characters will end line input */
|
||||
LIST_ENTRY HistoryBuffers;
|
||||
WORD HistoryBufferSize; /* size for newly created history buffers */
|
||||
WORD NumberOfHistoryBuffers; /* maximum number of history buffers allowed */
|
||||
|
@ -192,6 +194,7 @@ NTSTATUS FASTCALL ConioWriteConsole(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER
|
|||
CHAR *Buffer, DWORD Length, BOOL Attrib);
|
||||
NTSTATUS FASTCALL CsrInitConsoleScreenBuffer(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buffer);
|
||||
VOID WINAPI ConioDeleteScreenBuffer(PCSRSS_SCREEN_BUFFER Buffer);
|
||||
DWORD FASTCALL ConioEffectiveCursorSize(PCSRSS_CONSOLE Console, DWORD Scale);
|
||||
|
||||
CSR_API(CsrWriteConsole);
|
||||
CSR_API(CsrGetScreenBufferInfo);
|
||||
|
|
|
@ -865,6 +865,16 @@ CSR_API(CsrFillOutputAttrib)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
DWORD FASTCALL
|
||||
ConioEffectiveCursorSize(PCSRSS_CONSOLE Console, DWORD Scale)
|
||||
{
|
||||
DWORD Size = (Console->ActiveBuffer->CursorInfo.dwSize * Scale + 99) / 100;
|
||||
/* If line input in progress, perhaps adjust for insert toggle */
|
||||
if (Console->LineBuffer && !Console->LineComplete && Console->LineInsertToggle)
|
||||
return (Size * 2 <= Scale) ? (Size * 2) : (Size / 2);
|
||||
return Size;
|
||||
}
|
||||
|
||||
CSR_API(CsrGetCursorInfo)
|
||||
{
|
||||
PCSRSS_SCREEN_BUFFER Buff;
|
||||
|
|
|
@ -946,11 +946,7 @@ GuiConsolePaint(PCSRSS_CONSOLE Console,
|
|||
if (LeftChar <= CursorX && CursorX <= RightChar &&
|
||||
TopLine <= CursorY && CursorY <= BottomLine)
|
||||
{
|
||||
CursorHeight = (GuiData->CharHeight * Buff->CursorInfo.dwSize) / 100;
|
||||
if (CursorHeight < 1)
|
||||
{
|
||||
CursorHeight = 1;
|
||||
}
|
||||
CursorHeight = ConioEffectiveCursorSize(Console, GuiData->CharHeight);
|
||||
From = ConioCoordToPointer(Buff, Buff->CurrentX, Buff->CurrentY) + 1;
|
||||
|
||||
if (*From != DEFAULT_ATTRIB)
|
||||
|
|
|
@ -459,6 +459,11 @@ LineInputKeyDown(PCSRSS_CONSOLE Console, KEY_EVENT_RECORD *KeyEvent)
|
|||
LineInputEdit(Console, 0, 1, &Entry.Buffer[Pos]);
|
||||
}
|
||||
return;
|
||||
case VK_INSERT:
|
||||
/* Toggle between insert and overstrike */
|
||||
Console->LineInsertToggle = !Console->LineInsertToggle;
|
||||
ConioSetCursorInfo(Console, Console->ActiveBuffer);
|
||||
return;
|
||||
case VK_DELETE:
|
||||
/* Remove character to right of cursor */
|
||||
if (Pos != Console->LineSize)
|
||||
|
@ -555,7 +560,12 @@ LineInputKeyDown(PCSRSS_CONSOLE Console, KEY_EVENT_RECORD *KeyEvent)
|
|||
Console->LineBuffer[Console->LineSize++] = L'\r';
|
||||
if (Console->Mode & ENABLE_ECHO_INPUT)
|
||||
ConioWriteConsole(Console, Console->ActiveBuffer, "\r", 1, TRUE);
|
||||
if (Console->Mode & ENABLE_PROCESSED_INPUT)
|
||||
|
||||
/* Add \n if processed input. There should usually be room for it,
|
||||
* but an exception to the rule exists: the buffer could have been
|
||||
* pre-filled with LineMaxSize - 1 characters. */
|
||||
if (Console->Mode & ENABLE_PROCESSED_INPUT &&
|
||||
Console->LineSize < Console->LineMaxSize)
|
||||
{
|
||||
Console->LineBuffer[Console->LineSize++] = L'\n';
|
||||
if (Console->Mode & ENABLE_ECHO_INPUT)
|
||||
|
@ -566,8 +576,21 @@ LineInputKeyDown(PCSRSS_CONSOLE Console, KEY_EVENT_RECORD *KeyEvent)
|
|||
}
|
||||
else if (KeyEvent->uChar.UnicodeChar != L'\0')
|
||||
{
|
||||
/* Normal character */
|
||||
LineInputEdit(Console, 0, 1, &KeyEvent->uChar.UnicodeChar);
|
||||
if (KeyEvent->uChar.UnicodeChar < 0x20 &&
|
||||
Console->LineWakeupMask & (1 << KeyEvent->uChar.UnicodeChar))
|
||||
{
|
||||
/* Control key client wants to handle itself (e.g. for tab completion) */
|
||||
Console->LineBuffer[Console->LineSize++] = L' ';
|
||||
Console->LineBuffer[Console->LinePos] = KeyEvent->uChar.UnicodeChar;
|
||||
Console->LineComplete = TRUE;
|
||||
Console->LinePos = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Normal character */
|
||||
BOOL Overstrike = Console->LineInsertToggle && Console->LinePos != Console->LineSize;
|
||||
LineInputEdit(Console, Overstrike, 1, &KeyEvent->uChar.UnicodeChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -208,6 +208,7 @@ TuiWriteStream(PCSRSS_CONSOLE Console, SMALL_RECT *Region, LONG CursorStartX, LO
|
|||
static BOOL WINAPI
|
||||
TuiSetCursorInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff)
|
||||
{
|
||||
CONSOLE_CURSOR_INFO Info;
|
||||
DWORD BytesReturned;
|
||||
|
||||
if (ActiveConsole->ActiveBuffer != Buff)
|
||||
|
@ -215,9 +216,11 @@ TuiSetCursorInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
Info.dwSize = ConioEffectiveCursorSize(Console, 100);
|
||||
Info.bVisible = Buff->CursorInfo.bVisible;
|
||||
|
||||
if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_SET_CURSOR_INFO,
|
||||
&Buff->CursorInfo, sizeof(Buff->CursorInfo), NULL, 0,
|
||||
&BytesReturned, NULL))
|
||||
&Info, sizeof(Info), NULL, 0, &BytesReturned, NULL))
|
||||
{
|
||||
DPRINT1( "Failed to set cursor info\n" );
|
||||
return FALSE;
|
||||
|
|