Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3ad67467
Commit
3ad67467
authored
Oct 24, 1998
by
Eric Kohl
Committed by
Alexandre Julliard
Oct 24, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor improvements and fixes.
parent
b075ce5f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
31 deletions
+96
-31
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+2
-2
pager.c
dlls/comctl32/pager.c
+49
-13
toolbar.c
dlls/comctl32/toolbar.c
+42
-14
common_controls
documentation/common_controls
+2
-1
comctl32.spec
relay32/comctl32.spec
+1
-1
No files found.
dlls/comctl32/comctl32undoc.c
View file @
3ad67467
...
...
@@ -252,7 +252,7 @@ FindMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
FIXME
(
commctrl
,
"(%lx %lx %lx %lx) empty stub!
\n
"
,
dwParam1
,
dwParam2
,
dwParam3
,
dwParam4
);
return
-
1
;
return
TRUE
;
}
...
...
@@ -1353,7 +1353,7 @@ DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
}
if
(
uOptions
&
DPAS_INSERTAFTER
)
{
TRACE
(
commctrl
,
"-- ret=%d
\n
"
,
r
);
TRACE
(
commctrl
,
"-- ret=%d
\n
"
,
l
);
return
l
;
}
}
...
...
dlls/comctl32/pager.c
View file @
3ad67467
...
...
@@ -91,6 +91,7 @@ PAGER_RecalcSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
NMPGCALCSIZE
nmpgcs
;
if
(
infoPtr
->
hwndChild
)
{
ZeroMemory
(
&
nmpgcs
,
sizeof
(
NMPGCALCSIZE
));
nmpgcs
.
hdr
.
hwndFrom
=
wndPtr
->
hwndSelf
;
nmpgcs
.
hdr
.
idFrom
=
wndPtr
->
wIDmenu
;
nmpgcs
.
hdr
.
code
=
PGN_CALCSIZE
;
...
...
@@ -166,10 +167,11 @@ PAGER_SetChild (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
FIXME
(
pager
,
"hwnd=%x
\n
"
,
infoPtr
->
hwndChild
);
/* FIXME: redraw */
SetParent32
(
infoPtr
->
hwndChild
,
wndPtr
->
hwndSelf
);
SetWindowPos32
(
infoPtr
->
hwndChild
,
wndPtr
->
hwndSelf
,
0
,
0
,
40
,
40
,
SWP_SHOWWINDOW
);
RedrawWindow32
(
wndPtr
->
hwndSelf
,
NULL
,
NULL
,
RDW_INVALIDATE
);
if
(
infoPtr
->
hwndChild
)
{
SetParent32
(
infoPtr
->
hwndChild
,
wndPtr
->
hwndSelf
);
SetWindowPos32
(
infoPtr
->
hwndChild
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
);
}
return
0
;
}
...
...
@@ -185,8 +187,8 @@ PAGER_SetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
FIXME
(
pager
,
"pos=%d
\n
"
,
infoPtr
->
nPos
);
/* FIXME: redraw */
SetWindowPos32
(
infoPtr
->
hwndChild
,
wndPtr
->
hwndSelf
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
);
SetWindowPos32
(
infoPtr
->
hwndChild
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_
SHOWWINDOW
|
SWP_
NOSIZE
);
return
0
;
}
...
...
@@ -212,7 +214,7 @@ PAGER_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/* set default settings */
infoPtr
->
hwndChild
=
0
;
infoPtr
->
hwndChild
=
(
HWND32
)
NULL
;
infoPtr
->
clrBk
=
GetSysColor32
(
COLOR_BTNFACE
);
infoPtr
->
nBorder
=
0
;
infoPtr
->
nButtonSize
=
0
;
...
...
@@ -245,10 +247,12 @@ PAGER_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HBRUSH32
hBrush
=
CreateSolidBrush32
(
infoPtr
->
clrBk
);
RECT32
rect
;
// GetClientRect32 (wndPtr->hwndSelf, &rect);
// FillRect32 ((HDC32)wParam, &rect, hBrush);
// DeleteObject32 (hBrush);
return
TRUE
;
GetClientRect32
(
wndPtr
->
hwndSelf
,
&
rect
);
FillRect32
((
HDC32
)
wParam
,
&
rect
,
hBrush
);
DeleteObject32
(
hBrush
);
// return TRUE;
return
FALSE
;
}
...
...
@@ -256,6 +260,28 @@ PAGER_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
// << PAGER_Paint >>
static
LRESULT
PAGER_Size
(
WND
*
wndPtr
,
WPARAM32
wParam
,
LPARAM
lParam
)
{
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
wndPtr
);
RECT32
rect
;
GetClientRect32
(
wndPtr
->
hwndSelf
,
&
rect
);
if
(
infoPtr
->
hwndChild
)
{
SetWindowPos32
(
infoPtr
->
hwndChild
,
HWND_TOP
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_SHOWWINDOW
);
// MoveWindow32 (infoPtr->hwndChild, 1, 1, rect.right - 2, rect.bottom-2, TRUE);
// UpdateWindow32 (infoPtr->hwndChild);
}
// FillRect32 ((HDC32)wParam, &rect, hBrush);
// DeleteObject32 (hBrush);
return
TRUE
;
}
LRESULT
WINAPI
PAGER_WindowProc
(
HWND32
hwnd
,
UINT32
uMsg
,
WPARAM32
wParam
,
LPARAM
lParam
)
{
...
...
@@ -316,6 +342,8 @@ PAGER_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
// case WM_PAINT:
// return PAGER_Paint (wndPtr, wParam);
case
WM_SIZE
:
return
PAGER_Size
(
wndPtr
,
wParam
,
lParam
);
default:
if
(
uMsg
>=
WM_USER
)
...
...
@@ -327,8 +355,8 @@ PAGER_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
}
void
PAGER_Register
(
void
)
VOID
PAGER_Register
(
VOID
)
{
WNDCLASS32A
wndClass
;
...
...
@@ -346,3 +374,11 @@ PAGER_Register (void)
RegisterClass32A
(
&
wndClass
);
}
VOID
PAGER_Unregister
(
VOID
)
{
if
(
GlobalFindAtom32A
(
WC_PAGESCROLLER32A
))
UnregisterClass32A
(
WC_PAGESCROLLER32A
,
(
HINSTANCE32
)
NULL
);
}
dlls/comctl32/toolbar.c
View file @
3ad67467
...
...
@@ -129,7 +129,7 @@ TOOLBAR_DrawMasked (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
HDC32
hdcImageList
=
CreateCompatibleDC32
(
0
);
HDC32
hdcMask
=
CreateCompatibleDC32
(
0
);
HIMAGELIST
himl
=
infoPtr
->
himl
Def
;
HIMAGELIST
himl
=
infoPtr
->
himl
Std
;
HBITMAP32
hbmMask
;
/* create new bitmap */
...
...
@@ -187,7 +187,15 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
DrawEdge32
(
hdc
,
&
rc
,
EDGE_RAISED
,
BF_SOFT
|
BF_RECT
|
BF_MIDDLE
|
BF_ADJUST
);
TOOLBAR_DrawMasked
(
infoPtr
,
btnPtr
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
);
if
(
bFlat
)
{
// if (infoPtr->himlDis)
ImageList_Draw
(
infoPtr
->
himlDis
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
,
ILD_NORMAL
);
// else
// TOOLBAR_DrawMasked (infoPtr, btnPtr, hdc, rc.left+1, rc.top+1);
}
else
TOOLBAR_DrawMasked
(
infoPtr
,
btnPtr
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
);
return
;
...
...
@@ -197,7 +205,7 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
if
(
btnPtr
->
fsState
&
TBSTATE_PRESSED
)
{
DrawEdge32
(
hdc
,
&
rc
,
EDGE_SUNKEN
,
BF_RECT
|
BF_MIDDLE
|
BF_ADJUST
);
ImageList_Draw
(
infoPtr
->
himl
Def
,
btnPtr
->
iBitmap
,
hdc
,
ImageList_Draw
(
infoPtr
->
himl
Std
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
2
,
rc
.
top
+
2
,
ILD_NORMAL
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
);
return
;
...
...
@@ -214,8 +222,12 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
BF_RECT
|
BF_MIDDLE
|
BF_ADJUST
);
TOOLBAR_DrawPattern
(
hdc
,
&
rc
);
ImageList_Draw
(
infoPtr
->
himlDef
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
2
,
rc
.
top
+
2
,
ILD_NORMAL
);
if
(
bFlat
)
ImageList_Draw
(
infoPtr
->
himlDef
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
2
,
rc
.
top
+
2
,
ILD_NORMAL
);
else
ImageList_Draw
(
infoPtr
->
himlStd
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
2
,
rc
.
top
+
2
,
ILD_NORMAL
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
);
return
;
}
...
...
@@ -234,8 +246,14 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
/* normal state */
DrawEdge32
(
hdc
,
&
rc
,
EDGE_RAISED
,
BF_SOFT
|
BF_RECT
|
BF_MIDDLE
|
BF_ADJUST
);
ImageList_Draw
(
infoPtr
->
himlDef
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
,
ILD_NORMAL
);
if
(
bFlat
)
ImageList_Draw
(
infoPtr
->
himlDef
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
,
ILD_NORMAL
);
else
ImageList_Draw
(
infoPtr
->
himlStd
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
,
ILD_NORMAL
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
);
}
...
...
@@ -603,7 +621,7 @@ TOOLBAR_AddBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if
(
!
(
infoPtr
->
himlDef
))
{
/* create new default image list */
TRACE
(
toolbar
,
"creating default image list!
\n
"
);
infoPtr
->
himl
Def
=
infoPtr
->
himl
Std
=
ImageList_Create
(
infoPtr
->
nBitmapWidth
,
infoPtr
->
nBitmapHeight
,
ILC_COLOR
|
ILC_MASK
,
(
INT32
)
wParam
,
2
);
}
...
...
@@ -622,7 +640,7 @@ TOOLBAR_AddBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
/* Add bitmaps to the default image list */
if
(
lpAddBmp
->
hInst
==
(
HINSTANCE32
)
0
)
{
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himl
Def
,
(
HBITMAP32
)
lpAddBmp
->
nID
,
ImageList_AddMasked
(
infoPtr
->
himl
Std
,
(
HBITMAP32
)
lpAddBmp
->
nID
,
CLR_DEFAULT
);
}
else
if
(
lpAddBmp
->
hInst
==
HINST_COMMCTRL
)
{
...
...
@@ -631,14 +649,14 @@ TOOLBAR_AddBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
/* Hack to "add" some reserved images within the image list
to get the right image indices */
nIndex
=
ImageList_GetImageCount
(
infoPtr
->
himl
Def
);
ImageList_SetImageCount
(
infoPtr
->
himl
Def
,
nIndex
+
(
INT32
)
wParam
);
nIndex
=
ImageList_GetImageCount
(
infoPtr
->
himl
Std
);
ImageList_SetImageCount
(
infoPtr
->
himl
Std
,
nIndex
+
(
INT32
)
wParam
);
}
else
{
HBITMAP32
hBmp
=
LoadBitmap32A
(
lpAddBmp
->
hInst
,
(
LPSTR
)
lpAddBmp
->
nID
);
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himl
Def
,
hBmp
,
CLR_DEFAULT
);
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himl
Std
,
hBmp
,
CLR_DEFAULT
);
DeleteObject32
(
hBmp
);
}
...
...
@@ -2052,7 +2070,7 @@ TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if
(
wndPtr
->
dwStyle
&
TBSTYLE_TOOLTIPS
)
{
/* Create tooltip control */
infoPtr
->
hwndToolTip
=
CreateWindowEx32A
(
0
,
TOOLTIPS_CLASS32A
,
NULL
,
TTS_ALWAYSTIP
,
CreateWindowEx32A
(
0
,
TOOLTIPS_CLASS32A
,
NULL
,
0
,
CW_USEDEFAULT32
,
CW_USEDEFAULT32
,
CW_USEDEFAULT32
,
CW_USEDEFAULT32
,
wndPtr
->
hwndSelf
,
0
,
0
,
0
);
...
...
@@ -2830,7 +2848,8 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
}
void
TOOLBAR_Register
(
void
)
VOID
TOOLBAR_Register
(
VOID
)
{
WNDCLASS32A
wndClass
;
...
...
@@ -2847,3 +2866,12 @@ void TOOLBAR_Register (void)
RegisterClass32A
(
&
wndClass
);
}
VOID
TOOLBAR_Unregister
(
VOID
)
{
if
(
GlobalFindAtom32A
(
TOOLBARCLASSNAME32A
))
UnregisterClass32A
(
TOOLBARCLASSNAME32A
,
(
HINSTANCE32
)
NULL
);
}
documentation/common_controls
View file @
3ad67467
...
...
@@ -198,7 +198,8 @@
Dummy written by Eric Kohl.
Status:
Dummy control. No functionality.
Development in progress.
Many bugs and missing features.
Notes:
Author needed!! Any volunteers??
...
...
relay32/comctl32.spec
View file @
3ad67467
...
...
@@ -16,7 +16,7 @@ init ComCtl32LibMain
8 stdcall CreateMappedBitmap(long long long ptr long) CreateMappedBitmap
9 stub COMCTL32_9
10 stub COMCTL32_10
11 stdcall COMCTL32_11(
long long
long long long long) COMCTL32_11
11 stdcall COMCTL32_11(
ptr ptr
long long long long) COMCTL32_11
#12 stub Cctl1632_ThunkData32
13 stub MakeDragList
14 stub LBItemFromPt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment