ReactOS 0.4.16-dev-311-g9382aa2
pager.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "commctrl.h"
#include "comctl32.h"
#include "wine/debug.h"
#include "wine/heap.h"
Include dependency graph for pager.c:

Go to the source code of this file.

Classes

struct  PAGER_INFO
 

Macros

#define TIMERID1   1
 
#define TIMERID2   2
 
#define INITIAL_DELAY   500
 
#define REPEAT_DELAY   50
 

Enumerations

enum  conversion_flags {
  CONVERT_SEND = 0x01 , CONVERT_RECEIVE = 0x02 , SEND_EMPTY_IF_NULL = 0x04 , SET_NULL_IF_NO_MASK = 0x08 ,
  ZERO_SEND = 0x10
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (pager)
 
static void PAGER_GetButtonRects (const PAGER_INFO *infoPtr, RECT *prcTopLeft, RECT *prcBottomRight, BOOL bClientCoords)
 
static void PAGER_DrawButton (HDC hdc, COLORREF clrBk, RECT rc, BOOL horz, BOOL topLeft, INT btnState)
 
static LRESULT PAGER_ForwardMouse (PAGER_INFO *infoPtr, BOOL bFwd)
 
static LRESULT PAGER_GetButtonState (const PAGER_INFO *infoPtr, INT btn)
 
static INT PAGER_GetPos (const PAGER_INFO *infoPtr)
 
static INT PAGER_GetButtonSize (const PAGER_INFO *infoPtr)
 
static INT PAGER_GetBorder (const PAGER_INFO *infoPtr)
 
static COLORREF PAGER_GetBkColor (const PAGER_INFO *infoPtr)
 
static void PAGER_CalcSize (PAGER_INFO *infoPtr)
 
static void PAGER_PositionChildWnd (PAGER_INFO *infoPtr)
 
static INT PAGER_GetScrollRange (PAGER_INFO *infoPtr, BOOL calc_size)
 
static void PAGER_UpdateBtns (PAGER_INFO *infoPtr, INT scrollRange, BOOL hideGrayBtns)
 
static LRESULT PAGER_SetPos (PAGER_INFO *infoPtr, INT newPos, BOOL fromBtnPress, BOOL calc_size)
 
static LRESULT PAGER_RecalcSize (PAGER_INFO *infoPtr)
 
static COLORREF PAGER_SetBkColor (PAGER_INFO *infoPtr, COLORREF clrBk)
 
static INT PAGER_SetBorder (PAGER_INFO *infoPtr, INT iBorder)
 
static INT PAGER_SetButtonSize (PAGER_INFO *infoPtr, INT iButtonSize)
 
static LRESULT PAGER_SetChild (PAGER_INFO *infoPtr, HWND hwndChild)
 
static void PAGER_Scroll (PAGER_INFO *infoPtr, INT dir)
 
static LRESULT PAGER_FmtLines (const PAGER_INFO *infoPtr)
 
static LRESULT PAGER_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
 
static LRESULT PAGER_Destroy (PAGER_INFO *infoPtr)
 
static LRESULT PAGER_NCCalcSize (PAGER_INFO *infoPtr, WPARAM wParam, LPRECT lpRect)
 
static LRESULT PAGER_NCPaint (const PAGER_INFO *infoPtr, HRGN hRgn)
 
static INT PAGER_HitTest (const PAGER_INFO *infoPtr, const POINT *pt)
 
static LRESULT PAGER_NCHitTest (const PAGER_INFO *infoPtr, INT x, INT y)
 
static LRESULT PAGER_MouseMove (PAGER_INFO *infoPtr, INT keys, INT x, INT y)
 
static LRESULT PAGER_LButtonDown (PAGER_INFO *infoPtr, INT keys, INT x, INT y)
 
static LRESULT PAGER_LButtonUp (PAGER_INFO *infoPtr, INT keys, INT x, INT y)
 
static LRESULT PAGER_Timer (PAGER_INFO *infoPtr, INT nTimerId)
 
static LRESULT PAGER_EraseBackground (const PAGER_INFO *infoPtr, HDC hdc)
 
static LRESULT PAGER_Size (PAGER_INFO *infoPtr, INT type, INT x, INT y)
 
static LRESULT PAGER_StyleChanged (PAGER_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
 
static LRESULT PAGER_NotifyFormat (PAGER_INFO *infoPtr, INT command)
 
static UINT PAGER_GetAnsiNtfCode (UINT code)
 
static BOOL PAGER_AdjustBuffer (PAGER_INFO *infoPtr, INT size)
 
static WCHARPAGER_ConvertText (WCHAR **text)
 
static void PAGER_RestoreText (WCHAR **text, WCHAR *oldText)
 
static LRESULT PAGER_SendConvertedNotify (PAGER_INFO *infoPtr, NMHDR *hdr, UINT *mask, UINT requiredMask, WCHAR **text, INT *textMax, DWORD flags)
 
static LRESULT PAGER_Notify (PAGER_INFO *infoPtr, NMHDR *hdr)
 
static LRESULT WINAPI PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
VOID PAGER_Register (void)
 
VOID PAGER_Unregister (void)
 

Macro Definition Documentation

◆ INITIAL_DELAY

#define INITIAL_DELAY   500

Definition at line 93 of file pager.c.

◆ REPEAT_DELAY

#define REPEAT_DELAY   50

Definition at line 94 of file pager.c.

◆ TIMERID1

#define TIMERID1   1

Definition at line 91 of file pager.c.

◆ TIMERID2

#define TIMERID2   2

Definition at line 92 of file pager.c.

Enumeration Type Documentation

◆ conversion_flags

Enumerator
CONVERT_SEND 
CONVERT_RECEIVE 
SEND_EMPTY_IF_NULL 
SET_NULL_IF_NO_MASK 
ZERO_SEND 

Definition at line 97 of file pager.c.

98{
99 /* Convert Unicode text to ANSI for parent before sending. If not set, do nothing */
100 CONVERT_SEND = 0x01,
101 /* Convert ANSI text from parent back to Unicode for children */
102 CONVERT_RECEIVE = 0x02,
103 /* Send empty text to parent if text is NULL. Original text pointer still remains NULL */
104 SEND_EMPTY_IF_NULL = 0x04,
105 /* Set text to null after parent received the notification if the required mask is not set before sending notification */
106 SET_NULL_IF_NO_MASK = 0x08,
107 /* Zero out the text buffer before sending it to parent */
108 ZERO_SEND = 0x10
109};
@ CONVERT_RECEIVE
Definition: pager.c:102
@ ZERO_SEND
Definition: pager.c:108
@ SEND_EMPTY_IF_NULL
Definition: pager.c:104
@ SET_NULL_IF_NO_MASK
Definition: pager.c:106
@ CONVERT_SEND
Definition: pager.c:100

Function Documentation

◆ PAGER_AdjustBuffer()

static BOOL PAGER_AdjustBuffer ( PAGER_INFO infoPtr,
INT  size 
)
static

Definition at line 1094 of file pager.c.

1095{
1096 if (!infoPtr->pwszBuffer)
1097 infoPtr->pwszBuffer = heap_alloc(size);
1098 else if (infoPtr->nBufferSize < size)
1099 infoPtr->pwszBuffer = heap_realloc(infoPtr->pwszBuffer, size);
1100
1101 if (!infoPtr->pwszBuffer) return FALSE;
1102 if (infoPtr->nBufferSize < size) infoPtr->nBufferSize = size;
1103
1104 return TRUE;
1105}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLsizeiptr size
Definition: glext.h:5919
WCHAR * pwszBuffer
Definition: pager.c:87
INT nBufferSize
Definition: pager.c:88

Referenced by PAGER_Notify().

◆ PAGER_CalcSize()

static void PAGER_CalcSize ( PAGER_INFO infoPtr)
static

Definition at line 227 of file pager.c.

228{
229 NMPGCALCSIZE nmpgcs;
230 ZeroMemory (&nmpgcs, sizeof (NMPGCALCSIZE));
231 nmpgcs.hdr.hwndFrom = infoPtr->hwndSelf;
232 nmpgcs.hdr.idFrom = GetWindowLongPtrW (infoPtr->hwndSelf, GWLP_ID);
233 nmpgcs.hdr.code = PGN_CALCSIZE;
234 nmpgcs.dwFlag = (infoPtr->dwStyle & PGS_HORZ) ? PGF_CALCWIDTH : PGF_CALCHEIGHT;
235 nmpgcs.iWidth = infoPtr->nWidth;
236 nmpgcs.iHeight = infoPtr->nHeight;
237 SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs);
238
239 if (infoPtr->dwStyle & PGS_HORZ)
240 infoPtr->nWidth = nmpgcs.iWidth;
241 else
242 infoPtr->nHeight = nmpgcs.iHeight;
243
244 TRACE("[%p] PGN_CALCSIZE returns %dx%d\n", infoPtr->hwndSelf, nmpgcs.iWidth, nmpgcs.iHeight );
245}
#define PGN_CALCSIZE
Definition: commctrl.h:4585
#define PGF_CALCWIDTH
Definition: commctrl.h:4587
#define PGF_CALCHEIGHT
Definition: commctrl.h:4588
#define PGS_HORZ
Definition: commctrl.h:4508
#define WM_NOTIFY
Definition: richedit.h:61
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwFlag
Definition: commctrl.h:4592
HWND hwndSelf
Definition: pager.c:71
INT nHeight
Definition: pager.c:81
DWORD dwStyle
Definition: pager.c:75
HWND hwndNotify
Definition: pager.c:73
INT nWidth
Definition: pager.c:80
UINT_PTR idFrom
Definition: winuser.h:3161
UINT code
Definition: winuser.h:3162
HWND hwndFrom
Definition: winuser.h:3160
#define ZeroMemory
Definition: winbase.h:1737
LONG_PTR LPARAM
Definition: windef.h:208
#define GetWindowLongPtrW
Definition: winuser.h:4832
#define GWLP_ID
Definition: winuser.h:863
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by PAGER_GetScrollRange(), and PAGER_NCCalcSize().

◆ PAGER_ConvertText()

static WCHAR * PAGER_ConvertText ( WCHAR **  text)
static

Definition at line 1108 of file pager.c.

1109{
1110 WCHAR *oldText = *text;
1111 *text = NULL;
1112 Str_SetPtrWtoA((CHAR **)text, oldText);
1113 return oldText;
1114}
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN
#define NULL
Definition: types.h:112
const WCHAR * text
Definition: package.c:1794
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175

Referenced by PAGER_Notify().

◆ PAGER_Create()

static LRESULT PAGER_Create ( HWND  hwnd,
const CREATESTRUCTW lpcs 
)
static

Definition at line 573 of file pager.c.

574{
575 PAGER_INFO *infoPtr;
576 INT ret;
577
578 /* allocate memory for info structure */
579 infoPtr = heap_alloc_zero (sizeof(*infoPtr));
580 if (!infoPtr) return -1;
581 SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
582
583 /* set default settings */
584 infoPtr->hwndSelf = hwnd;
585 infoPtr->hwndChild = NULL;
586 infoPtr->hwndNotify = lpcs->hwndParent;
587 infoPtr->dwStyle = lpcs->style;
588 infoPtr->clrBk = GetSysColor(COLOR_BTNFACE);
589 infoPtr->nBorder = 0;
590 infoPtr->nButtonSize = 12;
591 infoPtr->nPos = 0;
592 infoPtr->nWidth = 0;
593 infoPtr->nHeight = 0;
594 infoPtr->bForward = FALSE;
595 infoPtr->bCapture = FALSE;
596 infoPtr->TLbtnState = PGF_INVISIBLE;
597 infoPtr->BRbtnState = PGF_INVISIBLE;
598 infoPtr->direction = -1;
599
600 if (infoPtr->dwStyle & PGS_DRAGNDROP)
601 FIXME("[%p] Drag and Drop style is not implemented yet.\n", infoPtr->hwndSelf);
602
603 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
604 infoPtr->bUnicode = (ret == NFR_UNICODE);
605
606 return 0;
607}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define PGF_INVISIBLE
Definition: commctrl.h:4512
#define PGS_DRAGNDROP
Definition: commctrl.h:4510
BOOL bUnicode
Definition: pager.c:74
COLORREF clrBk
Definition: pager.c:76
INT TLbtnState
Definition: pager.c:84
BOOL bForward
Definition: pager.c:82
BOOL bCapture
Definition: pager.c:83
INT nButtonSize
Definition: pager.c:78
INT direction
Definition: pager.c:86
INT nPos
Definition: pager.c:79
HWND hwndChild
Definition: pager.c:72
INT BRbtnState
Definition: pager.c:85
INT nBorder
Definition: pager.c:77
uint32_t DWORD_PTR
Definition: typedefs.h:65
int32_t INT
Definition: typedefs.h:58
int ret
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
UINT_PTR WPARAM
Definition: windef.h:207
DWORD WINAPI GetSysColor(_In_ int)
#define SetWindowLongPtrW
Definition: winuser.h:5358
#define NFR_UNICODE
Definition: winuser.h:2462
#define NF_QUERY
Definition: winuser.h:2463
#define COLOR_BTNFACE
Definition: winuser.h:931

Referenced by PAGER_WindowProc().

◆ PAGER_Destroy()

static LRESULT PAGER_Destroy ( PAGER_INFO infoPtr)
static

Definition at line 611 of file pager.c.

612{
613 SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0);
614 heap_free (infoPtr->pwszBuffer);
615 heap_free (infoPtr);
616 return 0;
617}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76

Referenced by PAGER_WindowProc().

◆ PAGER_DrawButton()

static void PAGER_DrawButton ( HDC  hdc,
COLORREF  clrBk,
RECT  rc,
BOOL  horz,
BOOL  topLeft,
INT  btnState 
)
static

Definition at line 136 of file pager.c.

138{
139 UINT flags;
140
141 TRACE("rc = %s, btnState = %d\n", wine_dbgstr_rect(&rc), btnState);
142
143 if (btnState == PGF_INVISIBLE)
144 return;
145
146 if ((rc.right - rc.left <= 0) || (rc.bottom - rc.top <= 0))
147 return;
148
149 if (horz)
151 else
152 flags = topLeft ? DFCS_SCROLLUP : DFCS_SCROLLDOWN;
153
154 switch (btnState)
155 {
156 case PGF_HOT:
157 break;
158 case PGF_NORMAL:
159 flags |= DFCS_FLAT;
160 break;
161 case PGF_DEPRESSED:
163 break;
164 case PGF_GRAYED:
166 break;
167 }
169}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
GLbitfield flags
Definition: glext.h:7161
HDC hdc
Definition: main.c:9
unsigned int UINT
Definition: ndis.h:50
#define PGF_HOT
Definition: commctrl.h:4516
#define PGF_GRAYED
Definition: commctrl.h:4514
#define PGF_NORMAL
Definition: commctrl.h:4513
#define PGF_DEPRESSED
Definition: commctrl.h:4515
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define DFC_SCROLL
Definition: winuser.h:475
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define DFCS_FLAT
Definition: winuser.h:510
#define DFCS_INACTIVE
Definition: winuser.h:502
#define DFCS_SCROLLUP
Definition: winuser.h:489
#define DFCS_SCROLLLEFT
Definition: winuser.h:491
#define DFCS_SCROLLRIGHT
Definition: winuser.h:492
#define DFCS_SCROLLDOWN
Definition: winuser.h:490
#define DFCS_PUSHED
Definition: winuser.h:503

Referenced by PAGER_MouseMove(), and PAGER_NCPaint().

◆ PAGER_EraseBackground()

static LRESULT PAGER_EraseBackground ( const PAGER_INFO infoPtr,
HDC  hdc 
)
static

Definition at line 970 of file pager.c.

971{
972 POINT pt, ptorig;
973 HWND parent;
974 LRESULT ret;
975
976 pt.x = 0;
977 pt.y = 0;
978 parent = GetParent(infoPtr->hwndSelf);
979 MapWindowPoints(infoPtr->hwndSelf, parent, &pt, 1);
980 OffsetWindowOrgEx (hdc, pt.x, pt.y, &ptorig);
982 SetWindowOrgEx (hdc, ptorig.x, ptorig.y, 0);
983
984 return ret;
985}
#define pt(x, y)
Definition: drawing.c:79
r parent
Definition: btrfs.c:3010
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG_PTR LRESULT
Definition: windef.h:209
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:532
BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:912
#define WM_ERASEBKGND
Definition: winuser.h:1628
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetParent(_In_ HWND)

Referenced by PAGER_WindowProc().

◆ PAGER_FmtLines()

static LRESULT PAGER_FmtLines ( const PAGER_INFO infoPtr)
static

Definition at line 558 of file pager.c.

559{
560 /* initiate NCCalcSize to resize client wnd and get size */
561 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
564
565 SetWindowPos(infoPtr->hwndChild, 0,
566 0,0,infoPtr->nWidth,infoPtr->nHeight,
567 0);
568
569 return DefWindowProcW (infoPtr->hwndSelf, EM_FMTLINES, 0, 0);
570}
#define SWP_NOACTIVATE
Definition: winuser.h:1245
#define SWP_FRAMECHANGED
Definition: winuser.h:1243
#define EM_FMTLINES
Definition: winuser.h:1989
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1247
#define SWP_NOSIZE
Definition: winuser.h:1248
#define SWP_NOZORDER
Definition: winuser.h:1250

Referenced by PAGER_WindowProc().

◆ PAGER_ForwardMouse()

static LRESULT PAGER_ForwardMouse ( PAGER_INFO infoPtr,
BOOL  bFwd 
)
inlinestatic

Definition at line 174 of file pager.c.

175{
176 TRACE("[%p]\n", infoPtr->hwndSelf);
177
178 infoPtr->bForward = bFwd;
179
180 return 0;
181}

Referenced by PAGER_WindowProc().

◆ PAGER_GetAnsiNtfCode()

static UINT PAGER_GetAnsiNtfCode ( UINT  code)
static

Definition at line 1041 of file pager.c.

1042{
1043 switch (code)
1044 {
1045 /* ComboxBoxEx */
1046 case CBEN_DRAGBEGINW: return CBEN_DRAGBEGINA;
1047 case CBEN_ENDEDITW: return CBEN_ENDEDITA;
1049 /* Date and Time Picker */
1050 case DTN_FORMATW: return DTN_FORMATA;
1052 case DTN_USERSTRINGW: return DTN_USERSTRINGA;
1053 case DTN_WMKEYDOWNW: return DTN_WMKEYDOWNA;
1054 /* Header */
1055 case HDN_BEGINTRACKW: return HDN_BEGINTRACKA;
1057 case HDN_ENDTRACKW: return HDN_ENDTRACKA;
1061 case HDN_ITEMCLICKW: return HDN_ITEMCLICKA;
1063 case HDN_TRACKW: return HDN_TRACKA;
1064 /* List View */
1068 case LVN_GETINFOTIPW: return LVN_GETINFOTIPA;
1070 case LVN_ODFINDITEMW: return LVN_ODFINDITEMA;
1072 /* Toolbar */
1074 case TBN_GETINFOTIPW: return TBN_GETINFOTIPA;
1075 /* Tooltip */
1077 /* Tree View */
1078 case TVN_BEGINDRAGW: return TVN_BEGINDRAGA;
1080 case TVN_BEGINRDRAGW: return TVN_BEGINRDRAGA;
1081 case TVN_DELETEITEMW: return TVN_DELETEITEMA;
1084 case TVN_GETINFOTIPW: return TVN_GETINFOTIPA;
1087 case TVN_SELCHANGEDW: return TVN_SELCHANGEDA;
1090 }
1091 return code;
1092}
#define TVN_ENDLABELEDITA
Definition: commctrl.h:3716
#define TVN_SELCHANGINGW
Definition: commctrl.h:3651
#define TTN_GETDISPINFOA
Definition: commctrl.h:1877
#define LVN_GETDISPINFOA
Definition: commctrl.h:3158
#define TVN_ITEMEXPANDEDW
Definition: commctrl.h:3707
#define DTN_WMKEYDOWNW
Definition: commctrl.h:4399
#define TVN_BEGINRDRAGW
Definition: commctrl.h:3711
#define LVN_ODFINDITEMW
Definition: commctrl.h:3150
#define TVN_SETDISPINFOW
Definition: commctrl.h:3662
#define HDN_ITEMDBLCLICKA
Definition: commctrl.h:843
#define HDN_BEGINTRACKA
Definition: commctrl.h:847
#define TVN_ITEMEXPANDINGA
Definition: commctrl.h:3704
#define TTN_GETDISPINFOW
Definition: commctrl.h:1878
#define HDN_ITEMCHANGEDW
Definition: commctrl.h:840
#define CBEN_ENDEDITW
Definition: commctrl.h:3881
#define TVN_BEGINLABELEDITA
Definition: commctrl.h:3714
#define LVN_GETINFOTIPA
Definition: commctrl.h:3227
#define LVN_SETDISPINFOW
Definition: commctrl.h:3161
#define CBEN_DRAGBEGINA
Definition: commctrl.h:3885
#define LVN_GETINFOTIPW
Definition: commctrl.h:3228
#define DTN_USERSTRINGA
Definition: commctrl.h:4378
#define TVN_GETINFOTIPW
Definition: commctrl.h:3720
#define TVN_SELCHANGEDW
Definition: commctrl.h:3653
#define TVN_BEGINRDRAGA
Definition: commctrl.h:3710
#define CBEN_ENDEDITA
Definition: commctrl.h:3880
#define HDN_ENDTRACKW
Definition: commctrl.h:850
#define TBN_GETBUTTONINFOW
Definition: commctrl.h:1343
#define TVN_ITEMEXPANDEDA
Definition: commctrl.h:3706
#define LVN_INCREMENTALSEARCHA
Definition: commctrl.h:3168
#define DTN_USERSTRINGW
Definition: commctrl.h:4379
#define HDN_ITEMCHANGINGA
Definition: commctrl.h:837
#define LVN_BEGINLABELEDITA
Definition: commctrl.h:3140
#define LVN_INCREMENTALSEARCHW
Definition: commctrl.h:3169
#define HDN_ITEMCLICKA
Definition: commctrl.h:841
#define CBEN_GETDISPINFOA
Definition: commctrl.h:3876
#define HDN_ENDTRACKA
Definition: commctrl.h:849
#define HDN_ITEMDBLCLICKW
Definition: commctrl.h:844
#define TVN_GETDISPINFOW
Definition: commctrl.h:3660
#define DTN_WMKEYDOWNA
Definition: commctrl.h:4398
#define TVN_SELCHANGINGA
Definition: commctrl.h:3650
#define HDN_TRACKW
Definition: commctrl.h:852
#define LVN_ENDLABELEDITW
Definition: commctrl.h:3143
#define DTN_FORMATW
Definition: commctrl.h:4419
#define LVN_SETDISPINFOA
Definition: commctrl.h:3160
#define LVN_BEGINLABELEDITW
Definition: commctrl.h:3141
#define TVN_BEGINDRAGW
Definition: commctrl.h:3709
#define HDN_ITEMCHANGINGW
Definition: commctrl.h:838
#define LVN_ENDLABELEDITA
Definition: commctrl.h:3142
#define TVN_DELETEITEMA
Definition: commctrl.h:3712
#define TBN_GETBUTTONINFOA
Definition: commctrl.h:1306
#define DTN_FORMATQUERYW
Definition: commctrl.h:4441
#define HDN_GETDISPINFOA
Definition: commctrl.h:853
#define TBN_GETINFOTIPA
Definition: commctrl.h:1341
#define HDN_GETDISPINFOW
Definition: commctrl.h:854
#define HDN_DIVIDERDBLCLICKW
Definition: commctrl.h:846
#define TVN_BEGINDRAGA
Definition: commctrl.h:3708
#define TVN_GETDISPINFOA
Definition: commctrl.h:3659
#define LVN_ODFINDITEMA
Definition: commctrl.h:3149
#define TVN_ITEMEXPANDINGW
Definition: commctrl.h:3705
#define HDN_BEGINTRACKW
Definition: commctrl.h:848
#define TVN_BEGINLABELEDITW
Definition: commctrl.h:3715
#define LVN_GETDISPINFOW
Definition: commctrl.h:3159
#define DTN_FORMATQUERYA
Definition: commctrl.h:4440
#define TBN_GETINFOTIPW
Definition: commctrl.h:1342
#define DTN_FORMATA
Definition: commctrl.h:4418
#define HDN_TRACKA
Definition: commctrl.h:851
#define CBEN_GETDISPINFOW
Definition: commctrl.h:3883
#define TVN_SELCHANGEDA
Definition: commctrl.h:3652
#define HDN_ITEMCHANGEDA
Definition: commctrl.h:839
#define TVN_SETDISPINFOA
Definition: commctrl.h:3661
#define HDN_ITEMCLICKW
Definition: commctrl.h:842
#define HDN_DIVIDERDBLCLICKA
Definition: commctrl.h:845
#define TVN_ENDLABELEDITW
Definition: commctrl.h:3717
#define TVN_DELETEITEMW
Definition: commctrl.h:3713
#define TVN_GETINFOTIPA
Definition: commctrl.h:3719
#define CBEN_DRAGBEGINW
Definition: commctrl.h:3886
Definition: inflate.c:139

Referenced by PAGER_Notify(), and PAGER_SendConvertedNotify().

◆ PAGER_GetBkColor()

static COLORREF PAGER_GetBkColor ( const PAGER_INFO infoPtr)
inlinestatic

Definition at line 220 of file pager.c.

221{
222 TRACE("[%p] returns %06x\n", infoPtr->hwndSelf, infoPtr->clrBk);
223 return infoPtr->clrBk;
224}

Referenced by PAGER_WindowProc().

◆ PAGER_GetBorder()

static INT PAGER_GetBorder ( const PAGER_INFO infoPtr)
inlinestatic

Definition at line 213 of file pager.c.

214{
215 TRACE("[%p] returns %d\n", infoPtr->hwndSelf, infoPtr->nBorder);
216 return infoPtr->nBorder;
217}

Referenced by PAGER_WindowProc().

◆ PAGER_GetButtonRects()

static void PAGER_GetButtonRects ( const PAGER_INFO infoPtr,
RECT prcTopLeft,
RECT prcBottomRight,
BOOL  bClientCoords 
)
static

Definition at line 112 of file pager.c.

113{
114 RECT rcWindow;
115 GetWindowRect (infoPtr->hwndSelf, &rcWindow);
116
117 if (bClientCoords)
118 MapWindowPoints( 0, infoPtr->hwndSelf, (POINT *)&rcWindow, 2 );
119 else
120 OffsetRect(&rcWindow, -rcWindow.left, -rcWindow.top);
121
122 *prcTopLeft = *prcBottomRight = rcWindow;
123 if (infoPtr->dwStyle & PGS_HORZ)
124 {
125 prcTopLeft->right = prcTopLeft->left + infoPtr->nButtonSize;
126 prcBottomRight->left = prcBottomRight->right - infoPtr->nButtonSize;
127 }
128 else
129 {
130 prcTopLeft->bottom = prcTopLeft->top + infoPtr->nButtonSize;
131 prcBottomRight->top = prcBottomRight->bottom - infoPtr->nButtonSize;
132 }
133}
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)

Referenced by PAGER_HitTest(), PAGER_MouseMove(), PAGER_NCPaint(), and PAGER_UpdateBtns().

◆ PAGER_GetButtonSize()

static INT PAGER_GetButtonSize ( const PAGER_INFO infoPtr)
inlinestatic

Definition at line 206 of file pager.c.

207{
208 TRACE("[%p] returns %d\n", infoPtr->hwndSelf, infoPtr->nButtonSize);
209 return infoPtr->nButtonSize;
210}

Referenced by PAGER_WindowProc().

◆ PAGER_GetButtonState()

static LRESULT PAGER_GetButtonState ( const PAGER_INFO infoPtr,
INT  btn 
)
inlinestatic

Definition at line 184 of file pager.c.

185{
186 LRESULT btnState = PGF_INVISIBLE;
187 TRACE("[%p]\n", infoPtr->hwndSelf);
188
189 if (btn == PGB_TOPORLEFT)
190 btnState = infoPtr->TLbtnState;
191 else if (btn == PGB_BOTTOMORRIGHT)
192 btnState = infoPtr->BRbtnState;
193
194 return btnState;
195}
#define PGB_TOPORLEFT
Definition: commctrl.h:4518
#define PGB_BOTTOMORRIGHT
Definition: commctrl.h:4519

Referenced by PAGER_WindowProc().

◆ PAGER_GetPos()

static INT PAGER_GetPos ( const PAGER_INFO infoPtr)
inlinestatic

Definition at line 199 of file pager.c.

200{
201 TRACE("[%p] returns %d\n", infoPtr->hwndSelf, infoPtr->nPos);
202 return infoPtr->nPos;
203}

Referenced by PAGER_WindowProc().

◆ PAGER_GetScrollRange()

static INT PAGER_GetScrollRange ( PAGER_INFO infoPtr,
BOOL  calc_size 
)
static

Definition at line 293 of file pager.c.

294{
295 INT scrollRange = 0;
296
297 if (infoPtr->hwndChild)
298 {
299 INT wndSize, childSize;
300 RECT wndRect;
301 GetWindowRect(infoPtr->hwndSelf, &wndRect);
302
303 if (calc_size)
304 PAGER_CalcSize(infoPtr);
305 if (infoPtr->dwStyle & PGS_HORZ)
306 {
307 wndSize = wndRect.right - wndRect.left;
308 childSize = infoPtr->nWidth;
309 }
310 else
311 {
312 wndSize = wndRect.bottom - wndRect.top;
313 childSize = infoPtr->nHeight;
314 }
315
316 TRACE("childSize = %d, wndSize = %d\n", childSize, wndSize);
317 if (childSize > wndSize)
318 scrollRange = childSize - wndSize + infoPtr->nButtonSize;
319 }
320
321 TRACE("[%p] returns %d\n", infoPtr->hwndSelf, scrollRange);
322 return scrollRange;
323}
static void PAGER_CalcSize(PAGER_INFO *infoPtr)
Definition: pager.c:227

Referenced by PAGER_RecalcSize(), and PAGER_SetPos().

◆ PAGER_HitTest()

static INT PAGER_HitTest ( const PAGER_INFO infoPtr,
const POINT pt 
)
static

Definition at line 691 of file pager.c.

692{
693 RECT clientRect, rcTopLeft, rcBottomRight;
694 POINT ptWindow;
695
696 GetClientRect (infoPtr->hwndSelf, &clientRect);
697
698 if (PtInRect(&clientRect, *pt))
699 {
700 TRACE("child\n");
701 return -1;
702 }
703
704 ptWindow = *pt;
705 PAGER_GetButtonRects(infoPtr, &rcTopLeft, &rcBottomRight, TRUE);
706
707 if ((infoPtr->TLbtnState != PGF_INVISIBLE) && PtInRect(&rcTopLeft, ptWindow))
708 {
709 TRACE("PGB_TOPORLEFT\n");
710 return PGB_TOPORLEFT;
711 }
712 else if ((infoPtr->BRbtnState != PGF_INVISIBLE) && PtInRect(&rcBottomRight, ptWindow))
713 {
714 TRACE("PGB_BOTTOMORRIGHT\n");
715 return PGB_BOTTOMORRIGHT;
716 }
717
718 TRACE("nowhere\n");
719 return -1;
720}
static void PAGER_GetButtonRects(const PAGER_INFO *infoPtr, RECT *prcTopLeft, RECT *prcBottomRight, BOOL bClientCoords)
Definition: pager.c:112
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by PAGER_LButtonDown(), PAGER_MouseMove(), and PAGER_NCHitTest().

◆ PAGER_LButtonDown()

static LRESULT PAGER_LButtonDown ( PAGER_INFO infoPtr,
INT  keys,
INT  x,
INT  y 
)
static

Definition at line 853 of file pager.c.

854{
855 BOOL repaintBtns = FALSE;
856 POINT pt;
857 INT hit;
858
859 pt.x = x;
860 pt.y = y;
861
862 TRACE("[%p] at (%d,%d)\n", infoPtr->hwndSelf, x, y);
863
864 hit = PAGER_HitTest(infoPtr, &pt);
865
866 /* put btn in DEPRESSED state */
867 if (hit == PGB_TOPORLEFT)
868 {
869 repaintBtns = infoPtr->TLbtnState != PGF_DEPRESSED;
870 infoPtr->TLbtnState = PGF_DEPRESSED;
872 }
873 else if (hit == PGB_BOTTOMORRIGHT)
874 {
875 repaintBtns = infoPtr->BRbtnState != PGF_DEPRESSED;
876 infoPtr->BRbtnState = PGF_DEPRESSED;
878 }
879
880 if (repaintBtns)
881 SendMessageW(infoPtr->hwndSelf, WM_NCPAINT, 0, 0);
882
883 switch(hit)
884 {
885 case PGB_TOPORLEFT:
886 if (infoPtr->dwStyle & PGS_HORZ)
887 {
888 TRACE("[%p] PGF_SCROLLLEFT\n", infoPtr->hwndSelf);
890 }
891 else
892 {
893 TRACE("[%p] PGF_SCROLLUP\n", infoPtr->hwndSelf);
894 PAGER_Scroll(infoPtr, PGF_SCROLLUP);
895 }
896 break;
898 if (infoPtr->dwStyle & PGS_HORZ)
899 {
900 TRACE("[%p] PGF_SCROLLRIGHT\n", infoPtr->hwndSelf);
902 }
903 else
904 {
905 TRACE("[%p] PGF_SCROLLDOWN\n", infoPtr->hwndSelf);
907 }
908 break;
909 default:
910 break;
911 }
912
913 return 0;
914}
static void PAGER_Scroll(PAGER_INFO *infoPtr, INT dir)
Definition: pager.c:510
#define INITIAL_DELAY
Definition: pager.c:93
static INT PAGER_HitTest(const PAGER_INFO *infoPtr, const POINT *pt)
Definition: pager.c:691
#define TIMERID1
Definition: pager.c:91
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define PGF_SCROLLDOWN
Definition: commctrl.h:4563
#define PGF_SCROLLRIGHT
Definition: commctrl.h:4565
#define PGF_SCROLLLEFT
Definition: commctrl.h:4564
#define PGF_SCROLLUP
Definition: commctrl.h:4562
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_NCPAINT
Definition: winuser.h:1690

Referenced by PAGER_WindowProc().

◆ PAGER_LButtonUp()

static LRESULT PAGER_LButtonUp ( PAGER_INFO infoPtr,
INT  keys,
INT  x,
INT  y 
)
static

Definition at line 917 of file pager.c.

918{
919 TRACE("[%p]\n", infoPtr->hwndSelf);
920
921 KillTimer (infoPtr->hwndSelf, TIMERID1);
922 KillTimer (infoPtr->hwndSelf, TIMERID2);
923
924 /* make PRESSED btns NORMAL but don't hide gray btns */
925 if (infoPtr->TLbtnState & (PGF_HOT | PGF_DEPRESSED))
926 infoPtr->TLbtnState = PGF_NORMAL;
927 if (infoPtr->BRbtnState & (PGF_HOT | PGF_DEPRESSED))
928 infoPtr->BRbtnState = PGF_NORMAL;
929
930 return 0;
931}
#define TIMERID2
Definition: pager.c:92
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Referenced by PAGER_WindowProc().

◆ PAGER_MouseMove()

static LRESULT PAGER_MouseMove ( PAGER_INFO infoPtr,
INT  keys,
INT  x,
INT  y 
)
static

Definition at line 738 of file pager.c.

739{
740 POINT clpt, pt;
741 RECT wnrect;
742 BOOL topLeft = FALSE;
743 INT btnstate = 0;
744 INT hit;
745 HDC hdc;
746
747 pt.x = x;
748 pt.y = y;
749
750 TRACE("[%p] to (%d,%d)\n", infoPtr->hwndSelf, x, y);
751 ClientToScreen(infoPtr->hwndSelf, &pt);
752 GetWindowRect(infoPtr->hwndSelf, &wnrect);
753 if (PtInRect(&wnrect, pt)) {
754 RECT topleft, bottomright, *rect = NULL;
755
756 PAGER_GetButtonRects(infoPtr, &topleft, &bottomright, FALSE);
757
758 clpt = pt;
759 MapWindowPoints(0, infoPtr->hwndSelf, &clpt, 1);
760 hit = PAGER_HitTest(infoPtr, &clpt);
761 if ((hit == PGB_TOPORLEFT) && (infoPtr->TLbtnState == PGF_NORMAL))
762 {
763 topLeft = TRUE;
764 rect = &topleft;
765 infoPtr->TLbtnState = PGF_HOT;
766 btnstate = infoPtr->TLbtnState;
767 }
768 else if ((hit == PGB_BOTTOMORRIGHT) && (infoPtr->BRbtnState == PGF_NORMAL))
769 {
770 topLeft = FALSE;
771 rect = &bottomright;
772 infoPtr->BRbtnState = PGF_HOT;
773 btnstate = infoPtr->BRbtnState;
774 }
775
776 /* If in one of the buttons the capture and draw buttons */
777 if (rect)
778 {
779 TRACE("[%p] draw btn (%s), Capture %s, style %08x\n",
780 infoPtr->hwndSelf, wine_dbgstr_rect(rect),
781 (infoPtr->bCapture) ? "TRUE" : "FALSE",
782 infoPtr->dwStyle);
783 if (!infoPtr->bCapture)
784 {
785 TRACE("[%p] SetCapture\n", infoPtr->hwndSelf);
786 SetCapture(infoPtr->hwndSelf);
787 infoPtr->bCapture = TRUE;
788 }
789 if (infoPtr->dwStyle & PGS_AUTOSCROLL)
790 SetTimer(infoPtr->hwndSelf, TIMERID1, 0x3e, 0);
791 hdc = GetWindowDC(infoPtr->hwndSelf);
792 /* OffsetRect(wnrect, 0 | 1, 0 | 1) */
793 PAGER_DrawButton(hdc, infoPtr->clrBk, *rect,
794 infoPtr->dwStyle & PGS_HORZ, topLeft, btnstate);
795 ReleaseDC(infoPtr->hwndSelf, hdc);
796 return 0;
797 }
798 }
799
800 /* If we think we are captured, then do release */
801 if (infoPtr->bCapture && (WindowFromPoint(pt) != infoPtr->hwndSelf))
802 {
803 NMHDR nmhdr;
804
805 infoPtr->bCapture = FALSE;
806
807 if (GetCapture() == infoPtr->hwndSelf)
808 {
810
811 if (infoPtr->TLbtnState == PGF_GRAYED)
812 {
813 infoPtr->TLbtnState = PGF_INVISIBLE;
814 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
817 }
818 else if (infoPtr->TLbtnState == PGF_HOT)
819 {
820 infoPtr->TLbtnState = PGF_NORMAL;
821 /* FIXME: just invalidate button rect */
823 }
824
825 if (infoPtr->BRbtnState == PGF_GRAYED)
826 {
827 infoPtr->BRbtnState = PGF_INVISIBLE;
828 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
831 }
832 else if (infoPtr->BRbtnState == PGF_HOT)
833 {
834 infoPtr->BRbtnState = PGF_NORMAL;
835 /* FIXME: just invalidate button rect */
837 }
838
839 /* Notify parent of released mouse capture */
840 memset(&nmhdr, 0, sizeof(NMHDR));
841 nmhdr.hwndFrom = infoPtr->hwndSelf;
842 nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
843 nmhdr.code = NM_RELEASEDCAPTURE;
844 SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
845 }
846 if (IsWindow(infoPtr->hwndSelf))
847 KillTimer(infoPtr->hwndSelf, TIMERID1);
848 }
849 return 0;
850}
static void PAGER_DrawButton(HDC hdc, COLORREF clrBk, RECT rc, BOOL horz, BOOL topLeft, INT btnState)
Definition: pager.c:136
static HDC
Definition: imagelist.c:88
#define NM_RELEASEDCAPTURE
Definition: commctrl.h:141
#define PGS_AUTOSCROLL
Definition: commctrl.h:4509
#define memset(x, y, z)
Definition: compat.h:39
& rect
Definition: startmenu.cpp:1413
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
HDC WINAPI GetWindowDC(_In_opt_ HWND)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
HWND WINAPI GetCapture(void)
Definition: message.c:2881
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define RDW_FRAME
Definition: winuser.h:1215
HWND WINAPI WindowFromPoint(_In_ POINT)
#define RDW_INVALIDATE
Definition: winuser.h:1217

Referenced by PAGER_WindowProc().

◆ PAGER_NCCalcSize()

static LRESULT PAGER_NCCalcSize ( PAGER_INFO infoPtr,
WPARAM  wParam,
LPRECT  lpRect 
)
static

Definition at line 620 of file pager.c.

621{
622 RECT rcChild, rcWindow;
623
624 /*
625 * lpRect points to a RECT struct. On entry, the struct
626 * contains the proposed wnd rectangle for the window.
627 * On exit, the struct should contain the screen
628 * coordinates of the corresponding window's client area.
629 */
630
631 DefWindowProcW (infoPtr->hwndSelf, WM_NCCALCSIZE, wParam, (LPARAM)lpRect);
632
633 TRACE("orig rect=%s\n", wine_dbgstr_rect(lpRect));
634
635 GetWindowRect (infoPtr->hwndChild, &rcChild);
636 MapWindowPoints (0, infoPtr->hwndSelf, (LPPOINT)&rcChild, 2); /* FIXME: RECT != 2 POINTS */
637 GetWindowRect (infoPtr->hwndSelf, &rcWindow);
638
639 infoPtr->nWidth = lpRect->right - lpRect->left;
640 infoPtr->nHeight = lpRect->bottom - lpRect->top;
641 PAGER_CalcSize( infoPtr );
642
643 if (infoPtr->dwStyle & PGS_HORZ)
644 {
645 if (infoPtr->TLbtnState && (lpRect->left + infoPtr->nButtonSize < lpRect->right))
646 lpRect->left += infoPtr->nButtonSize;
647 if (infoPtr->BRbtnState && (lpRect->right - infoPtr->nButtonSize > lpRect->left))
648 lpRect->right -= infoPtr->nButtonSize;
649 }
650 else
651 {
652 if (infoPtr->TLbtnState && (lpRect->top + infoPtr->nButtonSize < lpRect->bottom))
653 lpRect->top += infoPtr->nButtonSize;
654 if (infoPtr->BRbtnState && (lpRect->bottom - infoPtr->nButtonSize > lpRect->top))
655 lpRect->bottom -= infoPtr->nButtonSize;
656 }
657
658 TRACE("nPos=%d, nHeight=%d, window=%s\n", infoPtr->nPos, infoPtr->nHeight, wine_dbgstr_rect(&rcWindow));
659 TRACE("[%p] client rect set to %s BtnState[%d,%d]\n", infoPtr->hwndSelf, wine_dbgstr_rect(lpRect),
660 infoPtr->TLbtnState, infoPtr->BRbtnState);
661
662 return 0;
663}
WPARAM wParam
Definition: combotst.c:138
#define WM_NCCALCSIZE
Definition: winuser.h:1688

Referenced by PAGER_WindowProc().

◆ PAGER_NCHitTest()

static LRESULT PAGER_NCHitTest ( const PAGER_INFO infoPtr,
INT  x,
INT  y 
)
static

Definition at line 723 of file pager.c.

724{
725 POINT pt;
726 INT nHit;
727
728 pt.x = x;
729 pt.y = y;
730
731 ScreenToClient (infoPtr->hwndSelf, &pt);
732 nHit = PAGER_HitTest(infoPtr, &pt);
733
734 return (nHit < 0) ? HTTRANSPARENT : HTCLIENT;
735}
#define HTCLIENT
Definition: winuser.h:2478
#define HTTRANSPARENT
Definition: winuser.h:2476
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

Referenced by PAGER_WindowProc().

◆ PAGER_NCPaint()

static LRESULT PAGER_NCPaint ( const PAGER_INFO infoPtr,
HRGN  hRgn 
)
static

Definition at line 666 of file pager.c.

667{
668 RECT rcBottomRight, rcTopLeft;
669 HDC hdc;
670
671 if (infoPtr->dwStyle & WS_MINIMIZE)
672 return 0;
673
675
676 if (!(hdc = GetDCEx (infoPtr->hwndSelf, 0, DCX_USESTYLE | DCX_WINDOW)))
677 return 0;
678
679 PAGER_GetButtonRects(infoPtr, &rcTopLeft, &rcBottomRight, FALSE);
680
681 PAGER_DrawButton(hdc, infoPtr->clrBk, rcTopLeft,
682 infoPtr->dwStyle & PGS_HORZ, TRUE, infoPtr->TLbtnState);
683 PAGER_DrawButton(hdc, infoPtr->clrBk, rcBottomRight,
684 infoPtr->dwStyle & PGS_HORZ, FALSE, infoPtr->BRbtnState);
685
686 ReleaseDC( infoPtr->hwndSelf, hdc );
687 return 0;
688}
#define DCX_USESTYLE
Definition: GetDCEx.c:10
static HRGN hRgn
Definition: mapping.c:33
#define WS_MINIMIZE
Definition: pedump.c:622
#define DCX_WINDOW
Definition: winuser.h:2116
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)

Referenced by PAGER_WindowProc().

◆ PAGER_Notify()

static LRESULT PAGER_Notify ( PAGER_INFO infoPtr,
NMHDR hdr 
)
static

Definition at line 1181 of file pager.c.

1182{
1183 LRESULT ret;
1184
1185 if (infoPtr->bUnicode) return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1186
1187 switch (hdr->code)
1188 {
1189 /* ComboBoxEx */
1190 case CBEN_GETDISPINFOW:
1191 {
1192 NMCOMBOBOXEXW *nmcbe = (NMCOMBOBOXEXW *)hdr;
1193 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmcbe->ceItem.mask, CBEIF_TEXT, &nmcbe->ceItem.pszText,
1195 }
1196 case CBEN_DRAGBEGINW:
1197 {
1199 NMCBEDRAGBEGINA nmdbA = {{0}};
1200 nmdbA.hdr.code = PAGER_GetAnsiNtfCode(nmdbW->hdr.code);
1201 nmdbA.hdr.hwndFrom = nmdbW->hdr.hwndFrom;
1202 nmdbA.hdr.idFrom = nmdbW->hdr.idFrom;
1203 nmdbA.iItemid = nmdbW->iItemid;
1204 WideCharToMultiByte(CP_ACP, 0, nmdbW->szText, ARRAY_SIZE(nmdbW->szText), nmdbA.szText, ARRAY_SIZE(nmdbA.szText),
1205 NULL, FALSE);
1206 return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)&nmdbA);
1207 }
1208 case CBEN_ENDEDITW:
1209 {
1210 NMCBEENDEDITW *nmedW = (NMCBEENDEDITW *)hdr;
1211 NMCBEENDEDITA nmedA = {{0}};
1212 nmedA.hdr.code = PAGER_GetAnsiNtfCode(nmedW->hdr.code);
1213 nmedA.hdr.hwndFrom = nmedW->hdr.hwndFrom;
1214 nmedA.hdr.idFrom = nmedW->hdr.idFrom;
1215 nmedA.fChanged = nmedW->fChanged;
1216 nmedA.iNewSelection = nmedW->iNewSelection;
1217 nmedA.iWhy = nmedW->iWhy;
1218 WideCharToMultiByte(CP_ACP, 0, nmedW->szText, ARRAY_SIZE(nmedW->szText), nmedA.szText, ARRAY_SIZE(nmedA.szText),
1219 NULL, FALSE);
1220 return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)&nmedA);
1221 }
1222 /* Date and Time Picker */
1223 case DTN_FORMATW:
1224 {
1226 WCHAR *oldFormat;
1227 INT textLength;
1228
1229 hdr->code = PAGER_GetAnsiNtfCode(hdr->code);
1230 oldFormat = PAGER_ConvertText((WCHAR **)&nmdtf->pszFormat);
1231 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)nmdtf);
1232 PAGER_RestoreText((WCHAR **)&nmdtf->pszFormat, oldFormat);
1233
1234 if (nmdtf->pszDisplay)
1235 {
1236 textLength = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)nmdtf->pszDisplay, -1, 0, 0);
1237 if (!PAGER_AdjustBuffer(infoPtr, textLength * sizeof(WCHAR))) return ret;
1238 MultiByteToWideChar(CP_ACP, 0, (LPCSTR)nmdtf->pszDisplay, -1, infoPtr->pwszBuffer, textLength);
1239 if (nmdtf->pszDisplay != nmdtf->szDisplay)
1240 nmdtf->pszDisplay = infoPtr->pwszBuffer;
1241 else
1242 {
1243 textLength = min(textLength, ARRAY_SIZE(nmdtf->szDisplay));
1244 memcpy(nmdtf->szDisplay, infoPtr->pwszBuffer, textLength * sizeof(WCHAR));
1245 }
1246 }
1247
1248 return ret;
1249 }
1250 case DTN_FORMATQUERYW:
1251 {
1253 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, (WCHAR **)&nmdtfq->pszFormat, NULL, CONVERT_SEND);
1254 }
1255 case DTN_WMKEYDOWNW:
1256 {
1258 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, (WCHAR **)&nmdtkd->pszFormat, NULL, CONVERT_SEND);
1259 }
1260 case DTN_USERSTRINGW:
1261 {
1263 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, (WCHAR **)&nmdts->pszUserString, NULL, CONVERT_SEND);
1264 }
1265 /* Header */
1266 case HDN_BEGINTRACKW:
1268 case HDN_ENDTRACKW:
1269 case HDN_ITEMCHANGEDW:
1270 case HDN_ITEMCHANGINGW:
1271 case HDN_ITEMCLICKW:
1272 case HDN_ITEMDBLCLICKW:
1273 case HDN_TRACKW:
1274 {
1275 NMHEADERW *nmh = (NMHEADERW *)hdr;
1276 WCHAR *oldText = NULL, *oldFilterText = NULL;
1278
1279 hdr->code = PAGER_GetAnsiNtfCode(hdr->code);
1280
1281 if (!nmh->pitem) return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1282 if (nmh->pitem->mask & HDI_TEXT) oldText = PAGER_ConvertText(&nmh->pitem->pszText);
1283 if ((nmh->pitem->mask & HDI_FILTER) && (nmh->pitem->type == HDFT_ISSTRING) && nmh->pitem->pvFilter)
1284 {
1285 tf = (HD_TEXTFILTERW *)nmh->pitem->pvFilter;
1286 oldFilterText = PAGER_ConvertText(&tf->pszText);
1287 }
1288 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1289 PAGER_RestoreText(&nmh->pitem->pszText, oldText);
1290 if (tf) PAGER_RestoreText(&tf->pszText, oldFilterText);
1291 return ret;
1292 }
1293 case HDN_GETDISPINFOW:
1294 {
1295 NMHDDISPINFOW *nmhddi = (NMHDDISPINFOW *)hdr;
1296 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmhddi->mask, HDI_TEXT, &nmhddi->pszText, &nmhddi->cchTextMax,
1298 }
1299 /* List View */
1301 case LVN_ENDLABELEDITW:
1302 case LVN_SETDISPINFOW:
1303 {
1304 NMLVDISPINFOW *nmlvdi = (NMLVDISPINFOW *)hdr;
1305 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmlvdi->item.mask, LVIF_TEXT, &nmlvdi->item.pszText,
1307 }
1308 case LVN_GETDISPINFOW:
1309 {
1310 NMLVDISPINFOW *nmlvdi = (NMLVDISPINFOW *)hdr;
1311 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmlvdi->item.mask, LVIF_TEXT, &nmlvdi->item.pszText,
1312 &nmlvdi->item.cchTextMax, CONVERT_RECEIVE);
1313 }
1314 case LVN_GETINFOTIPW:
1315 {
1316 NMLVGETINFOTIPW *nmlvgit = (NMLVGETINFOTIPW *)hdr;
1317 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, &nmlvgit->pszText, &nmlvgit->cchTextMax,
1319 }
1321 case LVN_ODFINDITEMW:
1322 {
1323 NMLVFINDITEMW *nmlvfi = (NMLVFINDITEMW *)hdr;
1325 (WCHAR **)&nmlvfi->lvfi.psz, NULL, CONVERT_SEND);
1326 }
1327 /* Toolbar */
1328 case TBN_GETBUTTONINFOW:
1329 {
1330 NMTOOLBARW *nmtb = (NMTOOLBARW *)hdr;
1331 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, &nmtb->pszText, &nmtb->cchText,
1333 }
1334 case TBN_GETINFOTIPW:
1335 {
1336 NMTBGETINFOTIPW *nmtbgit = (NMTBGETINFOTIPW *)hdr;
1337 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, &nmtbgit->pszText, &nmtbgit->cchTextMax, CONVERT_RECEIVE);
1338 }
1339 /* Tooltip */
1340 case TTN_GETDISPINFOW:
1341 {
1342 NMTTDISPINFOW *nmttdiW = (NMTTDISPINFOW *)hdr;
1343 NMTTDISPINFOA nmttdiA = {{0}};
1344 INT size;
1345
1346 nmttdiA.hdr.code = PAGER_GetAnsiNtfCode(nmttdiW->hdr.code);
1347 nmttdiA.hdr.hwndFrom = nmttdiW->hdr.hwndFrom;
1348 nmttdiA.hdr.idFrom = nmttdiW->hdr.idFrom;
1349 nmttdiA.hinst = nmttdiW->hinst;
1350 nmttdiA.uFlags = nmttdiW->uFlags;
1351 nmttdiA.lParam = nmttdiW->lParam;
1352 nmttdiA.lpszText = nmttdiA.szText;
1353 WideCharToMultiByte(CP_ACP, 0, nmttdiW->szText, ARRAY_SIZE(nmttdiW->szText), nmttdiA.szText,
1354 ARRAY_SIZE(nmttdiA.szText), NULL, FALSE);
1355
1356 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)&nmttdiA);
1357
1358 nmttdiW->hinst = nmttdiA.hinst;
1359 nmttdiW->uFlags = nmttdiA.uFlags;
1360 nmttdiW->lParam = nmttdiA.lParam;
1361
1362 MultiByteToWideChar(CP_ACP, 0, nmttdiA.szText, ARRAY_SIZE(nmttdiA.szText), nmttdiW->szText,
1363 ARRAY_SIZE(nmttdiW->szText));
1364 if (!nmttdiA.lpszText)
1365 nmttdiW->lpszText = nmttdiW->szText;
1366 else if (!IS_INTRESOURCE(nmttdiA.lpszText))
1367 {
1368 size = MultiByteToWideChar(CP_ACP, 0, nmttdiA.lpszText, -1, 0, 0);
1369 if (size > ARRAY_SIZE(nmttdiW->szText))
1370 {
1371 if (!PAGER_AdjustBuffer(infoPtr, size * sizeof(WCHAR))) return ret;
1372 MultiByteToWideChar(CP_ACP, 0, nmttdiA.lpszText, -1, infoPtr->pwszBuffer, size);
1373 nmttdiW->lpszText = infoPtr->pwszBuffer;
1374 /* Override content in szText */
1375 memcpy(nmttdiW->szText, nmttdiW->lpszText, min(sizeof(nmttdiW->szText), size * sizeof(WCHAR)));
1376 }
1377 else
1378 {
1379 MultiByteToWideChar(CP_ACP, 0, nmttdiA.lpszText, -1, nmttdiW->szText, ARRAY_SIZE(nmttdiW->szText));
1380 nmttdiW->lpszText = nmttdiW->szText;
1381 }
1382 }
1383 else
1384 {
1385 nmttdiW->szText[0] = 0;
1386 nmttdiW->lpszText = (WCHAR *)nmttdiA.lpszText;
1387 }
1388
1389 return ret;
1390 }
1391 /* Tree View */
1392 case TVN_BEGINDRAGW:
1393 case TVN_BEGINRDRAGW:
1394 case TVN_ITEMEXPANDEDW:
1395 case TVN_ITEMEXPANDINGW:
1396 {
1397 NMTREEVIEWW *nmtv = (NMTREEVIEWW *)hdr;
1398 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmtv->itemNew.mask, TVIF_TEXT, &nmtv->itemNew.pszText, NULL,
1399 CONVERT_SEND);
1400 }
1401 case TVN_DELETEITEMW:
1402 {
1403 NMTREEVIEWW *nmtv = (NMTREEVIEWW *)hdr;
1404 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmtv->itemOld.mask, TVIF_TEXT, &nmtv->itemOld.pszText, NULL,
1405 CONVERT_SEND);
1406 }
1408 case TVN_ENDLABELEDITW:
1409 {
1410 NMTVDISPINFOW *nmtvdi = (NMTVDISPINFOW *)hdr;
1411 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmtvdi->item.mask, TVIF_TEXT, &nmtvdi->item.pszText,
1413 }
1414 case TVN_SELCHANGINGW:
1415 case TVN_SELCHANGEDW:
1416 {
1417 NMTREEVIEWW *nmtv = (NMTREEVIEWW *)hdr;
1418 WCHAR *oldItemOldText = NULL;
1419 WCHAR *oldItemNewText = NULL;
1420
1421 hdr->code = PAGER_GetAnsiNtfCode(hdr->code);
1422
1423 if (!((nmtv->itemNew.mask | nmtv->itemOld.mask) & TVIF_TEXT))
1424 return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1425
1426 if (nmtv->itemOld.mask & TVIF_TEXT) oldItemOldText = PAGER_ConvertText(&nmtv->itemOld.pszText);
1427 if (nmtv->itemNew.mask & TVIF_TEXT) oldItemNewText = PAGER_ConvertText(&nmtv->itemNew.pszText);
1428
1429 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1430 PAGER_RestoreText(&nmtv->itemOld.pszText, oldItemOldText);
1431 PAGER_RestoreText(&nmtv->itemNew.pszText, oldItemNewText);
1432 return ret;
1433 }
1434 case TVN_GETDISPINFOW:
1435 {
1436 NMTVDISPINFOW *nmtvdi = (NMTVDISPINFOW *)hdr;
1437 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmtvdi->item.mask, TVIF_TEXT, &nmtvdi->item.pszText,
1439 }
1440 case TVN_SETDISPINFOW:
1441 {
1442 NMTVDISPINFOW *nmtvdi = (NMTVDISPINFOW *)hdr;
1443 return PAGER_SendConvertedNotify(infoPtr, hdr, &nmtvdi->item.mask, TVIF_TEXT, &nmtvdi->item.pszText,
1445 }
1446 case TVN_GETINFOTIPW:
1447 {
1448 NMTVGETINFOTIPW *nmtvgit = (NMTVGETINFOTIPW *)hdr;
1449 return PAGER_SendConvertedNotify(infoPtr, hdr, NULL, 0, &nmtvgit->pszText, &nmtvgit->cchTextMax, CONVERT_RECEIVE);
1450 }
1451 }
1452 /* Other notifications, no need to convert */
1453 return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1454}
#define ARRAY_SIZE(A)
Definition: main.h:20
static LRESULT PAGER_SendConvertedNotify(PAGER_INFO *infoPtr, NMHDR *hdr, UINT *mask, UINT requiredMask, WCHAR **text, INT *textMax, DWORD flags)
Definition: pager.c:1124
static UINT PAGER_GetAnsiNtfCode(UINT code)
Definition: pager.c:1041
static BOOL PAGER_AdjustBuffer(PAGER_INFO *infoPtr, INT size)
Definition: pager.c:1094
static WCHAR * PAGER_ConvertText(WCHAR **text)
Definition: pager.c:1108
static void PAGER_RestoreText(WCHAR **text, WCHAR *oldText)
Definition: pager.c:1116
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
HFONT tf
Definition: icontest.c:17
char hdr[14]
Definition: iptest.cpp:33
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
#define HDI_TEXT
Definition: commctrl.h:704
#define LVFI_STRING
Definition: commctrl.h:2442
#define TVIF_TEXT
Definition: commctrl.h:3271
#define LVFI_SUBSTRING
Definition: commctrl.h:2443
#define HDFT_ISSTRING
Definition: commctrl.h:642
#define CBEIF_TEXT
Definition: commctrl.h:3791
#define LVIF_TEXT
Definition: commctrl.h:2314
#define HDI_FILTER
Definition: commctrl.h:711
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3908
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3902
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3927
int iNewSelection
Definition: commctrl.h:3926
int iNewSelection
Definition: commctrl.h:3918
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3919
COMBOBOXEXITEMW ceItem
Definition: commctrl.h:3869
UINT mask
Definition: commctrl.h:684
LPWSTR pszText
Definition: commctrl.h:686
UINT type
Definition: commctrl.h:693
void * pvFilter
Definition: commctrl.h:694
LVITEMW item
Definition: commctrl.h:3184
LPCWSTR psz
Definition: commctrl.h:2462
LPWSTR pszText
Definition: commctrl.h:2370
int cchTextMax
Definition: commctrl.h:2371
UINT mask
Definition: commctrl.h:2365
WCHAR szDisplay[64]
Definition: commctrl.h:4433
LPWSTR pszText
Definition: commctrl.h:901
HDITEMW * pitem
Definition: commctrl.h:891
LVFINDINFOW lvfi
Definition: commctrl.h:3106
LPWSTR pszText
Definition: commctrl.h:1452
TVITEMW itemNew
Definition: commctrl.h:3643
TVITEMW itemOld
Definition: commctrl.h:3642
char szText[80]
Definition: commctrl.h:1903
HINSTANCE hinst
Definition: commctrl.h:1904
HINSTANCE hinst
Definition: commctrl.h:1913
WCHAR szText[80]
Definition: commctrl.h:1912
TVITEMW item
Definition: commctrl.h:3677
UINT mask
Definition: commctrl.h:3321
LPWSTR pszText
Definition: commctrl.h:3325
int cchTextMax
Definition: commctrl.h:3326
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
const char * LPCSTR
Definition: xmlstorage.h:183

Referenced by PAGER_WindowProc().

◆ PAGER_NotifyFormat()

static LRESULT PAGER_NotifyFormat ( PAGER_INFO infoPtr,
INT  command 
)
static

Definition at line 1024 of file pager.c.

1025{
1026 INT ret;
1027 switch (command)
1028 {
1029 case NF_REQUERY:
1030 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
1031 infoPtr->bUnicode = (ret == NFR_UNICODE);
1032 return ret;
1033 case NF_QUERY:
1034 /* Pager always wants Unicode notifications from children */
1035 return NFR_UNICODE;
1036 default:
1037 return 0;
1038 }
1039}
#define NF_REQUERY
Definition: winuser.h:2464

Referenced by PAGER_WindowProc().

◆ PAGER_PositionChildWnd()

static void PAGER_PositionChildWnd ( PAGER_INFO infoPtr)
static

Definition at line 248 of file pager.c.

249{
250 if (infoPtr->hwndChild)
251 {
252 RECT rcClient;
253 int nPos = infoPtr->nPos;
254
255 /* compensate for a grayed btn, which will soon become invisible */
256 if (infoPtr->TLbtnState == PGF_GRAYED)
257 nPos += infoPtr->nButtonSize;
258
259 GetClientRect(infoPtr->hwndSelf, &rcClient);
260
261 if (infoPtr->dwStyle & PGS_HORZ)
262 {
263 int wndSize = max(0, rcClient.right - rcClient.left);
264 if (infoPtr->nWidth < wndSize)
265 infoPtr->nWidth = wndSize;
266
267 TRACE("[%p] SWP %dx%d at (%d,%d)\n", infoPtr->hwndSelf,
268 infoPtr->nWidth, infoPtr->nHeight,
269 -nPos, 0);
271 -nPos, 0,
272 infoPtr->nWidth, infoPtr->nHeight, 0);
273 }
274 else
275 {
276 int wndSize = max(0, rcClient.bottom - rcClient.top);
277 if (infoPtr->nHeight < wndSize)
278 infoPtr->nHeight = wndSize;
279
280 TRACE("[%p] SWP %dx%d at (%d,%d)\n", infoPtr->hwndSelf,
281 infoPtr->nWidth, infoPtr->nHeight,
282 0, -nPos);
284 0, -nPos,
285 infoPtr->nWidth, infoPtr->nHeight, 0);
286 }
287
288 InvalidateRect(infoPtr->hwndChild, NULL, TRUE);
289 }
290}
#define max(a, b)
Definition: svc.c:63
#define HWND_TOP
Definition: winuser.h:1210
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)

Referenced by PAGER_RecalcSize(), and PAGER_SetPos().

◆ PAGER_RecalcSize()

static LRESULT PAGER_RecalcSize ( PAGER_INFO infoPtr)
static

Definition at line 422 of file pager.c.

423{
424 TRACE("[%p]\n", infoPtr->hwndSelf);
425
426 if (infoPtr->hwndChild)
427 {
428 INT scrollRange = PAGER_GetScrollRange(infoPtr, TRUE);
429
430 if (scrollRange <= 0)
431 {
432 infoPtr->nPos = -1;
433 PAGER_SetPos(infoPtr, 0, FALSE, TRUE);
434 }
435 else
436 PAGER_PositionChildWnd(infoPtr);
437 }
438
439 return 1;
440}
static INT PAGER_GetScrollRange(PAGER_INFO *infoPtr, BOOL calc_size)
Definition: pager.c:293
static void PAGER_PositionChildWnd(PAGER_INFO *infoPtr)
Definition: pager.c:248
static LRESULT PAGER_SetPos(PAGER_INFO *infoPtr, INT newPos, BOOL fromBtnPress, BOOL calc_size)
Definition: pager.c:385

Referenced by PAGER_SetBorder(), PAGER_SetButtonSize(), PAGER_Size(), PAGER_StyleChanged(), and PAGER_WindowProc().

◆ PAGER_Register()

VOID PAGER_Register ( void  )

Definition at line 1563 of file pager.c.

1564{
1565 WNDCLASSW wndClass;
1566
1567 ZeroMemory (&wndClass, sizeof(WNDCLASSW));
1568 wndClass.style = CS_GLOBALCLASS;
1569 wndClass.lpfnWndProc = PAGER_WindowProc;
1570 wndClass.cbClsExtra = 0;
1571 wndClass.cbWndExtra = sizeof(PAGER_INFO *);
1572 wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
1573 wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
1575
1576 RegisterClassW (&wndClass);
1577}
static LRESULT WINAPI PAGER_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: pager.c:1457
#define WC_PAGESCROLLERW
Definition: commctrl.h:4502
LPCWSTR lpszClassName
Definition: winuser.h:3188
HBRUSH hbrBackground
Definition: winuser.h:3186
int cbClsExtra
Definition: winuser.h:3181
UINT style
Definition: winuser.h:3179
WNDPROC lpfnWndProc
Definition: winuser.h:3180
int cbWndExtra
Definition: winuser.h:3182
HCURSOR hCursor
Definition: winuser.h:3185
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2157
#define CS_GLOBALCLASS
Definition: winuser.h:652
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DllMain().

◆ PAGER_RestoreText()

static void PAGER_RestoreText ( WCHAR **  text,
WCHAR oldText 
)
static

Definition at line 1116 of file pager.c.

1117{
1118 if (!oldText) return;
1119
1120 Free(*text);
1121 *text = oldText;
1122}
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815

Referenced by PAGER_Notify().

◆ PAGER_Scroll()

static void PAGER_Scroll ( PAGER_INFO infoPtr,
INT  dir 
)
static

Definition at line 510 of file pager.c.

511{
512 NMPGSCROLL nmpgScroll;
513 RECT rcWnd;
514
515 if (infoPtr->hwndChild)
516 {
517 ZeroMemory (&nmpgScroll, sizeof (NMPGSCROLL));
518 nmpgScroll.hdr.hwndFrom = infoPtr->hwndSelf;
519 nmpgScroll.hdr.idFrom = GetWindowLongPtrW (infoPtr->hwndSelf, GWLP_ID);
520 nmpgScroll.hdr.code = PGN_SCROLL;
521
522 GetWindowRect(infoPtr->hwndSelf, &rcWnd);
523 GetClientRect(infoPtr->hwndSelf, &nmpgScroll.rcParent);
524 nmpgScroll.iXpos = nmpgScroll.iYpos = 0;
525 nmpgScroll.iDir = dir;
526
527 if (infoPtr->dwStyle & PGS_HORZ)
528 {
529 nmpgScroll.iScroll = rcWnd.right - rcWnd.left;
530 nmpgScroll.iXpos = infoPtr->nPos;
531 }
532 else
533 {
534 nmpgScroll.iScroll = rcWnd.bottom - rcWnd.top;
535 nmpgScroll.iYpos = infoPtr->nPos;
536 }
537 nmpgScroll.iScroll -= 2*infoPtr->nButtonSize;
538
539 SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, nmpgScroll.hdr.idFrom, (LPARAM)&nmpgScroll);
540
541 TRACE("[%p] PGN_SCROLL returns iScroll=%d\n", infoPtr->hwndSelf, nmpgScroll.iScroll);
542
543 if (nmpgScroll.iScroll > 0)
544 {
545 infoPtr->direction = dir;
546
547 if (dir == PGF_SCROLLLEFT || dir == PGF_SCROLLUP)
548 PAGER_SetPos(infoPtr, infoPtr->nPos - nmpgScroll.iScroll, TRUE, TRUE);
549 else
550 PAGER_SetPos(infoPtr, infoPtr->nPos + nmpgScroll.iScroll, TRUE, TRUE);
551 }
552 else
553 infoPtr->direction = -1;
554 }
555}
unsigned int dir
Definition: maze.c:112
#define PGN_SCROLL
Definition: commctrl.h:4560
RECT rcParent
Definition: commctrl.h:4576
int iScroll
Definition: commctrl.h:4580
NMHDR hdr
Definition: commctrl.h:4574

Referenced by PAGER_LButtonDown(), and PAGER_Timer().

◆ PAGER_SendConvertedNotify()

static LRESULT PAGER_SendConvertedNotify ( PAGER_INFO infoPtr,
NMHDR hdr,
UINT mask,
UINT  requiredMask,
WCHAR **  text,
INT textMax,
DWORD  flags 
)
static

Definition at line 1124 of file pager.c.

1126{
1127 CHAR *sendBuffer = NULL;
1128 CHAR *receiveBuffer;
1130 WCHAR *oldText;
1131 INT oldTextMax;
1133
1134 oldText = *text;
1135 oldTextMax = textMax ? *textMax : 0;
1136
1137 hdr->code = PAGER_GetAnsiNtfCode(hdr->code);
1138
1139 if (mask && !(*mask & requiredMask))
1140 {
1141 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1142 if (flags & SET_NULL_IF_NO_MASK) oldText = NULL;
1143 goto done;
1144 }
1145
1146 if (oldTextMax < 0) goto done;
1147
1148 if ((*text && flags & (CONVERT_SEND | ZERO_SEND)) || (!*text && flags & SEND_EMPTY_IF_NULL))
1149 {
1150 bufferSize = textMax ? *textMax : lstrlenW(*text) + 1;
1151 sendBuffer = heap_alloc_zero(bufferSize);
1152 if (!sendBuffer) goto done;
1153 if (!(flags & ZERO_SEND)) WideCharToMultiByte(CP_ACP, 0, *text, -1, sendBuffer, bufferSize, NULL, FALSE);
1154 *text = (WCHAR *)sendBuffer;
1155 }
1156
1157 ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
1158
1159 if (*text && oldText && (flags & CONVERT_RECEIVE))
1160 {
1161 /* MultiByteToWideChar requires that source and destination are not the same buffer */
1162 if (*text == oldText)
1163 {
1164 bufferSize = lstrlenA((CHAR *)*text) + 1;
1165 receiveBuffer = heap_alloc(bufferSize);
1166 if (!receiveBuffer) goto done;
1167 memcpy(receiveBuffer, *text, bufferSize);
1168 MultiByteToWideChar(CP_ACP, 0, receiveBuffer, bufferSize, oldText, oldTextMax);
1169 heap_free(receiveBuffer);
1170 }
1171 else
1172 MultiByteToWideChar(CP_ACP, 0, (CHAR *)*text, -1, oldText, oldTextMax);
1173 }
1174
1175done:
1176 heap_free(sendBuffer);
1177 *text = oldText;
1178 return ret;
1179}
#define NO_ERROR
Definition: dderror.h:5
#define lstrlenW
Definition: compat.h:750
size_t bufferSize
GLenum GLint GLuint mask
Definition: glext.h:6028
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145

Referenced by PAGER_Notify().

◆ PAGER_SetBkColor()

static COLORREF PAGER_SetBkColor ( PAGER_INFO infoPtr,
COLORREF  clrBk 
)
static

Definition at line 444 of file pager.c.

445{
446 COLORREF clrTemp = infoPtr->clrBk;
447
448 infoPtr->clrBk = clrBk;
449 TRACE("[%p] %06x\n", infoPtr->hwndSelf, infoPtr->clrBk);
450
451 /* the native control seems to do things this way */
452 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
455
457
458 return clrTemp;
459}
DWORD COLORREF
Definition: windef.h:300
#define RDW_ERASE
Definition: winuser.h:1214

Referenced by PAGER_WindowProc().

◆ PAGER_SetBorder()

static INT PAGER_SetBorder ( PAGER_INFO infoPtr,
INT  iBorder 
)
static

Definition at line 463 of file pager.c.

464{
465 INT nTemp = infoPtr->nBorder;
466
467 infoPtr->nBorder = iBorder;
468 TRACE("[%p] %d\n", infoPtr->hwndSelf, infoPtr->nBorder);
469
470 PAGER_RecalcSize(infoPtr);
471
472 return nTemp;
473}
static LRESULT PAGER_RecalcSize(PAGER_INFO *infoPtr)
Definition: pager.c:422

Referenced by PAGER_WindowProc().

◆ PAGER_SetButtonSize()

static INT PAGER_SetButtonSize ( PAGER_INFO infoPtr,
INT  iButtonSize 
)
static

Definition at line 477 of file pager.c.

478{
479 INT nTemp = infoPtr->nButtonSize;
480
481 infoPtr->nButtonSize = iButtonSize;
482 TRACE("[%p] %d\n", infoPtr->hwndSelf, infoPtr->nButtonSize);
483
484 PAGER_RecalcSize(infoPtr);
485
486 return nTemp;
487}

Referenced by PAGER_WindowProc().

◆ PAGER_SetChild()

static LRESULT PAGER_SetChild ( PAGER_INFO infoPtr,
HWND  hwndChild 
)
static

Definition at line 491 of file pager.c.

492{
493 infoPtr->hwndChild = IsWindow (hwndChild) ? hwndChild : 0;
494
495 if (infoPtr->hwndChild)
496 {
497 TRACE("[%p] hwndChild=%p\n", infoPtr->hwndSelf, infoPtr->hwndChild);
498
499 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
501
502 infoPtr->nPos = -1;
503 PAGER_SetPos(infoPtr, 0, FALSE, FALSE);
504 }
505
506 return 0;
507}

Referenced by PAGER_WindowProc().

◆ PAGER_SetPos()

static LRESULT PAGER_SetPos ( PAGER_INFO infoPtr,
INT  newPos,
BOOL  fromBtnPress,
BOOL  calc_size 
)
static

Definition at line 385 of file pager.c.

386{
387 INT scrollRange = PAGER_GetScrollRange(infoPtr, calc_size);
388 INT oldPos = infoPtr->nPos;
389
390 if ((scrollRange <= 0) || (newPos < 0))
391 infoPtr->nPos = 0;
392 else if (newPos > scrollRange)
393 infoPtr->nPos = scrollRange;
394 else
395 infoPtr->nPos = newPos;
396
397 TRACE("[%p] pos=%d, oldpos=%d\n", infoPtr->hwndSelf, infoPtr->nPos, oldPos);
398
399 if (infoPtr->nPos != oldPos)
400 {
401 /* gray and restore btns, and if from WM_SETPOS, hide the gray btns */
402 PAGER_UpdateBtns(infoPtr, scrollRange, !fromBtnPress);
403 PAGER_PositionChildWnd(infoPtr);
404 }
405
406 return 0;
407}
static void PAGER_UpdateBtns(PAGER_INFO *infoPtr, INT scrollRange, BOOL hideGrayBtns)
Definition: pager.c:326

Referenced by PAGER_RecalcSize(), PAGER_Scroll(), PAGER_SetChild(), and PAGER_WindowProc().

◆ PAGER_Size()

static LRESULT PAGER_Size ( PAGER_INFO infoPtr,
INT  type,
INT  x,
INT  y 
)
static

Definition at line 989 of file pager.c.

990{
991 /* note that WM_SIZE is sent whenever NCCalcSize resizes the client wnd */
992
993 TRACE("[%p] %d,%d\n", infoPtr->hwndSelf, x, y);
994
995 if (infoPtr->dwStyle & PGS_HORZ)
996 infoPtr->nHeight = y;
997 else
998 infoPtr->nWidth = x;
999
1000 return PAGER_RecalcSize(infoPtr);
1001}

Referenced by PAGER_WindowProc().

◆ PAGER_StyleChanged()

static LRESULT PAGER_StyleChanged ( PAGER_INFO infoPtr,
WPARAM  wStyleType,
const STYLESTRUCT lpss 
)
static

Definition at line 1005 of file pager.c.

1006{
1007 DWORD oldStyle = infoPtr->dwStyle;
1008
1009 TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
1010 wStyleType, lpss->styleOld, lpss->styleNew);
1011
1012 if (wStyleType != GWL_STYLE) return 0;
1013
1014 infoPtr->dwStyle = lpss->styleNew;
1015
1016 if ((oldStyle ^ lpss->styleNew) & (PGS_HORZ | PGS_VERT))
1017 {
1018 PAGER_RecalcSize(infoPtr);
1019 }
1020
1021 return 0;
1022}
unsigned long DWORD
Definition: ntddk_ex.h:95
#define PGS_VERT
Definition: commctrl.h:4507
DWORD styleNew
Definition: winuser.h:3696
DWORD styleOld
Definition: winuser.h:3695
#define GWL_STYLE
Definition: winuser.h:855

Referenced by PAGER_WindowProc().

◆ PAGER_Timer()

static LRESULT PAGER_Timer ( PAGER_INFO infoPtr,
INT  nTimerId 
)
static

Definition at line 934 of file pager.c.

935{
936 INT dir;
937
938 /* if initial timer, kill it and start the repeat timer */
939 if (nTimerId == TIMERID1) {
940 if (infoPtr->TLbtnState == PGF_HOT)
941 dir = (infoPtr->dwStyle & PGS_HORZ) ?
943 else
944 dir = (infoPtr->dwStyle & PGS_HORZ) ?
946 TRACE("[%p] TIMERID1: style=%08x, dir=%d\n",
947 infoPtr->hwndSelf, infoPtr->dwStyle, dir);
948 KillTimer(infoPtr->hwndSelf, TIMERID1);
949 SetTimer(infoPtr->hwndSelf, TIMERID1, REPEAT_DELAY, 0);
950 if (infoPtr->dwStyle & PGS_AUTOSCROLL) {
951 PAGER_Scroll(infoPtr, dir);
952 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
955 }
956 return 0;
957
958 }
959
960 TRACE("[%p] TIMERID2: dir=%d\n", infoPtr->hwndSelf, infoPtr->direction);
961 KillTimer(infoPtr->hwndSelf, TIMERID2);
962 if (infoPtr->direction > 0) {
963 PAGER_Scroll(infoPtr, infoPtr->direction);
964 SetTimer(infoPtr->hwndSelf, TIMERID2, REPEAT_DELAY, 0);
965 }
966 return 0;
967}
#define REPEAT_DELAY
Definition: pager.c:94

Referenced by PAGER_WindowProc().

◆ PAGER_Unregister()

VOID PAGER_Unregister ( void  )

Definition at line 1581 of file pager.c.

1582{
1584}
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)

Referenced by DllMain().

◆ PAGER_UpdateBtns()

static void PAGER_UpdateBtns ( PAGER_INFO infoPtr,
INT  scrollRange,
BOOL  hideGrayBtns 
)
static

Definition at line 326 of file pager.c.

327{
328 BOOL resizeClient;
329 BOOL repaintBtns;
330 INT oldTLbtnState = infoPtr->TLbtnState;
331 INT oldBRbtnState = infoPtr->BRbtnState;
332 POINT pt;
333 RECT rcTopLeft, rcBottomRight;
334
335 /* get button rects */
336 PAGER_GetButtonRects(infoPtr, &rcTopLeft, &rcBottomRight, TRUE);
337
339 ScreenToClient( infoPtr->hwndSelf, &pt );
340
341 /* update states based on scroll position */
342 if (infoPtr->nPos > 0)
343 {
344 if (infoPtr->TLbtnState == PGF_INVISIBLE || infoPtr->TLbtnState == PGF_GRAYED)
345 infoPtr->TLbtnState = PGF_NORMAL;
346 }
347 else if (!hideGrayBtns && PtInRect(&rcTopLeft, pt))
348 infoPtr->TLbtnState = PGF_GRAYED;
349 else
350 infoPtr->TLbtnState = PGF_INVISIBLE;
351
352 if (scrollRange <= 0)
353 {
354 infoPtr->TLbtnState = PGF_INVISIBLE;
355 infoPtr->BRbtnState = PGF_INVISIBLE;
356 }
357 else if (infoPtr->nPos < scrollRange)
358 {
359 if (infoPtr->BRbtnState == PGF_INVISIBLE || infoPtr->BRbtnState == PGF_GRAYED)
360 infoPtr->BRbtnState = PGF_NORMAL;
361 }
362 else if (!hideGrayBtns && PtInRect(&rcBottomRight, pt))
363 infoPtr->BRbtnState = PGF_GRAYED;
364 else
365 infoPtr->BRbtnState = PGF_INVISIBLE;
366
367 /* only need to resize when entering or leaving PGF_INVISIBLE state */
368 resizeClient =
369 ((oldTLbtnState == PGF_INVISIBLE) != (infoPtr->TLbtnState == PGF_INVISIBLE)) ||
370 ((oldBRbtnState == PGF_INVISIBLE) != (infoPtr->BRbtnState == PGF_INVISIBLE));
371 /* initiate NCCalcSize to resize client wnd if necessary */
372 if (resizeClient)
373 SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
376
377 /* repaint when changing any state */
378 repaintBtns = (oldTLbtnState != infoPtr->TLbtnState) ||
379 (oldBRbtnState != infoPtr->BRbtnState);
380 if (repaintBtns)
381 SendMessageW(infoPtr->hwndSelf, WM_NCPAINT, 0, 0);
382}
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2722

Referenced by PAGER_SetPos().

◆ PAGER_WindowProc()

static LRESULT WINAPI PAGER_WindowProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1457 of file pager.c.

1458{
1459 PAGER_INFO *infoPtr = (PAGER_INFO *)GetWindowLongPtrW(hwnd, 0);
1460
1461 TRACE("(%p, %#x, %#lx, %#lx)\n", hwnd, uMsg, wParam, lParam);
1462
1463 if (!infoPtr && (uMsg != WM_CREATE))
1464 return DefWindowProcW (hwnd, uMsg, wParam, lParam);
1465
1466 switch (uMsg)
1467 {
1468 case EM_FMTLINES:
1469 return PAGER_FmtLines(infoPtr);
1470
1471 case PGM_FORWARDMOUSE:
1472 return PAGER_ForwardMouse (infoPtr, (BOOL)wParam);
1473
1474 case PGM_GETBKCOLOR:
1475 return PAGER_GetBkColor(infoPtr);
1476
1477 case PGM_GETBORDER:
1478 return PAGER_GetBorder(infoPtr);
1479
1480 case PGM_GETBUTTONSIZE:
1481 return PAGER_GetButtonSize(infoPtr);
1482
1483 case PGM_GETPOS:
1484 return PAGER_GetPos(infoPtr);
1485
1486 case PGM_GETBUTTONSTATE:
1487 return PAGER_GetButtonState (infoPtr, (INT)lParam);
1488
1489/* case PGM_GETDROPTARGET: */
1490
1491 case PGM_RECALCSIZE:
1492 return PAGER_RecalcSize(infoPtr);
1493
1494 case PGM_SETBKCOLOR:
1495 return PAGER_SetBkColor (infoPtr, (COLORREF)lParam);
1496
1497 case PGM_SETBORDER:
1498 return PAGER_SetBorder (infoPtr, (INT)lParam);
1499
1500 case PGM_SETBUTTONSIZE:
1501 return PAGER_SetButtonSize (infoPtr, (INT)lParam);
1502
1503 case PGM_SETCHILD:
1504 return PAGER_SetChild (infoPtr, (HWND)lParam);
1505
1506 case PGM_SETPOS:
1507 return PAGER_SetPos(infoPtr, (INT)lParam, FALSE, TRUE);
1508
1509 case WM_CREATE:
1511
1512 case WM_DESTROY:
1513 return PAGER_Destroy (infoPtr);
1514
1515 case WM_SIZE:
1516 return PAGER_Size (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
1517
1518 case WM_NCPAINT:
1519 return PAGER_NCPaint (infoPtr, (HRGN)wParam);
1520
1521 case WM_STYLECHANGED:
1522 return PAGER_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
1523
1524 case WM_NCCALCSIZE:
1525 return PAGER_NCCalcSize (infoPtr, wParam, (LPRECT)lParam);
1526
1527 case WM_NCHITTEST:
1528 return PAGER_NCHitTest (infoPtr, (short)LOWORD(lParam), (short)HIWORD(lParam));
1529
1530 case WM_MOUSEMOVE:
1531 if (infoPtr->bForward && infoPtr->hwndChild)
1533 return PAGER_MouseMove (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
1534
1535 case WM_LBUTTONDOWN:
1536 return PAGER_LButtonDown (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
1537
1538 case WM_LBUTTONUP:
1539 return PAGER_LButtonUp (infoPtr, (INT)wParam, (short)LOWORD(lParam), (short)HIWORD(lParam));
1540
1541 case WM_ERASEBKGND:
1542 return PAGER_EraseBackground (infoPtr, (HDC)wParam);
1543
1544 case WM_TIMER:
1545 return PAGER_Timer (infoPtr, (INT)wParam);
1546
1547 case WM_NOTIFYFORMAT:
1548 return PAGER_NotifyFormat (infoPtr, lParam);
1549
1550 case WM_NOTIFY:
1551 return PAGER_Notify (infoPtr, (NMHDR *)lParam);
1552
1553 case WM_COMMAND:
1554 return SendMessageW (infoPtr->hwndNotify, uMsg, wParam, lParam);
1555
1556 default:
1557 return DefWindowProcW (hwnd, uMsg, wParam, lParam);
1558 }
1559}
LPARAM lParam
Definition: combotst.c:139
static LRESULT PAGER_GetButtonState(const PAGER_INFO *infoPtr, INT btn)
Definition: pager.c:184
static LRESULT PAGER_ForwardMouse(PAGER_INFO *infoPtr, BOOL bFwd)
Definition: pager.c:174
static LRESULT PAGER_FmtLines(const PAGER_INFO *infoPtr)
Definition: pager.c:558
static LRESULT PAGER_StyleChanged(PAGER_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
Definition: pager.c:1005
static LRESULT PAGER_NotifyFormat(PAGER_INFO *infoPtr, INT command)
Definition: pager.c:1024
static LRESULT PAGER_LButtonDown(PAGER_INFO *infoPtr, INT keys, INT x, INT y)
Definition: pager.c:853
static COLORREF PAGER_GetBkColor(const PAGER_INFO *infoPtr)
Definition: pager.c:220
static LRESULT PAGER_MouseMove(PAGER_INFO *infoPtr, INT keys, INT x, INT y)
Definition: pager.c:738
static INT PAGER_GetPos(const PAGER_INFO *infoPtr)
Definition: pager.c:199
static INT PAGER_SetButtonSize(PAGER_INFO *infoPtr, INT iButtonSize)
Definition: pager.c:477
static LRESULT PAGER_LButtonUp(PAGER_INFO *infoPtr, INT keys, INT x, INT y)
Definition: pager.c:917
static LRESULT PAGER_EraseBackground(const PAGER_INFO *infoPtr, HDC hdc)
Definition: pager.c:970
static LRESULT PAGER_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
Definition: pager.c:573
static LRESULT PAGER_NCHitTest(const PAGER_INFO *infoPtr, INT x, INT y)
Definition: pager.c:723
static LRESULT PAGER_SetChild(PAGER_INFO *infoPtr, HWND hwndChild)
Definition: pager.c:491
static LRESULT PAGER_NCPaint(const PAGER_INFO *infoPtr, HRGN hRgn)
Definition: pager.c:666
static LRESULT PAGER_NCCalcSize(PAGER_INFO *infoPtr, WPARAM wParam, LPRECT lpRect)
Definition: pager.c:620
static INT PAGER_GetBorder(const PAGER_INFO *infoPtr)
Definition: pager.c:213
static LRESULT PAGER_Timer(PAGER_INFO *infoPtr, INT nTimerId)
Definition: pager.c:934
static LRESULT PAGER_Destroy(PAGER_INFO *infoPtr)
Definition: pager.c:611
static COLORREF PAGER_SetBkColor(PAGER_INFO *infoPtr, COLORREF clrBk)
Definition: pager.c:444
static INT PAGER_GetButtonSize(const PAGER_INFO *infoPtr)
Definition: pager.c:206
static LRESULT PAGER_Size(PAGER_INFO *infoPtr, INT type, INT x, INT y)
Definition: pager.c:989
static INT PAGER_SetBorder(PAGER_INFO *infoPtr, INT iBorder)
Definition: pager.c:463
static LRESULT PAGER_Notify(PAGER_INFO *infoPtr, NMHDR *hdr)
Definition: pager.c:1181
#define LOWORD(l)
Definition: pedump.c:82
#define PGM_SETPOS
Definition: commctrl.h:4542
#define PGM_GETBUTTONSTATE
Definition: commctrl.h:4554
#define PGM_GETBORDER
Definition: commctrl.h:4539
#define PGM_SETBUTTONSIZE
Definition: commctrl.h:4548
#define PGM_SETBKCOLOR
Definition: commctrl.h:4530
#define PGM_SETCHILD
Definition: commctrl.h:4521
#define PGM_GETPOS
Definition: commctrl.h:4545
#define PGM_GETBKCOLOR
Definition: commctrl.h:4533
#define PGM_FORWARDMOUSE
Definition: commctrl.h:4527
#define PGM_GETBUTTONSIZE
Definition: commctrl.h:4551
#define PGM_SETBORDER
Definition: commctrl.h:4536
#define PGM_RECALCSIZE
Definition: commctrl.h:4524
#define HIWORD(l)
Definition: typedefs.h:247
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1611
#define WM_SIZE
Definition: winuser.h:1614
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_NCHITTEST
Definition: winuser.h:1689
#define WM_MOUSEMOVE
Definition: winuser.h:1778
#define WM_LBUTTONDOWN
Definition: winuser.h:1779
#define WM_TIMER
Definition: winuser.h:1745
#define WM_LBUTTONUP
Definition: winuser.h:1780
#define WM_DESTROY
Definition: winuser.h:1612

Referenced by PAGER_Register().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( pager  )