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
4d7e8778
Commit
4d7e8778
authored
Jul 31, 1999
by
Eric Kohl
Committed by
Alexandre Julliard
Jul 31, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added builtin toolbar bitmaps.
parent
f9b58070
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
26 deletions
+104
-26
comctl32.h
dlls/comctl32/comctl32.h
+10
-1
flatsb.c
dlls/comctl32/flatsb.c
+1
-2
pager.c
dlls/comctl32/pager.c
+9
-4
rsrc.rc
dlls/comctl32/rsrc.rc
+0
-0
toolbar.c
dlls/comctl32/toolbar.c
+84
-17
common_controls
documentation/common_controls
+0
-2
No files found.
dlls/comctl32/comctl32.h
View file @
4d7e8778
...
...
@@ -28,6 +28,15 @@ extern HMODULE COMCTL32_hModule;
#define IDC_MOVEUP_BTN 206
#define IDC_MOVEDN_BTN 207
/* Toolbar imagelist bitmaps */
#define IDB_STD_SMALL 120
#define IDB_STD_LARGE 121
#define IDB_VIEW_SMALL 124
#define IDB_VIEW_LARGE 125
#define IDB_HIST_SMALL 130
#define IDB_HIST_LARGE 131
/* Month calendar month menu popup */
#define IDD_MCMONTHMENU 300
...
...
@@ -42,4 +51,4 @@ extern HMODULE COMCTL32_hModule;
#define IDM_SEP 309
#define IDM_OCT 310
#define IDM_NOV 311
#define IDM_DEC 31
1
#define IDM_DEC 31
2
dlls/comctl32/flatsb.c
View file @
4d7e8778
...
...
@@ -21,7 +21,6 @@
#include "debugtools.h"
DECLARE_DEBUG_CHANNEL
(
commctrl
)
DECLARE_DEBUG_CHANNEL
(
datetime
)
#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongA (hwnd, 0))
...
...
@@ -143,7 +142,7 @@ FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
default
:
if
(
uMsg
>=
WM_USER
)
ERR_
(
datetime
)(
"unknown msg %04x wp=%08x lp=%08lx
\n
"
,
ERR_
(
commctrl
)(
"unknown msg %04x wp=%08x lp=%08lx
\n
"
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
...
...
dlls/comctl32/pager.c
View file @
4d7e8778
...
...
@@ -168,9 +168,14 @@ PAGER_SetChild (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* FIXME: redraw */
if
(
infoPtr
->
hwndChild
)
{
RECT
rect
;
GetClientRect
(
hwnd
,
&
rect
);
SetParent
(
infoPtr
->
hwndChild
,
hwnd
);
SetWindowPos
(
infoPtr
->
hwndChild
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
);
MoveWindow
(
infoPtr
->
hwndChild
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
TRUE
);
}
return
0
;
...
...
@@ -271,12 +276,12 @@ PAGER_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
SetWindowPos
(
infoPtr
->
hwndChild
,
HWND_TOP
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_SHOWWINDOW
);
/* MoveWindow
32
(infoPtr->hwndChild, 1, 1, rect.right - 2, rect.bottom-2, TRUE); */
/* UpdateWindow
32
(infoPtr->hwndChild); */
/* MoveWindow (infoPtr->hwndChild, 1, 1, rect.right - 2, rect.bottom-2, TRUE); */
/* UpdateWindow (infoPtr->hwndChild); */
}
/* FillRect
32 ((HDC32
)wParam, &rect, hBrush); */
/* DeleteObject
32
(hBrush); */
/* FillRect
((HDC
)wParam, &rect, hBrush); */
/* DeleteObject (hBrush); */
return
TRUE
;
}
...
...
dlls/comctl32/rsrc.rc
View file @
4d7e8778
This diff is collapsed.
Click to expand it.
dlls/comctl32/toolbar.c
View file @
4d7e8778
...
...
@@ -11,7 +11,6 @@
* - Fix TB_SETROWS.
* - Tooltip support (almost complete).
* - Unicode suppport.
* - Internal COMMCTL32 bitmaps.
* - Fix TOOLBAR_SetButtonInfo32A.
* - Customize dialog (under construction).
*
...
...
@@ -42,7 +41,7 @@ DEFAULT_DEBUG_CHANNEL(toolbar)
#define TOP_BORDER 2
#define BOTTOM_BORDER 2
#define TOOLBAR_GetInfoPtr(
wndPtr
) ((TOOLBAR_INFO *)GetWindowLongA(hwnd,0))
#define TOOLBAR_GetInfoPtr(
hwnd
) ((TOOLBAR_INFO *)GetWindowLongA(hwnd,0))
static
void
...
...
@@ -127,10 +126,17 @@ TOOLBAR_DrawMasked (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
/* FIXME: this function is a hack since it uses image list
internals directly */
HDC
hdcImageList
=
CreateCompatibleDC
(
0
);
HDC
hdcMask
=
CreateCompatibleDC
(
0
);
HIMAGELIST
himl
=
infoPtr
->
himlDef
;
HBITMAP
hbmMask
;
HDC
hdcImageList
;
HDC
hdcMask
;
if
(
!
himl
)
return
;
/* create new dc's */
hdcImageList
=
CreateCompatibleDC
(
0
);
hdcMask
=
CreateCompatibleDC
(
0
);
/* create new bitmap */
hbmMask
=
CreateBitmap
(
himl
->
cx
,
himl
->
cy
,
1
,
1
,
NULL
);
...
...
@@ -180,7 +186,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
/* separator */
if
(
btnPtr
->
fsStyle
&
TBSTYLE_SEP
)
{
if
((
dwStyle
&
TBSTYLE_FLAT
)
&&
(
btnPtr
->
i
dCommand
==
0
))
if
((
dwStyle
&
TBSTYLE_FLAT
)
&&
(
btnPtr
->
i
Bitmap
==
0
))
TOOLBAR_DrawFlatSeparator
(
&
rc
,
hdc
);
return
;
}
...
...
@@ -741,6 +747,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DSA_InsertItem
(
hDsa
,
i
,
btnPtr
);
/* FIXME: hidden buttons appear in the 'toolbar buttons' list too */
if
(
btnPtr
->
fsState
&
TBSTATE_HIDDEN
)
{
SendDlgItemMessageA
(
hwnd
,
IDC_AVAILBTN_LBOX
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
""
);
...
...
@@ -751,7 +758,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
}
/* append 'virtual' sepa
t
ator button to the 'toolbar buttons' list */
/* append 'virtual' sepa
r
ator button to the 'toolbar buttons' list */
/* TODO */
}
return
TRUE
;
...
...
@@ -815,10 +822,22 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* draw button */
DrawEdge
(
lpdis
->
hDC
,
&
rcButton
,
EDGE_RAISED
,
BF_RECT
|
BF_MIDDLE
|
BF_SOFT
);
/* FIXME: draw bitmap */
/*
ImageList_Draw (infoPtr->himlStd, btnPtr->iBitmap, hdc,
rcButton.left+1, rcButton.top+1, ILD_NORMAL);
*/
/* draw text */
if
(
wParam
==
IDC_AVAILBTN_LBOX
&&
lpdis
->
itemID
==
0
)
{
/* virtual separator in the 'available' list */
DrawTextA
(
lpdis
->
hDC
,
"Separator"
,
-
1
,
&
rcText
,
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
);
}
else
{
/* real button */
}
if
(
lpdis
->
itemState
&
ODS_FOCUS
)
{
...
...
@@ -863,6 +882,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
LPTBADDBITMAP
lpAddBmp
=
(
LPTBADDBITMAP
)
lParam
;
INT
nIndex
=
0
,
nButtons
;
HBITMAP
hbmLoad
;
if
(
!
lpAddBmp
)
return
-
1
;
...
...
@@ -880,7 +900,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
TRACE
(
"adding %d internal bitmaps!
\n
"
,
nButtons
);
/* Windows resize all the buttons to the size of a newly added
STandard Image
*/
/* Windows resize all the buttons to the size of a newly added
standard image
*/
if
(
lpAddBmp
->
nID
&
1
)
{
/* large icons */
...
...
@@ -928,21 +948,68 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
else
if
(
lpAddBmp
->
hInst
==
HINST_COMMCTRL
)
{
/* add internal bitmaps */
FIXME
(
"internal bitmaps not supported!
\n
"
);
/* Add system bitmaps */
switch
(
lpAddBmp
->
nID
)
{
case
IDB_STD_SMALL_COLOR
:
hbmLoad
=
LoadBitmapA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
IDB_STD_SMALL
));
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
break
;
case
IDB_STD_LARGE_COLOR
:
hbmLoad
=
LoadBitmapA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
IDB_STD_LARGE
));
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
break
;
case
IDB_VIEW_SMALL_COLOR
:
hbmLoad
=
LoadBitmapA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
IDB_VIEW_SMALL
));
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
break
;
case
IDB_VIEW_LARGE_COLOR
:
hbmLoad
=
LoadBitmapA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
IDB_VIEW_LARGE
));
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
break
;
case
IDB_HIST_SMALL_COLOR
:
hbmLoad
=
LoadBitmapA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
IDB_HIST_SMALL
));
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
break
;
/* Hack to "add" some reserved images within the image list
to get the right image indices */
case
IDB_HIST_LARGE_COLOR
:
hbmLoad
=
LoadBitmapA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
IDB_HIST_LARGE
));
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
break
;
default
:
nIndex
=
ImageList_GetImageCount
(
infoPtr
->
himlDef
);
ImageList_SetImageCount
(
infoPtr
->
himlDef
,
nIndex
+
nButtons
);
ERR
(
"invalid imagelist!
\n
"
);
break
;
}
}
else
{
HBITMAP
hBmp
=
LoadBitmapA
(
lpAddBmp
->
hInst
,
(
LPSTR
)
lpAddBmp
->
nID
);
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hBmp
,
CLR_DEFAULT
);
DeleteObject
(
hBmp
);
hbmLoad
=
LoadBitmapA
(
lpAddBmp
->
hInst
,
(
LPSTR
)
lpAddBmp
->
nID
);
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlDef
,
hbmLoad
,
CLR_DEFAULT
);
DeleteObject
(
hbmLoad
);
}
infoPtr
->
nNumBitmaps
+=
nButtons
;
...
...
documentation/common_controls
View file @
4d7e8778
...
...
@@ -301,8 +301,6 @@
Development in progress.
Basic functionality is almost done. (dll version 4.0)
Notes:
Bitmaps are not correctly displayed.
3.20 Tooltip Control
...
...
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