mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 18:53:33 +00:00
Sync to Wine-20040408:
Robert Shearman <R.J.Shearman@warwick.ac.uk> - Add cursor resource. - Implement TB_MOVEBUTTON. - Implement drag customise. - Send TBN_TOOLBARCHANGE and TBN_DELETINGBUTTON. - Spelling fixes. - Fix subclassing to support nested messages. - Document control completeness. - Remove unneeded include. - Fix TEXT define. - Fix tabs. - Small optimisation in DrawInsert. - Fix LButtonDown from previous change. - Don't use BF_ADJUST flag for dropdown buttons. - Fix LButtonDblClk. - Fix SetBitmapSize. - Fix SetButtonInfo. - Documentation update. - Better hot item handling. - Fix DrawMasked to always use the right image list and bitmap index. - Document completeness. - Finish tooltip support. - Honour WM_SETREDRAW. - Fix all calls of InvalidateRect. - Implement TB_LOADIMAGES, TB_MAPACCELERATOR{A,W}, TB_MARKBUTTON and undocumented message 0x460. - Better debug output of undocumented message 0x45D. - Add support for a toolbar global iListGap. - Make TOOLBAR_CalcToolbar and TOOLBAR_DrawButton not rely on "magic numbers" and calculate sizes and positions more like native. - Rewrite drawing code. - TTM_TRACKACTIVATE can have NULL lParam when deactivating. - Factor out common code from TOOLTIPS_DelTool{A,W}. - Update all indices correctly after delete. - Unicode notification detection should be local to each tool. - Implement TTN_GETDISPINFOW notification. Alexandre Julliard - Do not kill the animation thread with TerminateThread, let it finish properly. - Fixed a couple of races with the animation thread. Juan Lang <juan_lang@yahoo.com> - Prevent negative coords for line, turn off redraw when initializing, document one difference in native/builtin behavior. Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Make sure the rebar size is above a minimum. - Make sure to take account of hidden bands during layout. - Don't calculate the redundant and unused REBAR_ROW structures. Filip Navara <xnavara@volny.cz> - Support for RBBS_HIDETITLE style. Ulrich Czekalla <ulrich@codeweavers.com> - Fix rebar band insertion and non-client calculation in pager control. Huw Davies <huw@codeweavers.com> - Fix dumb error from rev. 1.158. - When setting the buddy to 0 then we must still resize the updown control. - Added CS_HREDRAW. Ge van Geldorp <gvg@reactos.com> - Explicitly ask for image list with screen depth as ILC_COLOR can/will limit the depth to 4bpp now. svn path=/trunk/; revision=9147
This commit is contained in:
parent
b5c06d7dbd
commit
5f3c9e9df2
18 changed files with 1514 additions and 985 deletions
|
@ -16,6 +16,7 @@ idb_view_small.bmp
|
||||||
idc_copy.cur
|
idc_copy.cur
|
||||||
idc_divider.cur
|
idc_divider.cur
|
||||||
idc_divideropen.cur
|
idc_divideropen.cur
|
||||||
|
idc_movebutton.cur
|
||||||
idi_dragarrow.ico
|
idi_dragarrow.ico
|
||||||
idt_check.bmp
|
idt_check.bmp
|
||||||
comctl32.spec.def
|
comctl32.spec.def
|
||||||
|
|
|
@ -49,6 +49,7 @@ RC_BINARIES = \
|
||||||
idc_copy.cur \
|
idc_copy.cur \
|
||||||
idc_divider.cur \
|
idc_divider.cur \
|
||||||
idc_divideropen.cur \
|
idc_divideropen.cur \
|
||||||
|
idc_movebutton.cur \
|
||||||
idi_dragarrow.ico \
|
idi_dragarrow.ico \
|
||||||
idt_check.bmp
|
idt_check.bmp
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ typedef struct
|
||||||
LPVOID outdata;
|
LPVOID outdata;
|
||||||
/* data for the background mechanism */
|
/* data for the background mechanism */
|
||||||
CRITICAL_SECTION cs;
|
CRITICAL_SECTION cs;
|
||||||
|
HANDLE hStopEvent;
|
||||||
HANDLE hThread;
|
HANDLE hThread;
|
||||||
UINT uTimer;
|
UINT uTimer;
|
||||||
/* data for playing the file */
|
/* data for playing the file */
|
||||||
|
@ -145,9 +146,17 @@ static LRESULT ANIMATE_DoStop(ANIMATE_INFO *infoPtr)
|
||||||
/* should stop playing */
|
/* should stop playing */
|
||||||
if (infoPtr->hThread)
|
if (infoPtr->hThread)
|
||||||
{
|
{
|
||||||
if (!TerminateThread(infoPtr->hThread,0))
|
HANDLE handle = infoPtr->hThread;
|
||||||
WARN("could not destroy animation thread!\n");
|
|
||||||
infoPtr->hThread = 0;
|
TRACE("stopping animation thread\n");
|
||||||
|
SetEvent( infoPtr->hStopEvent );
|
||||||
|
LeaveCriticalSection(&infoPtr->cs); /* leave it a chance to run */
|
||||||
|
WaitForSingleObject( handle, INFINITE );
|
||||||
|
TRACE("animation thread stopped\n");
|
||||||
|
EnterCriticalSection(&infoPtr->cs);
|
||||||
|
CloseHandle( infoPtr->hThread );
|
||||||
|
CloseHandle( infoPtr->hStopEvent );
|
||||||
|
infoPtr->hThread = 0;
|
||||||
}
|
}
|
||||||
if (infoPtr->uTimer) {
|
if (infoPtr->uTimer) {
|
||||||
KillTimer(infoPtr->hwndSelf, infoPtr->uTimer);
|
KillTimer(infoPtr->hwndSelf, infoPtr->uTimer);
|
||||||
|
@ -378,33 +387,20 @@ static LRESULT ANIMATE_DrawFrame(ANIMATE_INFO* infoPtr)
|
||||||
static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
|
static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
|
||||||
{
|
{
|
||||||
ANIMATE_INFO* infoPtr = (ANIMATE_INFO*)ptr_;
|
ANIMATE_INFO* infoPtr = (ANIMATE_INFO*)ptr_;
|
||||||
HDC hDC;
|
HANDLE event;
|
||||||
|
DWORD timeout;
|
||||||
if(!infoPtr)
|
|
||||||
{
|
|
||||||
WARN("animation structure undefined!\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
if(GetWindowLongA(infoPtr->hwndSelf, GWL_STYLE) & ACS_TRANSPARENT)
|
|
||||||
{
|
|
||||||
hDC = GetDC(infoPtr->hwndSelf);
|
|
||||||
/* sometimes the animation window will be destroyed in between
|
|
||||||
* by the main program, so a ReleaseDC() error msg is possible */
|
|
||||||
infoPtr->hbrushBG = (HBRUSH)SendMessageA(infoPtr->hwndNotify,
|
|
||||||
WM_CTLCOLORSTATIC, (WPARAM)hDC,
|
|
||||||
(LPARAM)infoPtr->hwndSelf);
|
|
||||||
ReleaseDC(infoPtr->hwndSelf,hDC);
|
|
||||||
}
|
|
||||||
|
|
||||||
EnterCriticalSection(&infoPtr->cs);
|
EnterCriticalSection(&infoPtr->cs);
|
||||||
ANIMATE_DrawFrame(infoPtr);
|
ANIMATE_DrawFrame(infoPtr);
|
||||||
|
timeout = infoPtr->mah.dwMicroSecPerFrame;
|
||||||
|
event = infoPtr->hStopEvent;
|
||||||
LeaveCriticalSection(&infoPtr->cs);
|
LeaveCriticalSection(&infoPtr->cs);
|
||||||
|
|
||||||
/* time is in microseconds, we should convert it to milliseconds */
|
/* time is in microseconds, we should convert it to milliseconds */
|
||||||
Sleep((infoPtr->mah.dwMicroSecPerFrame+500)/1000);
|
if (WaitForSingleObject( event, (timeout+500)/1000) == WAIT_OBJECT_0)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -445,13 +441,22 @@ static LRESULT ANIMATE_Play(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
} else {
|
} else {
|
||||||
DWORD threadID;
|
DWORD threadID;
|
||||||
|
|
||||||
|
if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
|
||||||
|
{
|
||||||
|
HDC hDC = GetDC(hWnd);
|
||||||
|
infoPtr->hbrushBG = (HBRUSH)SendMessageA(infoPtr->hwndNotify,
|
||||||
|
WM_CTLCOLORSTATIC, 0, (LPARAM)hWnd);
|
||||||
|
ReleaseDC(hWnd,hDC);
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Using an animation thread\n");
|
TRACE("Using an animation thread\n");
|
||||||
|
infoPtr->hStopEvent = CreateEventW( NULL, TRUE, FALSE, NULL );
|
||||||
infoPtr->hThread = CreateThread(0,0,ANIMATE_AnimationThread,(LPVOID)infoPtr, 0, &threadID);
|
infoPtr->hThread = CreateThread(0,0,ANIMATE_AnimationThread,(LPVOID)infoPtr, 0, &threadID);
|
||||||
if(!infoPtr->hThread)
|
if(!infoPtr->hThread)
|
||||||
{
|
{
|
||||||
ERR("Could not create animation thread!\n");
|
ERR("Could not create animation thread!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* This code was audited for completeness against the documented features
|
* This code was audited for completeness against the documented features
|
||||||
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, we belive this code to be complete, as per
|
* Unless otherwise noted, we believe this code to be complete, as per
|
||||||
* the specification mentioned above.
|
* the specification mentioned above.
|
||||||
* If you discover missing features, or bugs, please note them below.
|
* If you discover missing features, or bugs, please note them below.
|
||||||
*
|
*
|
||||||
|
|
|
@ -106,6 +106,7 @@ extern HBRUSH COMCTL32_hPattern55AABrush;
|
||||||
#define IDI_DRAGARROW 501
|
#define IDI_DRAGARROW 501
|
||||||
#define IDC_COPY 502
|
#define IDC_COPY 502
|
||||||
|
|
||||||
|
#define IDC_MOVEBUTTON 1
|
||||||
|
|
||||||
/* HOTKEY internal strings */
|
/* HOTKEY internal strings */
|
||||||
#define HKY_NONE 2048
|
#define HKY_NONE 2048
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* This code was audited for completeness against the documented features
|
* This code was audited for completeness against the documented features
|
||||||
* of Comctl32.dll version 6.0 on Oct. 21, 2002, by Christian Neumair.
|
* of Comctl32.dll version 6.0 on Oct. 21, 2002, by Christian Neumair.
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, we belive this code to be complete, as per
|
* Unless otherwise noted, we believe this code to be complete, as per
|
||||||
* the specification mentioned above.
|
* the specification mentioned above.
|
||||||
* If you discover missing features, or bugs, please note them below.
|
* If you discover missing features, or bugs, please note them below.
|
||||||
*
|
*
|
||||||
|
@ -114,6 +114,7 @@ extern void TREEVIEW_Unregister(void);
|
||||||
extern void UPDOWN_Register(void);
|
extern void UPDOWN_Register(void);
|
||||||
extern void UPDOWN_Unregister(void);
|
extern void UPDOWN_Unregister(void);
|
||||||
|
|
||||||
|
static LRESULT WINAPI SubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
LPSTR COMCTL32_aSubclass = NULL;
|
LPSTR COMCTL32_aSubclass = NULL;
|
||||||
HMODULE COMCTL32_hModule = 0;
|
HMODULE COMCTL32_hModule = 0;
|
||||||
|
@ -1108,10 +1109,10 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
||||||
/* set window procedure to our own and save the current one */
|
/* set window procedure to our own and save the current one */
|
||||||
if (IsWindowUnicode (hWnd))
|
if (IsWindowUnicode (hWnd))
|
||||||
stack->origproc = (WNDPROC)SetWindowLongW (hWnd, GWL_WNDPROC,
|
stack->origproc = (WNDPROC)SetWindowLongW (hWnd, GWL_WNDPROC,
|
||||||
(LONG)DefSubclassProc);
|
(LONG)SubclassWndProc);
|
||||||
else
|
else
|
||||||
stack->origproc = (WNDPROC)SetWindowLongA (hWnd, GWL_WNDPROC,
|
stack->origproc = (WNDPROC)SetWindowLongA (hWnd, GWL_WNDPROC,
|
||||||
(LONG)DefSubclassProc);
|
(LONG)SubclassWndProc);
|
||||||
} else {
|
} else {
|
||||||
WNDPROC current;
|
WNDPROC current;
|
||||||
if (IsWindowUnicode (hWnd))
|
if (IsWindowUnicode (hWnd))
|
||||||
|
@ -1119,7 +1120,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
||||||
else
|
else
|
||||||
current = (WNDPROC)GetWindowLongA (hWnd, GWL_WNDPROC);
|
current = (WNDPROC)GetWindowLongA (hWnd, GWL_WNDPROC);
|
||||||
|
|
||||||
if (current != DefSubclassProc) {
|
if (current != SubclassWndProc) {
|
||||||
ERR ("Application has subclassed with our procedure, then manually, then with us again. The current implementation can't handle this.\n");
|
ERR ("Application has subclassed with our procedure, then manually, then with us again. The current implementation can't handle this.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1262,6 +1263,33 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SubclassWndProc (internal)
|
||||||
|
*
|
||||||
|
* Window procedure for all subclassed windows.
|
||||||
|
* Saves the current subclassing stack position to support nested messages
|
||||||
|
*/
|
||||||
|
|
||||||
|
static LRESULT WINAPI SubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LPSUBCLASS_INFO stack;
|
||||||
|
int stackpos;
|
||||||
|
LRESULT ret;
|
||||||
|
|
||||||
|
/* retrieve our little stack from the Properties */
|
||||||
|
stack = (LPSUBCLASS_INFO)GetPropA (hWnd, COMCTL32_aSubclass);
|
||||||
|
if (!stack) {
|
||||||
|
ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
stackpos = stack->stackpos;
|
||||||
|
stack->stackpos = stack->stacknum;
|
||||||
|
ret = DefSubclassProc(hWnd,uMsg,wParam,lParam);
|
||||||
|
stack->stackpos = stackpos;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DefSubclassProc [COMCTL32.413]
|
* DefSubclassProc [COMCTL32.413]
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,6 +18,15 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
|
* NOTES
|
||||||
|
*
|
||||||
|
* This code was audited for completeness against the documented features
|
||||||
|
* of Comctl32.dll version 6.0 on Mar. 10, 2004, by Robert Shearman.
|
||||||
|
*
|
||||||
|
* Unless otherwise noted, we believe this code to be complete, as per
|
||||||
|
* the specification mentioned above.
|
||||||
|
* If you discover missing features or bugs please note them below.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -27,16 +36,15 @@
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "winnt.h"
|
|
||||||
#include "commctrl.h"
|
#include "commctrl.h"
|
||||||
#include "comctl32.h"
|
#include "comctl32.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||||
|
|
||||||
#ifndef TEXT
|
/* for compiler compatibility we only accept literal ASCII strings */
|
||||||
# define TEXT(string) string
|
#undef TEXT
|
||||||
#endif
|
#define TEXT(string) string
|
||||||
|
|
||||||
#define DRAGLIST_SUBCLASSID 0
|
#define DRAGLIST_SUBCLASSID 0
|
||||||
#define DRAGLIST_SCROLLPERIOD 200
|
#define DRAGLIST_SCROLLPERIOD 200
|
||||||
|
@ -50,17 +58,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||||
/* internal Wine specific data for the drag list control */
|
/* internal Wine specific data for the drag list control */
|
||||||
typedef struct _DRAGLISTDATA
|
typedef struct _DRAGLISTDATA
|
||||||
{
|
{
|
||||||
/* are we currently in dragging mode? */
|
/* are we currently in dragging mode? */
|
||||||
BOOL dragging;
|
BOOL dragging;
|
||||||
|
|
||||||
/* cursor to use as determined by DL_DRAGGING notification.
|
/* cursor to use as determined by DL_DRAGGING notification.
|
||||||
* NOTE: as we use LoadCursor we don't have to use DeleteCursor
|
* NOTE: as we use LoadCursor we don't have to use DeleteCursor
|
||||||
* when we are finished with it */
|
* when we are finished with it */
|
||||||
HCURSOR cursor;
|
HCURSOR cursor;
|
||||||
|
|
||||||
/* optimisation so that we don't have to load the cursor
|
/* optimisation so that we don't have to load the cursor
|
||||||
* all of the time whilst dragging */
|
* all of the time whilst dragging */
|
||||||
LRESULT last_dragging_response;
|
LRESULT last_dragging_response;
|
||||||
|
|
||||||
/* prevents flicker with drawing drag arrow */
|
/* prevents flicker with drawing drag arrow */
|
||||||
RECT last_drag_icon_rect;
|
RECT last_drag_icon_rect;
|
||||||
} DRAGLISTDATA;
|
} DRAGLISTDATA;
|
||||||
|
@ -259,6 +268,9 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
|
||||||
if (!GetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR*)&data))
|
if (!GetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR*)&data))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (nItem < 0)
|
||||||
|
SetRectEmpty(&rcDragIcon);
|
||||||
|
|
||||||
/* prevent flicker by only redrawing when necessary */
|
/* prevent flicker by only redrawing when necessary */
|
||||||
if (!EqualRect(&rcDragIcon, &data->last_drag_icon_rect))
|
if (!EqualRect(&rcDragIcon, &data->last_drag_icon_rect))
|
||||||
{
|
{
|
||||||
|
@ -266,6 +278,8 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
|
||||||
RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL,
|
RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL,
|
||||||
RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
|
RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
|
||||||
|
|
||||||
|
CopyRect(&data->last_drag_icon_rect, &rcDragIcon);
|
||||||
|
|
||||||
if (nItem >= 0)
|
if (nItem >= 0)
|
||||||
{
|
{
|
||||||
hdc = GetDC(hwndParent);
|
hdc = GetDC(hwndParent);
|
||||||
|
@ -275,7 +289,6 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
|
||||||
ReleaseDC(hwndParent, hdc);
|
ReleaseDC(hwndParent, hdc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CopyRect(&data->last_drag_icon_rect, &rcDragIcon);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -1153,7 +1153,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||||
BitBlt(hBlendMaskDC, 0, 0, cx, cy, hBlendMaskDC, 0, 0, NOTSRCCOPY);
|
BitBlt(hBlendMaskDC, 0, 0, cx, cy, hBlendMaskDC, 0, 0, NOTSRCCOPY);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* now apply blend to the current image given the BlendMask */
|
/* now apply blend to the current image given the BlendMask */
|
||||||
if (clrBlend == CLR_DEFAULT) clrBlend = GetSysColor (COLOR_HIGHLIGHT);
|
if (clrBlend == CLR_DEFAULT) clrBlend = GetSysColor (COLOR_HIGHLIGHT);
|
||||||
else if (clrBlend == CLR_NONE) clrBlend = GetTextColor (pimldp->hdcDst);
|
else if (clrBlend == CLR_NONE) clrBlend = GetTextColor (pimldp->hdcDst);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* This code was audited for completeness against the documented features
|
* This code was audited for completeness against the documented features
|
||||||
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, we belive this code to be complete, as per
|
* Unless otherwise noted, we believe this code to be complete, as per
|
||||||
* the specification mentioned above.
|
* the specification mentioned above.
|
||||||
* If you discover missing features, or bugs, please note them below.
|
* If you discover missing features, or bugs, please note them below.
|
||||||
*
|
*
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* This code was audited for completeness against the documented features
|
* This code was audited for completeness against the documented features
|
||||||
* of Comctl32.dll version 6.0 on Oct. 21, 2002, by Dimitrie O. Paun.
|
* of Comctl32.dll version 6.0 on Oct. 21, 2002, by Dimitrie O. Paun.
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, we belive this code to be complete, as per
|
* Unless otherwise noted, we believe this code to be complete, as per
|
||||||
* the specification mentioned above.
|
* the specification mentioned above.
|
||||||
* If you discover missing features, or bugs, please note them below.
|
* If you discover missing features, or bugs, please note them below.
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* This code was audited for completeness against the documented features
|
* This code was audited for completeness against the documented features
|
||||||
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, we belive this code to be complete, as per
|
* Unless otherwise noted, we believe this code to be complete, as per
|
||||||
* the specification mentioned above.
|
* the specification mentioned above.
|
||||||
* If you discover missing features, or bugs, please note them below.
|
* If you discover missing features, or bugs, please note them below.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1175,7 +1175,7 @@ static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheet
|
||||||
hwndControl = GetDlgItem(hwndDlg, IDC_SUNKEN_LINE);
|
hwndControl = GetDlgItem(hwndDlg, IDC_SUNKEN_LINE);
|
||||||
GetWindowRect(hwndControl, &rc);
|
GetWindowRect(hwndControl, &rc);
|
||||||
|
|
||||||
ptLine.x = 0;
|
ptLine.x = rc.left;
|
||||||
ptLine.y = rc.bottom;
|
ptLine.y = rc.bottom;
|
||||||
|
|
||||||
ScreenToClient(hwndDlg, &ptLine);
|
ScreenToClient(hwndDlg, &ptLine);
|
||||||
|
@ -1217,6 +1217,7 @@ static BOOL PROPSHEET_CreateTabControl(HWND hwndParent,
|
||||||
SendMessageW(hwndTabCtrl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
|
SendMessageW(hwndTabCtrl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SendMessageW(GetDlgItem(hwndTabCtrl, IDC_TABCONTROL), WM_SETREDRAW, 0, 0);
|
||||||
for (i = 0; i < nTabs; i++)
|
for (i = 0; i < nTabs; i++)
|
||||||
{
|
{
|
||||||
if ( psInfo->proppage[i].hasIcon )
|
if ( psInfo->proppage[i].hasIcon )
|
||||||
|
@ -1232,6 +1233,7 @@ static BOOL PROPSHEET_CreateTabControl(HWND hwndParent,
|
||||||
item.pszText = (LPWSTR) psInfo->proppage[i].pszText;
|
item.pszText = (LPWSTR) psInfo->proppage[i].pszText;
|
||||||
SendMessageW(hwndTabCtrl, TCM_INSERTITEMW, (WPARAM)i, (LPARAM)&item);
|
SendMessageW(hwndTabCtrl, TCM_INSERTITEMW, (WPARAM)i, (LPARAM)&item);
|
||||||
}
|
}
|
||||||
|
SendMessageW(GetDlgItem(hwndTabCtrl, IDC_TABCONTROL), WM_SETREDRAW, 1, 0);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2830,6 +2832,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
LPCPROPSHEETPAGEW ppshpage;
|
LPCPROPSHEETPAGEW ppshpage;
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
|
/* Using PropSheetInfoStr to store extra data doesn't match the native
|
||||||
|
* common control: native uses TCM_[GS]ETITEM
|
||||||
|
*/
|
||||||
SetPropW(hwnd, PropSheetInfoStr, (HANDLE)psInfo);
|
SetPropW(hwnd, PropSheetInfoStr, (HANDLE)psInfo);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -213,15 +213,10 @@ typedef struct
|
||||||
#define DRAW_BOTTOMSEP 0x00000020
|
#define DRAW_BOTTOMSEP 0x00000020
|
||||||
#define DRAW_CHEVRONHOT 0x00000040
|
#define DRAW_CHEVRONHOT 0x00000040
|
||||||
#define DRAW_CHEVRONPUSHED 0x00000080
|
#define DRAW_CHEVRONPUSHED 0x00000080
|
||||||
|
#define DRAW_LAST_IN_ROW 0x00000100
|
||||||
|
#define DRAW_FIRST_IN_ROW 0x00000200
|
||||||
#define NTF_INVALIDATE 0x01000000
|
#define NTF_INVALIDATE 0x01000000
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
INT istartband; /* index of first band in row */
|
|
||||||
INT iendband; /* index of last band in row */
|
|
||||||
} REBAR_ROW;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
COLORREF clrBk; /* background color */
|
COLORREF clrBk; /* background color */
|
||||||
|
@ -257,7 +252,6 @@ typedef struct
|
||||||
INT ichevronhotBand; /* last band that had a hot chevron */
|
INT ichevronhotBand; /* last band that had a hot chevron */
|
||||||
INT iGrabbedBand;/* band number of band whose gripper was grabbed */
|
INT iGrabbedBand;/* band number of band whose gripper was grabbed */
|
||||||
|
|
||||||
REBAR_ROW *rows; /* pointer to row indexes */
|
|
||||||
REBAR_BAND *bands; /* pointer to the array of rebar bands */
|
REBAR_BAND *bands; /* pointer to the array of rebar bands */
|
||||||
} REBAR_INFO;
|
} REBAR_INFO;
|
||||||
|
|
||||||
|
@ -305,6 +299,10 @@ typedef struct
|
||||||
/* either top or bottom */
|
/* either top or bottom */
|
||||||
#define REBAR_DIVIDER 2
|
#define REBAR_DIVIDER 2
|
||||||
|
|
||||||
|
/* minimium vertical height of a normal bar */
|
||||||
|
/* or minimum width of a CCS_VERT bar - from experiment on Win2k */
|
||||||
|
#define REBAR_MINSIZE 23
|
||||||
|
|
||||||
/* This is the increment that is used over the band height */
|
/* This is the increment that is used over the band height */
|
||||||
#define REBARSPACE(a) ((a->fStyle & RBBS_CHILDEDGE) ? 2*REBAR_DIVIDER : 0)
|
#define REBARSPACE(a) ((a->fStyle & RBBS_CHILDEDGE) ? 2*REBAR_DIVIDER : 0)
|
||||||
|
|
||||||
|
@ -675,11 +673,10 @@ static VOID
|
||||||
REBAR_Refresh (REBAR_INFO *infoPtr, HDC hdc)
|
REBAR_Refresh (REBAR_INFO *infoPtr, HDC hdc)
|
||||||
{
|
{
|
||||||
REBAR_BAND *lpBand;
|
REBAR_BAND *lpBand;
|
||||||
UINT i, oldrow;
|
UINT i;
|
||||||
|
|
||||||
if (!infoPtr->DoRedraw) return;
|
if (!infoPtr->DoRedraw) return;
|
||||||
|
|
||||||
oldrow = infoPtr->bands[0].iRow;
|
|
||||||
for (i = 0; i < infoPtr->uNumBands; i++) {
|
for (i = 0; i < infoPtr->uNumBands; i++) {
|
||||||
lpBand = &infoPtr->bands[i];
|
lpBand = &infoPtr->bands[i];
|
||||||
|
|
||||||
|
@ -1674,7 +1671,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
#if PROBLEM2
|
#if PROBLEM2
|
||||||
(x < adjcx) : (y < adjcy)
|
(x < adjcx) : (y < adjcy)
|
||||||
#else
|
#else
|
||||||
(adjcx - x > 4) : (adjcy - y > 4)
|
(adjcx - x > 5) : (adjcy - y > 4)
|
||||||
#endif
|
#endif
|
||||||
) &&
|
) &&
|
||||||
(infoPtr->uNumBands > 1)) {
|
(infoPtr->uNumBands > 1)) {
|
||||||
|
@ -1762,39 +1759,29 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
/* ******* End Phase 2 - split rows till adjustment height full ******* */
|
/* ******* End Phase 2 - split rows till adjustment height full ******* */
|
||||||
|
|
||||||
|
|
||||||
/* ******* Start Phase 2a - create array of start and end ******* */
|
/* ******* Start Phase 2a - mark first and last band in each ******* */
|
||||||
/* indexes by row */
|
|
||||||
|
|
||||||
if (infoPtr->uNumRows != origrows) {
|
prevBand = NULL;
|
||||||
if (infoPtr->rows) Free (infoPtr->rows);
|
for (i = 0; i < infoPtr->uNumBands; i++) {
|
||||||
infoPtr->rows = Alloc (sizeof (REBAR_ROW) * infoPtr->uNumRows);
|
lpBand = &infoPtr->bands[i];
|
||||||
|
if (HIDDENBAND(lpBand))
|
||||||
|
continue;
|
||||||
|
if( !prevBand ) {
|
||||||
|
lpBand->fDraw |= DRAW_FIRST_IN_ROW;
|
||||||
|
prevBand = lpBand;
|
||||||
|
}
|
||||||
|
else if( prevBand->iRow == lpBand->iRow )
|
||||||
|
prevBand = lpBand;
|
||||||
|
else {
|
||||||
|
prevBand->fDraw |= DRAW_LAST_IN_ROW;
|
||||||
|
lpBand->fDraw |= DRAW_FIRST_IN_ROW;
|
||||||
|
prevBand = lpBand;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if( prevBand )
|
||||||
|
prevBand->fDraw |= DRAW_LAST_IN_ROW;
|
||||||
|
|
||||||
row = 0;
|
/* ******* End Phase 2a - mark first and last band in each ******* */
|
||||||
for (i = 0; i < infoPtr->uNumBands; i++) {
|
|
||||||
lpBand = &infoPtr->bands[i];
|
|
||||||
if (HIDDENBAND(lpBand)) continue;
|
|
||||||
|
|
||||||
if (lpBand->iRow > row) {
|
|
||||||
row++;
|
|
||||||
infoPtr->rows[row-1].istartband = i;
|
|
||||||
}
|
|
||||||
if (row == 0) {
|
|
||||||
ERR("P2a bug!!!!!!\n");
|
|
||||||
}
|
|
||||||
infoPtr->rows[row-1].iendband = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < infoPtr->uNumRows; i++) {
|
|
||||||
REBAR_ROW *p;
|
|
||||||
|
|
||||||
p = &infoPtr->rows[i];
|
|
||||||
TRACE("P2a row %d, starts %d, ends %d\n",
|
|
||||||
i+1, p->istartband, p->iendband);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ******* End Phase 2a - create array of start and end ******* */
|
|
||||||
/* indexes by row */
|
|
||||||
|
|
||||||
|
|
||||||
/* ******* Start Phase 2b - adjust all bands for height full ******* */
|
/* ******* Start Phase 2b - adjust all bands for height full ******* */
|
||||||
|
@ -1804,24 +1791,28 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
|
|
||||||
if (((infoPtr->dwStyle & CCS_VERT) ? clientcx > x : clientcy > y) &&
|
if (((infoPtr->dwStyle & CCS_VERT) ? clientcx > x : clientcy > y) &&
|
||||||
infoPtr->uNumBands) {
|
infoPtr->uNumBands) {
|
||||||
INT diff, i, iband;
|
INT diff, i;
|
||||||
UINT j;
|
UINT j;
|
||||||
|
|
||||||
diff = (infoPtr->dwStyle & CCS_VERT) ? clientcx - x : clientcy - y;
|
diff = (infoPtr->dwStyle & CCS_VERT) ? clientcx - x : clientcy - y;
|
||||||
for (i = infoPtr->uNumRows; i >= 1; i--) {
|
|
||||||
/* if row has more than 1 band, ignore row */
|
/* iterate backwards thru the rows */
|
||||||
if (infoPtr->rows[i-1].istartband != infoPtr->rows[i-1].iendband)
|
for (i = infoPtr->uNumBands-1; i>=0; i--) {
|
||||||
continue;
|
lpBand = &infoPtr->bands[i];
|
||||||
/* point to only band in row */
|
|
||||||
iband = infoPtr->rows[i-1].istartband;
|
|
||||||
lpBand = &infoPtr->bands[iband];
|
|
||||||
if(HIDDENBAND(lpBand)) continue;
|
if(HIDDENBAND(lpBand)) continue;
|
||||||
|
|
||||||
|
/* if row has more than 1 band, ignore it */
|
||||||
|
if( !(lpBand->fDraw&DRAW_FIRST_IN_ROW) )
|
||||||
|
continue;
|
||||||
|
if( !(lpBand->fDraw&DRAW_LAST_IN_ROW) )
|
||||||
|
continue;
|
||||||
|
|
||||||
if (lpBand->fMask & RBBS_VARIABLEHEIGHT) continue;
|
if (lpBand->fMask & RBBS_VARIABLEHEIGHT) continue;
|
||||||
if (((INT)lpBand->cyMaxChild < 1) ||
|
if (((INT)lpBand->cyMaxChild < 1) ||
|
||||||
((INT)lpBand->cyIntegral < 1)) {
|
((INT)lpBand->cyIntegral < 1)) {
|
||||||
if (lpBand->cyMaxChild + lpBand->cyIntegral == 0) continue;
|
if (lpBand->cyMaxChild + lpBand->cyIntegral == 0) continue;
|
||||||
ERR("P2b band %u RBBS_VARIABLEHEIGHT set but cyMax=%d, cyInt=%d\n",
|
ERR("P2b band %u RBBS_VARIABLEHEIGHT set but cyMax=%d, cyInt=%d\n",
|
||||||
iband, lpBand->cyMaxChild, lpBand->cyIntegral);
|
i, lpBand->cyMaxChild, lpBand->cyIntegral);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* j is now the maximum height/width in the client area */
|
/* j is now the maximum height/width in the client area */
|
||||||
|
@ -1835,7 +1826,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
else
|
else
|
||||||
lpBand->rcBand.bottom = lpBand->rcBand.top + j;
|
lpBand->rcBand.bottom = lpBand->rcBand.top + j;
|
||||||
TRACE("P2b band %d, row %d changed to (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("P2b band %d, row %d changed to (%ld,%ld)-(%ld,%ld)\n",
|
||||||
iband, lpBand->iRow,
|
i, lpBand->iRow,
|
||||||
lpBand->rcBand.left, lpBand->rcBand.top,
|
lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
||||||
if (diff <= 0) break;
|
if (diff <= 0) break;
|
||||||
|
@ -1856,7 +1847,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
/* ******* Start Phase 3 - adjust all bands for width full ******* */
|
/* ******* Start Phase 3 - adjust all bands for width full ******* */
|
||||||
|
|
||||||
if (infoPtr->uNumBands) {
|
if (infoPtr->uNumBands) {
|
||||||
REBAR_ROW *p;
|
int startband;
|
||||||
|
|
||||||
/* If RBS_BANDBORDERS set then indicate to draw bottom separator */
|
/* If RBS_BANDBORDERS set then indicate to draw bottom separator */
|
||||||
/* on all bands in all rows but last row. */
|
/* on all bands in all rows but last row. */
|
||||||
|
@ -1864,39 +1855,49 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
/* each row but the rightmost band. */
|
/* each row but the rightmost band. */
|
||||||
if (infoPtr->dwStyle & RBS_BANDBORDERS) {
|
if (infoPtr->dwStyle & RBS_BANDBORDERS) {
|
||||||
|
|
||||||
for(i = 0; i < infoPtr->uNumRows; i++) {
|
for (i=0; i<infoPtr->uNumBands; i++) {
|
||||||
p = &infoPtr->rows[i];
|
lpBand = &infoPtr->bands[i];
|
||||||
for (j = p->istartband; j <= p->iendband; j++) {
|
if (HIDDENBAND(lpBand))
|
||||||
lpBand = &infoPtr->bands[j];
|
continue;
|
||||||
if (HIDDENBAND(lpBand)) continue;
|
|
||||||
if (j != p->iendband)
|
/* not righthand bands */
|
||||||
lpBand->fDraw |= DRAW_RIGHTSEP;
|
if( !(lpBand->fDraw & DRAW_LAST_IN_ROW) )
|
||||||
if (i != infoPtr->uNumRows-1)
|
lpBand->fDraw |= DRAW_RIGHTSEP;
|
||||||
lpBand->fDraw |= DRAW_BOTTOMSEP;
|
|
||||||
}
|
/* not the last row */
|
||||||
|
if( lpBand->iRow != infoPtr->uNumRows )
|
||||||
|
lpBand->fDraw |= DRAW_BOTTOMSEP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Distribute the extra space on the horizontal and adjust */
|
/* Distribute the extra space on the horizontal and adjust */
|
||||||
/* all bands in row to same height. */
|
/* all bands in row to same height. */
|
||||||
for (i=1; i<=infoPtr->uNumRows; i++) {
|
mcy = 0;
|
||||||
p = &infoPtr->rows[i-1];
|
startband = -1;
|
||||||
mcy = 0;
|
for (i=0; i<infoPtr->uNumBands; i++) {
|
||||||
|
|
||||||
TRACE("P3 processing row %d, starting band %d, ending band %d\n",
|
lpBand = &infoPtr->bands[i];
|
||||||
i, p->istartband, p->iendband);
|
|
||||||
|
|
||||||
/* Find the largest height of the bands in the row */
|
if( lpBand->fDraw & DRAW_FIRST_IN_ROW )
|
||||||
for (j = p->istartband; j <= p->iendband; j++) {
|
{
|
||||||
lpBand = &infoPtr->bands[j];
|
startband = i;
|
||||||
if (HIDDENBAND(lpBand)) continue;
|
mcy = 0;
|
||||||
if (mcy < ircBw(lpBand))
|
}
|
||||||
mcy = ircBw(lpBand);
|
|
||||||
}
|
|
||||||
|
|
||||||
REBAR_AdjustBands (infoPtr, p->istartband, p->iendband,
|
if ( (mcy < ircBw(lpBand)) && !HIDDENBAND(lpBand) )
|
||||||
|
mcy = ircBw(lpBand);
|
||||||
|
|
||||||
|
if( lpBand->fDraw & DRAW_LAST_IN_ROW )
|
||||||
|
{
|
||||||
|
TRACE("P3 processing row %d, starting band %d, ending band %d\n",
|
||||||
|
lpBand->iRow, startband, i);
|
||||||
|
if( startband < 0 )
|
||||||
|
ERR("Last band %d with no first, row %d\n", i, lpBand->iRow);
|
||||||
|
|
||||||
|
REBAR_AdjustBands (infoPtr, startband, i,
|
||||||
(infoPtr->dwStyle & CCS_VERT) ?
|
(infoPtr->dwStyle & CCS_VERT) ?
|
||||||
clientcy : clientcx, mcy);
|
clientcy : clientcx, mcy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the other rectangles in each band */
|
/* Calculate the other rectangles in each band */
|
||||||
|
@ -1920,6 +1921,8 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
y = clientcy;
|
y = clientcy;
|
||||||
}
|
}
|
||||||
if (infoPtr->dwStyle & CCS_VERT) {
|
if (infoPtr->dwStyle & CCS_VERT) {
|
||||||
|
if( x < REBAR_MINSIZE )
|
||||||
|
x = REBAR_MINSIZE;
|
||||||
infoPtr->calcSize.cx = x;
|
infoPtr->calcSize.cx = x;
|
||||||
infoPtr->calcSize.cy = clientcy;
|
infoPtr->calcSize.cy = clientcy;
|
||||||
TRACE("vert, notify=%d, x=%d, origheight=%d\n",
|
TRACE("vert, notify=%d, x=%d, origheight=%d\n",
|
||||||
|
@ -1927,6 +1930,8 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
if (notify && (x != origheight)) infoPtr->fStatus |= NTF_HGHTCHG;
|
if (notify && (x != origheight)) infoPtr->fStatus |= NTF_HGHTCHG;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if( y < REBAR_MINSIZE )
|
||||||
|
y = REBAR_MINSIZE;
|
||||||
infoPtr->calcSize.cx = clientcx;
|
infoPtr->calcSize.cx = clientcx;
|
||||||
infoPtr->calcSize.cy = y;
|
infoPtr->calcSize.cy = y;
|
||||||
TRACE("horz, notify=%d, y=%d, origheight=%d\n",
|
TRACE("horz, notify=%d, y=%d, origheight=%d\n",
|
||||||
|
@ -2511,13 +2516,13 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, POINTS *ptsmove)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (RHeaderSum) RHeaderSum -= SEP_WIDTH; /* no separator afterlast band */
|
if (RHeaderSum) RHeaderSum -= SEP_WIDTH; /* no separator after last band */
|
||||||
|
|
||||||
mindBand = &infoPtr->bands[imindBand];
|
mindBand = &infoPtr->bands[imindBand];
|
||||||
maxdBand = &infoPtr->bands[imaxdBand];
|
maxdBand = &infoPtr->bands[imaxdBand];
|
||||||
|
|
||||||
if (imindBand == imaxdBand) return; /* nothing to drag agains */
|
if (imindBand == imaxdBand) return; /* nothing to drag against */
|
||||||
if (imindBand == ihitBand) return; /* first band in row, cant drag */
|
if (imindBand == ihitBand) return; /* first band in row, can't drag */
|
||||||
|
|
||||||
/* limit movement to inside adjustable bands - Left */
|
/* limit movement to inside adjustable bands - Left */
|
||||||
if ( (ptsmove->x < mindBand->rcBand.left) ||
|
if ( (ptsmove->x < mindBand->rcBand.left) ||
|
||||||
|
@ -3205,9 +3210,9 @@ REBAR_InsertBandW (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* post copy */
|
/* post copy */
|
||||||
if (uIndex < infoPtr->uNumBands - 1) {
|
if (uIndex <= infoPtr->uNumBands - 1) {
|
||||||
memcpy (&infoPtr->bands[uIndex+1], &oldBands[uIndex],
|
memcpy (&infoPtr->bands[uIndex+1], &oldBands[uIndex],
|
||||||
(infoPtr->uNumBands - uIndex - 1) * sizeof(REBAR_BAND));
|
(infoPtr->uNumBands - uIndex) * sizeof(REBAR_BAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
Free (oldBands);
|
Free (oldBands);
|
||||||
|
@ -3239,7 +3244,7 @@ REBAR_InsertBandW (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
REBAR_ValidateBand (infoPtr, lpBand);
|
REBAR_ValidateBand (infoPtr, lpBand);
|
||||||
/* On insert of second band, revalidate band 1 to possible add gripper */
|
/* On insert of second band, revalidate band 1 to possible add gripper */
|
||||||
if (infoPtr->uNumBands == 2)
|
if (infoPtr->uNumBands == 2)
|
||||||
REBAR_ValidateBand (infoPtr, &infoPtr->bands[0]);
|
REBAR_ValidateBand (infoPtr, &infoPtr->bands[uIndex ? 0 : 1]);
|
||||||
|
|
||||||
REBAR_DumpBand (infoPtr);
|
REBAR_DumpBand (infoPtr);
|
||||||
|
|
||||||
|
|
|
@ -1052,6 +1052,33 @@ IDC_DIVIDEROPEN CURSOR LOADONCALL DISCARDABLE idc_divideropen.cur
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
/* BINRES idc_movebutton.cur */
|
||||||
|
IDC_MOVEBUTTON CURSOR LOADONCALL DISCARDABLE idc_movebutton.cur
|
||||||
|
/* {
|
||||||
|
'00 00 02 00 01 00 20 20 00 00 10 00 10 00 30 01'
|
||||||
|
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
|
||||||
|
'00 00 01 00 01 00 00 00 00 00 00 01 00 00 00 00'
|
||||||
|
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||||
|
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
|
||||||
|
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||||
|
'00 00 00 00 00 00 00 00 00 00 00 0F F8 00 00 0F'
|
||||||
|
'F8 00 00 1F FC 00 00 1F FC 00 00 3F FC 00 00 3F'
|
||||||
|
'FE 00 00 7F FE 00 00 5F FE 00 00 DF FE 00 01 DF'
|
||||||
|
'FE 00 01 9F FE 00 00 1D B6 00 00 1D B4 00 00 0D'
|
||||||
|
'B0 00 00 01 80 00 00 00 00 00 00 00 00 00 00 00'
|
||||||
|
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||||
|
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF D2 49'
|
||||||
|
'24 93 DF FF FF FF FF FF FF FB DF FF FF FB DF FF'
|
||||||
|
'FF FF FF FF FF FB DF E0 03 FB DF E0 03 FF FF E0'
|
||||||
|
'03 FB DF C0 01 FB DF C0 01 FF FF 80 01 FB DF 80'
|
||||||
|
'00 FB DF 00 00 FF FF 00 00 FB DE 00 00 FB DC 00'
|
||||||
|
'00 FF FC 00 00 FB DC 40 00 FB DF C0 01 FF FF E0'
|
||||||
|
'03 FB DF F0 0F FB DF FE 7F FF FF FF FF FB DF FF'
|
||||||
|
'FF FB DF FF FF FF FF FF FF FB C9 24 92 4B FF FF'
|
||||||
|
'FF FF FF FF FF FF'
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
/* BINRES idi_dragarrow.ico */
|
/* BINRES idi_dragarrow.ico */
|
||||||
IDI_DRAGARROW ICON LOADONCALL DISCARDABLE idi_dragarrow.ico
|
IDI_DRAGARROW ICON LOADONCALL DISCARDABLE idi_dragarrow.ico
|
||||||
/* {
|
/* {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -18,8 +18,9 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* TODO:
|
* TODO:
|
||||||
* - Unicode support (started).
|
|
||||||
* - Custom draw support.
|
* - Custom draw support.
|
||||||
|
* - Balloon tips.
|
||||||
|
* - Messages.
|
||||||
*
|
*
|
||||||
* Testing:
|
* Testing:
|
||||||
* - Run tests using Waite Group Windows95 API Bible Volume 2.
|
* - Run tests using Waite Group Windows95 API Bible Volume 2.
|
||||||
|
@ -90,6 +91,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
UINT uFlags;
|
UINT uFlags;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
BOOL bNotifyUnicode;
|
||||||
UINT uId;
|
UINT uId;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
HINSTANCE hinst;
|
HINSTANCE hinst;
|
||||||
|
@ -110,14 +112,13 @@ typedef struct
|
||||||
INT xTrackPos;
|
INT xTrackPos;
|
||||||
INT yTrackPos;
|
INT yTrackPos;
|
||||||
INT nMaxTipWidth;
|
INT nMaxTipWidth;
|
||||||
INT nTool;
|
INT nTool; /* tool that mouse was on on last relayed mouse move */
|
||||||
INT nCurrentTool;
|
INT nCurrentTool;
|
||||||
INT nTrackTool;
|
INT nTrackTool;
|
||||||
INT nReshowTime;
|
INT nReshowTime;
|
||||||
INT nAutoPopTime;
|
INT nAutoPopTime;
|
||||||
INT nInitialTime;
|
INT nInitialTime;
|
||||||
RECT rcMargin;
|
RECT rcMargin;
|
||||||
BOOL bNotifyUnicode;
|
|
||||||
|
|
||||||
TTTOOL_INFO *tools;
|
TTTOOL_INFO *tools;
|
||||||
} TOOLTIPS_INFO;
|
} TOOLTIPS_INFO;
|
||||||
|
@ -171,6 +172,100 @@ TOOLTIPS_Refresh (HWND hwnd, HDC hdc)
|
||||||
SetBkMode (hdc, oldBkMode);
|
SetBkMode (hdc, oldBkMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr)
|
||||||
|
{
|
||||||
|
NMTTDISPINFOA ttnmdi;
|
||||||
|
|
||||||
|
/* fill NMHDR struct */
|
||||||
|
ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOA));
|
||||||
|
ttnmdi.hdr.hwndFrom = hwnd;
|
||||||
|
ttnmdi.hdr.idFrom = toolPtr->uId;
|
||||||
|
ttnmdi.hdr.code = TTN_GETDISPINFOA;
|
||||||
|
ttnmdi.lpszText = (LPSTR)&ttnmdi.szText;
|
||||||
|
ttnmdi.uFlags = toolPtr->uFlags;
|
||||||
|
ttnmdi.lParam = toolPtr->lParam;
|
||||||
|
|
||||||
|
TRACE("hdr.idFrom = %x\n", ttnmdi.hdr.idFrom);
|
||||||
|
SendMessageA(toolPtr->hwnd, WM_NOTIFY,
|
||||||
|
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
|
||||||
|
|
||||||
|
if (HIWORD((UINT)ttnmdi.lpszText) == 0) {
|
||||||
|
LoadStringW(ttnmdi.hinst, (UINT)ttnmdi.lpszText,
|
||||||
|
infoPtr->szTipText, INFOTIPSIZE);
|
||||||
|
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
||||||
|
toolPtr->hinst = ttnmdi.hinst;
|
||||||
|
toolPtr->lpszText = (LPWSTR)ttnmdi.lpszText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ttnmdi.lpszText == 0) {
|
||||||
|
/* no text available */
|
||||||
|
infoPtr->szTipText[0] = '\0';
|
||||||
|
}
|
||||||
|
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
|
||||||
|
INT max_len = (ttnmdi.lpszText == &ttnmdi.szText[0]) ?
|
||||||
|
sizeof(ttnmdi.szText)/sizeof(ttnmdi.szText[0]) : -1;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText, max_len,
|
||||||
|
infoPtr->szTipText, INFOTIPSIZE);
|
||||||
|
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
||||||
|
INT len = MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText,
|
||||||
|
max_len, NULL, 0);
|
||||||
|
toolPtr->hinst = 0;
|
||||||
|
toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText, -1,
|
||||||
|
toolPtr->lpszText, len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ERR("recursive text callback!\n");
|
||||||
|
infoPtr->szTipText[0] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr)
|
||||||
|
{
|
||||||
|
NMTTDISPINFOW ttnmdi;
|
||||||
|
|
||||||
|
/* fill NMHDR struct */
|
||||||
|
ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOW));
|
||||||
|
ttnmdi.hdr.hwndFrom = hwnd;
|
||||||
|
ttnmdi.hdr.idFrom = toolPtr->uId;
|
||||||
|
ttnmdi.hdr.code = TTN_GETDISPINFOW;
|
||||||
|
ttnmdi.lpszText = (LPWSTR)&ttnmdi.szText;
|
||||||
|
ttnmdi.uFlags = toolPtr->uFlags;
|
||||||
|
ttnmdi.lParam = toolPtr->lParam;
|
||||||
|
|
||||||
|
TRACE("hdr.idFrom = %x\n", ttnmdi.hdr.idFrom);
|
||||||
|
SendMessageW(toolPtr->hwnd, WM_NOTIFY,
|
||||||
|
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
|
||||||
|
|
||||||
|
if (HIWORD((UINT)ttnmdi.lpszText) == 0) {
|
||||||
|
LoadStringW(ttnmdi.hinst, (UINT)ttnmdi.lpszText,
|
||||||
|
infoPtr->szTipText, INFOTIPSIZE);
|
||||||
|
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
||||||
|
toolPtr->hinst = ttnmdi.hinst;
|
||||||
|
toolPtr->lpszText = ttnmdi.lpszText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ttnmdi.lpszText == 0) {
|
||||||
|
/* no text available */
|
||||||
|
infoPtr->szTipText[0] = '\0';
|
||||||
|
}
|
||||||
|
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKW) {
|
||||||
|
INT max_len = (ttnmdi.lpszText == &ttnmdi.szText[0]) ?
|
||||||
|
sizeof(ttnmdi.szText)/sizeof(ttnmdi.szText[0]) : INFOTIPSIZE-1;
|
||||||
|
strncpyW(infoPtr->szTipText, ttnmdi.lpszText, max_len);
|
||||||
|
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
||||||
|
INT len = max(strlenW(ttnmdi.lpszText), max_len);
|
||||||
|
toolPtr->hinst = 0;
|
||||||
|
toolPtr->lpszText = Alloc ((len+1) * sizeof(WCHAR));
|
||||||
|
memcpy(toolPtr->lpszText, ttnmdi.lpszText, (len+1) * sizeof(WCHAR));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ERR("recursive text callback!\n");
|
||||||
|
infoPtr->szTipText[0] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
TOOLTIPS_GetTipText (HWND hwnd, TOOLTIPS_INFO *infoPtr, INT nTool)
|
TOOLTIPS_GetTipText (HWND hwnd, TOOLTIPS_INFO *infoPtr, INT nTool)
|
||||||
|
@ -186,61 +281,10 @@ TOOLTIPS_GetTipText (HWND hwnd, TOOLTIPS_INFO *infoPtr, INT nTool)
|
||||||
}
|
}
|
||||||
else if (toolPtr->lpszText) {
|
else if (toolPtr->lpszText) {
|
||||||
if (toolPtr->lpszText == LPSTR_TEXTCALLBACKW) {
|
if (toolPtr->lpszText == LPSTR_TEXTCALLBACKW) {
|
||||||
NMTTDISPINFOA ttnmdi;
|
if (toolPtr->bNotifyUnicode)
|
||||||
|
TOOLTIPS_GetDispInfoW(hwnd, infoPtr, toolPtr);
|
||||||
/* fill NMHDR struct */
|
else
|
||||||
ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOA));
|
TOOLTIPS_GetDispInfoA(hwnd, infoPtr, toolPtr);
|
||||||
ttnmdi.hdr.hwndFrom = hwnd;
|
|
||||||
ttnmdi.hdr.idFrom = toolPtr->uId;
|
|
||||||
ttnmdi.hdr.code = TTN_GETDISPINFOA;
|
|
||||||
ttnmdi.lpszText = (LPSTR)&ttnmdi.szText;
|
|
||||||
ttnmdi.uFlags = toolPtr->uFlags;
|
|
||||||
ttnmdi.lParam = toolPtr->lParam;
|
|
||||||
|
|
||||||
TRACE("hdr.idFrom = %x\n", ttnmdi.hdr.idFrom);
|
|
||||||
SendMessageA (toolPtr->hwnd, WM_NOTIFY,
|
|
||||||
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
|
|
||||||
|
|
||||||
if (HIWORD((UINT)ttnmdi.lpszText) == 0) {
|
|
||||||
LoadStringW (ttnmdi.hinst, (UINT)ttnmdi.lpszText,
|
|
||||||
infoPtr->szTipText, INFOTIPSIZE);
|
|
||||||
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
|
||||||
toolPtr->hinst = ttnmdi.hinst;
|
|
||||||
toolPtr->lpszText = (LPWSTR)ttnmdi.lpszText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (ttnmdi.szText[0]) {
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, ttnmdi.szText, 80,
|
|
||||||
infoPtr->szTipText, INFOTIPSIZE);
|
|
||||||
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
|
||||||
INT len = MultiByteToWideChar(CP_ACP, 0, ttnmdi.szText,
|
|
||||||
80, NULL, 0);
|
|
||||||
toolPtr->hinst = 0;
|
|
||||||
toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, ttnmdi.szText, 80,
|
|
||||||
toolPtr->lpszText, len);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (ttnmdi.lpszText == 0) {
|
|
||||||
/* no text available */
|
|
||||||
infoPtr->szTipText[0] = L'\0';
|
|
||||||
}
|
|
||||||
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText, -1,
|
|
||||||
infoPtr->szTipText, INFOTIPSIZE);
|
|
||||||
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
|
||||||
INT len = MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText,
|
|
||||||
-1, NULL, 0);
|
|
||||||
toolPtr->hinst = 0;
|
|
||||||
toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText, -1,
|
|
||||||
toolPtr->lpszText, len);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ERR("recursive text callback!\n");
|
|
||||||
infoPtr->szTipText[0] = '\0';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* the item is a usual (unicode) text */
|
/* the item is a usual (unicode) text */
|
||||||
|
@ -502,11 +546,12 @@ TOOLTIPS_TrackHide (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
TTTOOL_INFO *toolPtr;
|
TTTOOL_INFO *toolPtr;
|
||||||
NMHDR hdr;
|
NMHDR hdr;
|
||||||
|
|
||||||
|
TRACE("hide tracking tooltip %d\n", infoPtr->nTrackTool);
|
||||||
|
|
||||||
if (infoPtr->nTrackTool == -1)
|
if (infoPtr->nTrackTool == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
toolPtr = &infoPtr->tools[infoPtr->nTrackTool];
|
toolPtr = &infoPtr->tools[infoPtr->nTrackTool];
|
||||||
TRACE("hide tracking tooltip %d!\n", infoPtr->nTrackTool);
|
|
||||||
|
|
||||||
hdr.hwndFrom = hwnd;
|
hdr.hwndFrom = hwnd;
|
||||||
hdr.idFrom = toolPtr->uId;
|
hdr.idFrom = toolPtr->uId;
|
||||||
|
@ -668,6 +713,7 @@ TOOLTIPS_AddToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
|
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
|
||||||
TTTOOL_INFO *toolPtr;
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT nResult;
|
||||||
|
|
||||||
if (lpToolInfo == NULL)
|
if (lpToolInfo == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -736,6 +782,18 @@ TOOLTIPS_AddToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TRACE("subclassing installed!\n");
|
TRACE("subclassing installed!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nResult = (INT) SendMessageA (toolPtr->hwnd, WM_NOTIFYFORMAT,
|
||||||
|
(WPARAM)hwnd, (LPARAM)NF_QUERY);
|
||||||
|
if (nResult == NFR_ANSI) {
|
||||||
|
toolPtr->bNotifyUnicode = FALSE;
|
||||||
|
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
|
||||||
|
} else if (nResult == NFR_UNICODE) {
|
||||||
|
toolPtr->bNotifyUnicode = TRUE;
|
||||||
|
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
|
||||||
|
} else {
|
||||||
|
TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,6 +804,7 @@ TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
|
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
|
||||||
TTTOOL_INFO *toolPtr;
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT nResult;
|
||||||
|
|
||||||
if (lpToolInfo == NULL)
|
if (lpToolInfo == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -813,16 +872,102 @@ TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TRACE("subclassing installed!\n");
|
TRACE("subclassing installed!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nResult = (INT) SendMessageA (toolPtr->hwnd, WM_NOTIFYFORMAT,
|
||||||
|
(WPARAM)hwnd, (LPARAM)NF_QUERY);
|
||||||
|
if (nResult == NFR_ANSI) {
|
||||||
|
toolPtr->bNotifyUnicode = FALSE;
|
||||||
|
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
|
||||||
|
} else if (nResult == NFR_UNICODE) {
|
||||||
|
toolPtr->bNotifyUnicode = TRUE;
|
||||||
|
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
|
||||||
|
} else {
|
||||||
|
TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void TOOLTIPS_DelToolCommon (HWND hwnd, TOOLTIPS_INFO *infoPtr, INT nTool)
|
||||||
|
{
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
|
||||||
|
TRACE("tool %d\n", nTool);
|
||||||
|
|
||||||
|
if (nTool == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* make sure the tooltip has disappeared before deleting it */
|
||||||
|
TOOLTIPS_Hide(hwnd, infoPtr);
|
||||||
|
|
||||||
|
/* delete text string */
|
||||||
|
toolPtr = &infoPtr->tools[nTool];
|
||||||
|
if (toolPtr->lpszText) {
|
||||||
|
if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
|
||||||
|
(HIWORD((INT)toolPtr->lpszText) != 0) )
|
||||||
|
Free (toolPtr->lpszText);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remove subclassing */
|
||||||
|
if (toolPtr->uFlags & TTF_SUBCLASS) {
|
||||||
|
if (toolPtr->uFlags & TTF_IDISHWND) {
|
||||||
|
RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* delete tool from tool list */
|
||||||
|
if (infoPtr->uNumTools == 1) {
|
||||||
|
Free (infoPtr->tools);
|
||||||
|
infoPtr->tools = NULL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
TTTOOL_INFO *oldTools = infoPtr->tools;
|
||||||
|
infoPtr->tools =
|
||||||
|
Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1));
|
||||||
|
|
||||||
|
if (nTool > 0)
|
||||||
|
memcpy (&infoPtr->tools[0], &oldTools[0],
|
||||||
|
nTool * sizeof(TTTOOL_INFO));
|
||||||
|
|
||||||
|
if (nTool < infoPtr->uNumTools - 1)
|
||||||
|
memcpy (&infoPtr->tools[nTool], &oldTools[nTool + 1],
|
||||||
|
(infoPtr->uNumTools - nTool - 1) * sizeof(TTTOOL_INFO));
|
||||||
|
|
||||||
|
Free (oldTools);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* update any indices affected by delete */
|
||||||
|
|
||||||
|
/* destroying tool that mouse was on on last relayed mouse move */
|
||||||
|
if (infoPtr->nTool == nTool)
|
||||||
|
/* -1 means no current tool (0 means first tool) */
|
||||||
|
infoPtr->nTool = -1;
|
||||||
|
else if (infoPtr->nTool > nTool)
|
||||||
|
infoPtr->nTool--;
|
||||||
|
|
||||||
|
if (infoPtr->nTrackTool == nTool)
|
||||||
|
/* -1 means no current tool (0 means first tool) */
|
||||||
|
infoPtr->nTrackTool = -1;
|
||||||
|
else if (infoPtr->nTrackTool > nTool)
|
||||||
|
infoPtr->nTrackTool--;
|
||||||
|
|
||||||
|
if (infoPtr->nCurrentTool == nTool)
|
||||||
|
/* -1 means no current tool (0 means first tool) */
|
||||||
|
infoPtr->nCurrentTool = -1;
|
||||||
|
else if (infoPtr->nCurrentTool > nTool)
|
||||||
|
infoPtr->nCurrentTool--;
|
||||||
|
|
||||||
|
infoPtr->uNumTools--;
|
||||||
|
}
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
|
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
|
||||||
TTTOOL_INFO *toolPtr;
|
|
||||||
INT nTool;
|
INT nTool;
|
||||||
|
|
||||||
if (lpToolInfo == NULL)
|
if (lpToolInfo == NULL)
|
||||||
|
@ -833,60 +978,8 @@ TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
nTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpToolInfo);
|
nTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpToolInfo);
|
||||||
if (nTool == -1) return 0;
|
|
||||||
|
|
||||||
TRACE("tool %d\n", nTool);
|
TOOLTIPS_DelToolCommon (hwnd, infoPtr, nTool);
|
||||||
|
|
||||||
/* make sure the tooltip has disappeared before deleting it */
|
|
||||||
TOOLTIPS_Hide(hwnd, infoPtr);
|
|
||||||
|
|
||||||
/* delete text string */
|
|
||||||
toolPtr = &infoPtr->tools[nTool];
|
|
||||||
if (toolPtr->lpszText) {
|
|
||||||
if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
|
|
||||||
(HIWORD((INT)toolPtr->lpszText) != 0) )
|
|
||||||
Free (toolPtr->lpszText);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* remove subclassing */
|
|
||||||
if (toolPtr->uFlags & TTF_SUBCLASS) {
|
|
||||||
if (toolPtr->uFlags & TTF_IDISHWND) {
|
|
||||||
RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* delete tool from tool list */
|
|
||||||
if (infoPtr->uNumTools == 1) {
|
|
||||||
Free (infoPtr->tools);
|
|
||||||
infoPtr->tools = NULL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
TTTOOL_INFO *oldTools = infoPtr->tools;
|
|
||||||
infoPtr->tools =
|
|
||||||
Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1));
|
|
||||||
|
|
||||||
if (nTool > 0)
|
|
||||||
memcpy (&infoPtr->tools[0], &oldTools[0],
|
|
||||||
nTool * sizeof(TTTOOL_INFO));
|
|
||||||
|
|
||||||
if (nTool < infoPtr->uNumTools - 1)
|
|
||||||
memcpy (&infoPtr->tools[nTool], &oldTools[nTool + 1],
|
|
||||||
(infoPtr->uNumTools - nTool - 1) * sizeof(TTTOOL_INFO));
|
|
||||||
|
|
||||||
Free (oldTools);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* destroying tool that mouse was on on last relayed mouse move */
|
|
||||||
if (infoPtr->nTool == nTool)
|
|
||||||
{
|
|
||||||
/* no current tool (0 means first tool) */
|
|
||||||
infoPtr->nTool = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
infoPtr->uNumTools--;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -897,7 +990,6 @@ TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
|
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
|
||||||
TTTOOL_INFO *toolPtr;
|
|
||||||
INT nTool;
|
INT nTool;
|
||||||
|
|
||||||
if (lpToolInfo == NULL)
|
if (lpToolInfo == NULL)
|
||||||
|
@ -908,60 +1000,8 @@ TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
nTool = TOOLTIPS_GetToolFromInfoW (infoPtr, lpToolInfo);
|
nTool = TOOLTIPS_GetToolFromInfoW (infoPtr, lpToolInfo);
|
||||||
if (nTool == -1) return 0;
|
|
||||||
|
|
||||||
TRACE("tool %d\n", nTool);
|
TOOLTIPS_DelToolCommon (hwnd, infoPtr, nTool);
|
||||||
|
|
||||||
/* make sure the tooltip has disappeared before deleting it */
|
|
||||||
TOOLTIPS_Hide(hwnd, infoPtr);
|
|
||||||
|
|
||||||
/* delete text string */
|
|
||||||
toolPtr = &infoPtr->tools[nTool];
|
|
||||||
if (toolPtr->lpszText) {
|
|
||||||
if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
|
|
||||||
(HIWORD((INT)toolPtr->lpszText) != 0) )
|
|
||||||
Free (toolPtr->lpszText);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* remove subclassing */
|
|
||||||
if (toolPtr->uFlags & TTF_SUBCLASS) {
|
|
||||||
if (toolPtr->uFlags & TTF_IDISHWND) {
|
|
||||||
RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* delete tool from tool list */
|
|
||||||
if (infoPtr->uNumTools == 1) {
|
|
||||||
Free (infoPtr->tools);
|
|
||||||
infoPtr->tools = NULL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
TTTOOL_INFO *oldTools = infoPtr->tools;
|
|
||||||
infoPtr->tools =
|
|
||||||
Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1));
|
|
||||||
|
|
||||||
if (nTool > 0)
|
|
||||||
memcpy (&infoPtr->tools[0], &oldTools[0],
|
|
||||||
nTool * sizeof(TTTOOL_INFO));
|
|
||||||
|
|
||||||
if (nTool < infoPtr->uNumTools - 1)
|
|
||||||
memcpy (&infoPtr->tools[nTool], &oldTools[nTool + 1],
|
|
||||||
(infoPtr->uNumTools - nTool - 1) * sizeof(TTTOOL_INFO));
|
|
||||||
|
|
||||||
Free (oldTools);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* destroying tool that mouse was on on last relayed mouse move */
|
|
||||||
if (infoPtr->nTool == nTool)
|
|
||||||
{
|
|
||||||
/* no current tool (0 means first tool) */
|
|
||||||
infoPtr->nTool = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
infoPtr->uNumTools--;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1413,6 +1453,9 @@ TOOLTIPS_NewToolRectA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
nTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpti);
|
nTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpti);
|
||||||
|
|
||||||
|
TRACE("nTool = %d, rect = %s\n", nTool, wine_dbgstr_rect(&lpti->rect));
|
||||||
|
|
||||||
if (nTool == -1) return 0;
|
if (nTool == -1) return 0;
|
||||||
|
|
||||||
infoPtr->tools[nTool].rect = lpti->rect;
|
infoPtr->tools[nTool].rect = lpti->rect;
|
||||||
|
@ -1434,6 +1477,9 @@ TOOLTIPS_NewToolRectW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
nTool = TOOLTIPS_GetToolFromInfoW (infoPtr, lpti);
|
nTool = TOOLTIPS_GetToolFromInfoW (infoPtr, lpti);
|
||||||
|
|
||||||
|
TRACE("nTool = %d, rect = %s\n", nTool, wine_dbgstr_rect(&lpti->rect));
|
||||||
|
|
||||||
if (nTool == -1) return 0;
|
if (nTool == -1) return 0;
|
||||||
|
|
||||||
infoPtr->tools[nTool].rect = lpti->rect;
|
infoPtr->tools[nTool].rect = lpti->rect;
|
||||||
|
@ -1721,14 +1767,15 @@ static LRESULT
|
||||||
TOOLTIPS_TrackActivate (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLTIPS_TrackActivate (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
|
|
||||||
|
|
||||||
if (lpToolInfo == NULL)
|
|
||||||
return 0;
|
|
||||||
if (lpToolInfo->cbSize < TTTOOLINFOA_V1_SIZE)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if ((BOOL)wParam) {
|
if ((BOOL)wParam) {
|
||||||
|
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
|
||||||
|
|
||||||
|
if (lpToolInfo == NULL)
|
||||||
|
return 0;
|
||||||
|
if (lpToolInfo->cbSize < TTTOOLINFOA_V1_SIZE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* activate */
|
/* activate */
|
||||||
infoPtr->nTrackTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpToolInfo);
|
infoPtr->nTrackTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpToolInfo);
|
||||||
if (infoPtr->nTrackTool != -1) {
|
if (infoPtr->nTrackTool != -1) {
|
||||||
|
@ -1906,7 +1953,6 @@ TOOLTIPS_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
{
|
{
|
||||||
TOOLTIPS_INFO *infoPtr;
|
TOOLTIPS_INFO *infoPtr;
|
||||||
NONCLIENTMETRICSA nclm;
|
NONCLIENTMETRICSA nclm;
|
||||||
INT nResult;
|
|
||||||
|
|
||||||
/* allocate memory for info structure */
|
/* allocate memory for info structure */
|
||||||
infoPtr = (TOOLTIPS_INFO *)Alloc (sizeof(TOOLTIPS_INFO));
|
infoPtr = (TOOLTIPS_INFO *)Alloc (sizeof(TOOLTIPS_INFO));
|
||||||
|
@ -1929,18 +1975,6 @@ TOOLTIPS_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
|
|
||||||
TOOLTIPS_SetDelayTime(hwnd, TTDT_AUTOMATIC, 0L);
|
TOOLTIPS_SetDelayTime(hwnd, TTDT_AUTOMATIC, 0L);
|
||||||
|
|
||||||
nResult = (INT) SendMessageA (lpcs->hwndParent, WM_NOTIFYFORMAT,
|
|
||||||
(WPARAM)hwnd, (LPARAM)NF_QUERY);
|
|
||||||
if (nResult == NFR_ANSI) {
|
|
||||||
infoPtr->bNotifyUnicode = FALSE;
|
|
||||||
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
|
|
||||||
} else if (nResult == NFR_UNICODE) {
|
|
||||||
infoPtr->bNotifyUnicode = TRUE;
|
|
||||||
TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
|
|
||||||
} else {
|
|
||||||
TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE);
|
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -442,98 +442,109 @@ UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* UPDOWN_SetBuddy
|
* UPDOWN_SetBuddy
|
||||||
* Tests if 'bud' is a valid window handle. If not, returns FALSE.
|
*
|
||||||
* Else, sets it as a new Buddy.
|
* Sets bud as a new Buddy.
|
||||||
* Then, it should subclass the buddy
|
* Then, it should subclass the buddy
|
||||||
* If window has the UDS_ARROWKEYS, it subcalsses the buddy window to
|
* If window has the UDS_ARROWKEYS, it subcalsses the buddy window to
|
||||||
* process the UP/DOWN arrow keys.
|
* process the UP/DOWN arrow keys.
|
||||||
* If window has the UDS_ALIGNLEFT or UDS_ALIGNRIGHT style
|
* If window has the UDS_ALIGNLEFT or UDS_ALIGNRIGHT style
|
||||||
* the size/pos of the buddy and the control are adjusted accordingly.
|
* the size/pos of the buddy and the control are adjusted accordingly.
|
||||||
*/
|
*/
|
||||||
static BOOL UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
|
static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
|
||||||
{
|
{
|
||||||
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
|
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
|
||||||
RECT budRect; /* new coord for the buddy */
|
RECT budRect; /* new coord for the buddy */
|
||||||
int x, width; /* new x position and width for the up-down */
|
int x, width; /* new x position and width for the up-down */
|
||||||
WNDPROC baseWndProc;
|
WNDPROC baseWndProc;
|
||||||
CHAR buddyClass[40];
|
CHAR buddyClass[40];
|
||||||
|
HWND ret;
|
||||||
/* Is it a valid bud? */
|
|
||||||
if(!IsWindow(bud)) return FALSE;
|
|
||||||
|
|
||||||
TRACE("(hwnd=%p, bud=%p)\n", infoPtr->Self, bud);
|
TRACE("(hwnd=%p, bud=%p)\n", infoPtr->Self, bud);
|
||||||
|
|
||||||
|
ret = infoPtr->Buddy;
|
||||||
|
|
||||||
/* there is already a body assigned */
|
/* there is already a body assigned */
|
||||||
if (infoPtr->Buddy) RemovePropA(infoPtr->Buddy, BUDDY_UPDOWN_HWND);
|
if (infoPtr->Buddy) RemovePropA(infoPtr->Buddy, BUDDY_UPDOWN_HWND);
|
||||||
|
|
||||||
|
if(!IsWindow(bud))
|
||||||
|
bud = 0;
|
||||||
|
|
||||||
/* Store buddy window handle */
|
/* Store buddy window handle */
|
||||||
infoPtr->Buddy = bud;
|
infoPtr->Buddy = bud;
|
||||||
|
|
||||||
/* keep upDown ctrl hwnd in a buddy property */
|
if(bud) {
|
||||||
SetPropA( bud, BUDDY_UPDOWN_HWND, infoPtr->Self);
|
|
||||||
|
|
||||||
/* Store buddy window class type */
|
/* keep upDown ctrl hwnd in a buddy property */
|
||||||
infoPtr->BuddyType = BUDDY_TYPE_UNKNOWN;
|
SetPropA( bud, BUDDY_UPDOWN_HWND, infoPtr->Self);
|
||||||
if (GetClassNameA(bud, buddyClass, COUNT_OF(buddyClass))) {
|
|
||||||
if (lstrcmpiA(buddyClass, "Edit") == 0)
|
|
||||||
infoPtr->BuddyType = BUDDY_TYPE_EDIT;
|
|
||||||
else if (lstrcmpiA(buddyClass, "Listbox") == 0)
|
|
||||||
infoPtr->BuddyType = BUDDY_TYPE_LISTBOX;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(dwStyle & UDS_ARROWKEYS){
|
/* Store buddy window class type */
|
||||||
/* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property
|
infoPtr->BuddyType = BUDDY_TYPE_UNKNOWN;
|
||||||
when we reset the upDown ctrl buddy to another buddy because it is not
|
if (GetClassNameA(bud, buddyClass, COUNT_OF(buddyClass))) {
|
||||||
good to break the window proc chain. */
|
if (lstrcmpiA(buddyClass, "Edit") == 0)
|
||||||
if (!GetPropA(bud, BUDDY_SUPERCLASS_WNDPROC)) {
|
infoPtr->BuddyType = BUDDY_TYPE_EDIT;
|
||||||
baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc);
|
else if (lstrcmpiA(buddyClass, "Listbox") == 0)
|
||||||
SetPropA(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc);
|
infoPtr->BuddyType = BUDDY_TYPE_LISTBOX;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the rect of the buddy relative to its parent */
|
if(dwStyle & UDS_ARROWKEYS){
|
||||||
GetWindowRect(infoPtr->Buddy, &budRect);
|
/* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property
|
||||||
MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Buddy), (POINT *)(&budRect.left), 2);
|
when we reset the upDown ctrl buddy to another buddy because it is not
|
||||||
|
good to break the window proc chain. */
|
||||||
|
if (!GetPropA(bud, BUDDY_SUPERCLASS_WNDPROC)) {
|
||||||
|
baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc);
|
||||||
|
SetPropA(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* now do the positioning */
|
/* Get the rect of the buddy relative to its parent */
|
||||||
if (dwStyle & UDS_ALIGNLEFT) {
|
GetWindowRect(infoPtr->Buddy, &budRect);
|
||||||
x = budRect.left;
|
MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Buddy), (POINT *)(&budRect.left), 2);
|
||||||
budRect.left += DEFAULT_WIDTH + DEFAULT_XSEP;
|
|
||||||
} else if (dwStyle & UDS_ALIGNRIGHT) {
|
/* now do the positioning */
|
||||||
budRect.right -= DEFAULT_WIDTH + DEFAULT_XSEP;
|
if (dwStyle & UDS_ALIGNLEFT) {
|
||||||
x = budRect.right+DEFAULT_XSEP;
|
x = budRect.left;
|
||||||
|
budRect.left += DEFAULT_WIDTH + DEFAULT_XSEP;
|
||||||
|
} else if (dwStyle & UDS_ALIGNRIGHT) {
|
||||||
|
budRect.right -= DEFAULT_WIDTH + DEFAULT_XSEP;
|
||||||
|
x = budRect.right+DEFAULT_XSEP;
|
||||||
|
} else {
|
||||||
|
x = budRect.right+DEFAULT_XSEP;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* first adjust the buddy to accomodate the up/down */
|
||||||
|
SetWindowPos(infoPtr->Buddy, 0, budRect.left, budRect.top,
|
||||||
|
budRect.right - budRect.left, budRect.bottom - budRect.top,
|
||||||
|
SWP_NOACTIVATE|SWP_NOZORDER);
|
||||||
|
|
||||||
|
/* now position the up/down */
|
||||||
|
/* Since the UDS_ALIGN* flags were used, */
|
||||||
|
/* we will pick the position and size of the window. */
|
||||||
|
width = DEFAULT_WIDTH;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the updown has a buddy border, it has to overlap with the buddy
|
||||||
|
* to look as if it is integrated with the buddy control.
|
||||||
|
* We nudge the control or change it size to overlap.
|
||||||
|
*/
|
||||||
|
if (UPDOWN_HasBuddyBorder(infoPtr)) {
|
||||||
|
if(dwStyle & UDS_ALIGNLEFT)
|
||||||
|
width += DEFAULT_BUDDYBORDER;
|
||||||
|
else
|
||||||
|
x -= DEFAULT_BUDDYBORDER;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetWindowPos(infoPtr->Self, infoPtr->Buddy, x,
|
||||||
|
budRect.top - DEFAULT_ADDTOP, width,
|
||||||
|
budRect.bottom - budRect.top + DEFAULT_ADDTOP + DEFAULT_ADDBOT,
|
||||||
|
SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOZORDER);
|
||||||
} else {
|
} else {
|
||||||
x = budRect.right+DEFAULT_XSEP;
|
RECT rect;
|
||||||
|
GetWindowRect(infoPtr->Self, &rect);
|
||||||
|
MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Self), (POINT *)&rect, 2);
|
||||||
|
SetWindowPos(infoPtr->Self, 0, rect.left, rect.top, DEFAULT_WIDTH, rect.bottom - rect.top,
|
||||||
|
SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOZORDER);
|
||||||
}
|
}
|
||||||
|
return ret;
|
||||||
/* first adjust the buddy to accomodate the up/down */
|
|
||||||
SetWindowPos(infoPtr->Buddy, 0, budRect.left, budRect.top,
|
|
||||||
budRect.right - budRect.left, budRect.bottom - budRect.top,
|
|
||||||
SWP_NOACTIVATE|SWP_NOZORDER);
|
|
||||||
|
|
||||||
/* now position the up/down */
|
|
||||||
/* Since the UDS_ALIGN* flags were used, */
|
|
||||||
/* we will pick the position and size of the window. */
|
|
||||||
width = DEFAULT_WIDTH;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the updown has a buddy border, it has to overlap with the buddy
|
|
||||||
* to look as if it is integrated with the buddy control.
|
|
||||||
* We nudge the control or change it size to overlap.
|
|
||||||
*/
|
|
||||||
if (UPDOWN_HasBuddyBorder(infoPtr)) {
|
|
||||||
if(dwStyle & UDS_ALIGNLEFT)
|
|
||||||
width += DEFAULT_BUDDYBORDER;
|
|
||||||
else
|
|
||||||
x -= DEFAULT_BUDDYBORDER;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetWindowPos(infoPtr->Self, infoPtr->Buddy, x,
|
|
||||||
budRect.top - DEFAULT_ADDTOP, width,
|
|
||||||
budRect.bottom - budRect.top + DEFAULT_ADDTOP + DEFAULT_ADDBOT,
|
|
||||||
SWP_NOACTIVATE);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -859,9 +870,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
|
||||||
return (LRESULT)infoPtr->Buddy;
|
return (LRESULT)infoPtr->Buddy;
|
||||||
|
|
||||||
case UDM_SETBUDDY:
|
case UDM_SETBUDDY:
|
||||||
temp = (int)infoPtr->Buddy;
|
return (LRESULT)UPDOWN_SetBuddy (infoPtr, (HWND)wParam);
|
||||||
UPDOWN_SetBuddy (infoPtr, (HWND)wParam);
|
|
||||||
return temp;
|
|
||||||
|
|
||||||
case UDM_GETPOS:
|
case UDM_GETPOS:
|
||||||
temp = UPDOWN_GetBuddyInt (infoPtr);
|
temp = UPDOWN_GetBuddyInt (infoPtr);
|
||||||
|
@ -948,7 +957,7 @@ void UPDOWN_Register(void)
|
||||||
WNDCLASSW wndClass;
|
WNDCLASSW wndClass;
|
||||||
|
|
||||||
ZeroMemory( &wndClass, sizeof( WNDCLASSW ) );
|
ZeroMemory( &wndClass, sizeof( WNDCLASSW ) );
|
||||||
wndClass.style = CS_GLOBALCLASS | CS_VREDRAW;
|
wndClass.style = CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW;
|
||||||
wndClass.lpfnWndProc = (WNDPROC)UpDownWindowProc;
|
wndClass.lpfnWndProc = (WNDPROC)UpDownWindowProc;
|
||||||
wndClass.cbClsExtra = 0;
|
wndClass.cbClsExtra = 0;
|
||||||
wndClass.cbWndExtra = sizeof(UPDOWN_INFO*);
|
wndClass.cbWndExtra = sizeof(UPDOWN_INFO*);
|
||||||
|
|
|
@ -4,7 +4,7 @@ RCS file: /home/wine/wine/dlls/comctl32/comctl32.spec,v
|
||||||
retrieving revision 1.43
|
retrieving revision 1.43
|
||||||
diff -u -r1.43 comctl32.spec
|
diff -u -r1.43 comctl32.spec
|
||||||
--- comctl32.spec 20 Feb 2004 05:16:37 -0000 1.43
|
--- comctl32.spec 20 Feb 2004 05:16:37 -0000 1.43
|
||||||
+++ comctl32.spec 14 Mar 2004 09:18:35 -0000
|
+++ comctl32.spec 15 Apr 2004 08:36:51 -0000
|
||||||
@@ -106,13 +106,13 @@
|
@@ -106,13 +106,13 @@
|
||||||
412 stdcall RemoveWindowSubclass(long ptr long)
|
412 stdcall RemoveWindowSubclass(long ptr long)
|
||||||
413 stdcall DefSubclassProc(long long long long)
|
413 stdcall DefSubclassProc(long long long long)
|
||||||
|
@ -26,13 +26,34 @@ diff -u -r1.43 comctl32.spec
|
||||||
|
|
||||||
# Functions imported by name
|
# Functions imported by name
|
||||||
|
|
||||||
|
Index: imagelist.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v
|
||||||
|
retrieving revision 1.85
|
||||||
|
diff -u -r1.85 imagelist.c
|
||||||
|
--- imagelist.c 27 Feb 2004 04:40:08 -0000 1.85
|
||||||
|
+++ imagelist.c 15 Apr 2004 08:36:52 -0000
|
||||||
|
@@ -1146,11 +1146,13 @@
|
||||||
|
PatBlt(hBlendMaskDC, 0, 0, cx, cy, PATCOPY);
|
||||||
|
SelectObject(hBlendMaskDC, hOldBrush);
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
/* Modify the blend mask if an Image Mask exist */
|
||||||
|
if(himl->hbmMask) {
|
||||||
|
BitBlt(hBlendMaskDC, 0, 0, cx, cy, hMaskListDC, lx, ly, 0x220326); /* NOTSRCAND */
|
||||||
|
BitBlt(hBlendMaskDC, 0, 0, cx, cy, hBlendMaskDC, 0, 0, NOTSRCCOPY);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* now apply blend to the current image given the BlendMask */
|
||||||
|
if (clrBlend == CLR_DEFAULT) clrBlend = GetSysColor (COLOR_HIGHLIGHT);
|
||||||
Index: listview.c
|
Index: listview.c
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
|
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
|
||||||
retrieving revision 1.384
|
retrieving revision 1.385
|
||||||
diff -u -r1.384 listview.c
|
diff -u -r1.385 listview.c
|
||||||
--- listview.c 20 Feb 2004 05:12:49 -0000 1.384
|
--- listview.c 11 Mar 2004 00:39:53 -0000 1.385
|
||||||
+++ listview.c 14 Mar 2004 09:18:43 -0000
|
+++ listview.c 15 Apr 2004 08:36:56 -0000
|
||||||
@@ -147,6 +147,7 @@
|
@@ -147,6 +147,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -41,48 +62,13 @@ diff -u -r1.384 listview.c
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
Index: rebar.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
|
|
||||||
retrieving revision 1.85
|
|
||||||
diff -u -r1.85 rebar.c
|
|
||||||
--- rebar.c 27 Feb 2004 04:32:54 -0000 1.85
|
|
||||||
+++ rebar.c 14 Mar 2004 09:18:47 -0000
|
|
||||||
@@ -985,7 +985,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
/* text is visible */
|
|
||||||
- if (lpBand->fStatus & HAS_TEXT) {
|
|
||||||
+ if ((lpBand->fStatus & HAS_TEXT) && !(lpBand->fStyle & RBBS_HIDETITLE)) {
|
|
||||||
lpBand->fDraw |= DRAW_TEXT;
|
|
||||||
lpBand->rcCapText.right = max(lpBand->rcCapText.left,
|
|
||||||
lpBand->rcCapText.right-REBAR_POST_TEXT);
|
|
||||||
@@ -1131,7 +1131,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
/* text is visible */
|
|
||||||
- if (lpBand->fStatus & HAS_TEXT) {
|
|
||||||
+ if ((lpBand->fStatus & HAS_TEXT) && !(lpBand->fStyle & RBBS_HIDETITLE)) {
|
|
||||||
lpBand->fDraw |= DRAW_TEXT;
|
|
||||||
lpBand->rcCapText.bottom = max(lpBand->rcCapText.top,
|
|
||||||
lpBand->rcCapText.bottom);
|
|
||||||
@@ -2027,7 +2027,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
/* text is visible */
|
|
||||||
- if ((lpBand->fMask & RBBIM_TEXT) && (lpBand->lpText)) {
|
|
||||||
+ if ((lpBand->fMask & RBBIM_TEXT) && (lpBand->lpText) &&
|
|
||||||
+ !(lpBand->fStyle & RBBS_HIDETITLE)) {
|
|
||||||
HDC hdc = GetDC (0);
|
|
||||||
HFONT hOldFont = SelectObject (hdc, infoPtr->hFont);
|
|
||||||
SIZE size;
|
|
||||||
Index: string.c
|
Index: string.c
|
||||||
===================================================================
|
===================================================================
|
||||||
RCS file: /home/wine/wine/dlls/comctl32/string.c,v
|
RCS file: /home/wine/wine/dlls/comctl32/string.c,v
|
||||||
retrieving revision 1.3
|
retrieving revision 1.3
|
||||||
diff -u -r1.3 string.c
|
diff -u -r1.3 string.c
|
||||||
--- string.c 20 Feb 2004 19:58:39 -0000 1.3
|
--- string.c 20 Feb 2004 19:58:39 -0000 1.3
|
||||||
+++ string.c 14 Mar 2004 09:18:48 -0000
|
+++ string.c 15 Apr 2004 08:36:56 -0000
|
||||||
@@ -254,7 +254,7 @@
|
@@ -254,7 +254,7 @@
|
||||||
{
|
{
|
||||||
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
|
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
|
||||||
|
@ -101,3 +87,19 @@ diff -u -r1.3 string.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
Index: treeview.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
|
||||||
|
retrieving revision 1.145
|
||||||
|
diff -u -r1.145 treeview.c
|
||||||
|
--- treeview.c 1 Mar 2004 23:10:52 -0000 1.145
|
||||||
|
+++ treeview.c 15 Apr 2004 08:36:58 -0000
|
||||||
|
@@ -3093,7 +3093,7 @@
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
|
if (wineItem->state & TVIS_EXPANDED)
|
||||||
|
- return FALSE;
|
||||||
|
+ return TRUE;
|
||||||
|
|
||||||
|
TRACE("TVE_EXPAND %p %s\n", wineItem, TREEVIEW_ItemName(wineItem));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue