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
bac71315
Commit
bac71315
authored
Jul 03, 2002
by
Gregg Mattinson
Committed by
Alexandre Julliard
Jul 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed non-static structure initializers.
parent
73f0bfb8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
203 additions
and
85 deletions
+203
-85
pager.c
dlls/comctl32/pager.c
+17
-5
filedlg95.c
dlls/commdlg/filedlg95.c
+6
-7
thunks.c
dlls/ddraw/ddraw/thunks.c
+18
-4
thunks.c
dlls/ddraw/dsurface/thunks.c
+16
-3
proxyodbc.c
dlls/odbc32/proxyodbc.c
+1
-1
socket.c
dlls/winsock/socket.c
+16
-4
winefile.c
programs/winefile/winefile.c
+129
-61
No files found.
dlls/comctl32/pager.c
View file @
bac71315
...
...
@@ -1114,7 +1114,11 @@ PAGER_HitTest (HWND hwnd, LPPOINT pt)
static
LRESULT
PAGER_NCHitTest
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
POINT
pt
=
{
SLOWORD
(
lParam
),
SHIWORD
(
lParam
)
};
POINT
pt
;
pt
.
x
=
SLOWORD
(
lParam
);
pt
.
y
=
SHIWORD
(
lParam
);
ScreenToClient
(
hwnd
,
&
pt
);
return
PAGER_HitTest
(
hwnd
,
&
pt
);
}
...
...
@@ -1184,7 +1188,7 @@ static LRESULT
PAGER_MouseMove
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
POINT
clpt
,
pt
=
{
SLOWORD
(
lParam
),
SHIWORD
(
lParam
)}
;
POINT
clpt
,
pt
;
RECT
wnrect
,
TLbtnrect
,
BRbtnrect
,
*
btnrect
=
NULL
;
DWORD
dwStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
BOOL
topLeft
=
FALSE
;
...
...
@@ -1192,6 +1196,9 @@ PAGER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
INT
hit
;
HDC
hdc
;
pt
.
x
=
SLOWORD
(
lParam
);
pt
.
y
=
SHIWORD
(
lParam
);
TRACE
(
"[%08x] to (%ld,%ld)
\n
"
,
hwnd
,
pt
.
x
,
pt
.
y
);
ClientToScreen
(
hwnd
,
&
pt
);
GetWindowRect
(
hwnd
,
&
wnrect
);
...
...
@@ -1272,9 +1279,12 @@ PAGER_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
BOOL
repaintBtns
=
FALSE
;
POINT
pt
=
{
SLOWORD
(
lParam
),
SHIWORD
(
lParam
)
}
;
POINT
pt
;
INT
hit
;
pt
.
x
=
SLOWORD
(
lParam
);
pt
.
y
=
SHIWORD
(
lParam
);
TRACE
(
"[%08x] at (%d,%d)
\n
"
,
hwnd
,
SLOWORD
(
lParam
),
SHIWORD
(
lParam
));
hit
=
PAGER_HitTest
(
hwnd
,
&
pt
);
...
...
@@ -1339,7 +1349,10 @@ PAGER_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
static
LRESULT
PAGER_NCLButtonDown
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
POINT
pt
=
{
SLOWORD
(
lParam
),
SHIWORD
(
lParam
)};
POINT
pt
;
pt
.
x
=
SLOWORD
(
lParam
);
pt
.
y
=
SHIWORD
(
lParam
);
TRACE
(
"[%08x] at (%d,%d)
\n
"
,
hwnd
,
SLOWORD
(
lParam
),
SHIWORD
(
lParam
));
MapWindowPoints
(
0
,
hwnd
,
&
pt
,
1
);
...
...
@@ -1592,4 +1605,3 @@ PAGER_Unregister (void)
{
UnregisterClassA
(
WC_PAGESCROLLERA
,
(
HINSTANCE
)
NULL
);
}
dlls/commdlg/filedlg95.c
View file @
bac71315
...
...
@@ -983,16 +983,15 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
{
VIEW_LIST
,
FCIDM_TB_SMALLICON
,
TBSTATE_ENABLED
,
TBSTYLE_BUTTON
,
{
0
,
0
},
0
,
0
},
{
VIEW_DETAILS
,
FCIDM_TB_REPORTVIEW
,
TBSTATE_ENABLED
,
TBSTYLE_BUTTON
,
{
0
,
0
},
0
,
0
},
};
TBADDBITMAP
tba
[]
=
{
{
HINST_COMMCTRL
,
IDB_VIEW_SMALL_COLOR
},
{
COMDLG32_hInstance
,
800
}
/* desktop icon */
};
TBADDBITMAP
tba
[
2
];
RECT
rectTB
;
FileOpenDlgInfos
*
fodInfos
=
(
FileOpenDlgInfos
*
)
GetPropA
(
hwnd
,
FileOpenDlgInfosStr
);
tba
[
0
].
hInst
=
HINST_COMMCTRL
;
tba
[
0
].
nID
=
IDB_VIEW_SMALL_COLOR
;
tba
[
1
].
hInst
=
COMDLG32_hInstance
;
tba
[
1
].
nID
=
800
;
TRACE
(
"%p
\n
"
,
fodInfos
);
/* Get windows version emulating */
...
...
dlls/ddraw/ddraw/thunks.c
View file @
bac71315
...
...
@@ -336,7 +336,10 @@ IDirectDrawImpl_EnumDisplayModes(LPDIRECTDRAW This, DWORD dwFlags,
LPDDSURFACEDESC
pDDSD
,
LPVOID
context
,
LPDDENUMMODESCALLBACK
cb
)
{
struct
displaymodescallback_context
cbcontext
=
{
cb
,
context
};
struct
displaymodescallback_context
cbcontext
;
cbcontext
.
func
=
cb
;
cbcontext
.
context
=
context
;
return
IDirectDraw7_EnumDisplayModes
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw
,
...
...
@@ -351,7 +354,10 @@ IDirectDraw2Impl_EnumDisplayModes(LPDIRECTDRAW2 This, DWORD dwFlags,
LPDDSURFACEDESC
pDDSD
,
LPVOID
context
,
LPDDENUMMODESCALLBACK
cb
)
{
struct
displaymodescallback_context
cbcontext
=
{
cb
,
context
};
struct
displaymodescallback_context
cbcontext
;
cbcontext
.
func
=
cb
;
cbcontext
.
context
=
context
;
return
IDirectDraw7_EnumDisplayModes
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw2
,
...
...
@@ -399,7 +405,11 @@ IDirectDrawImpl_EnumSurfaces(LPDIRECTDRAW This, DWORD dwFlags,
LPDDSURFACEDESC
pDDSD
,
LPVOID
context
,
LPDDENUMSURFACESCALLBACK
cb
)
{
struct
surfacescallback_context
cbcontext
=
{
cb
,
context
};
struct
surfacescallback_context
cbcontext
;
cbcontext
.
func
=
cb
;
cbcontext
.
context
=
context
;
return
IDirectDraw7_EnumSurfaces
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw
,
IDirectDraw7
,
This
),
...
...
@@ -412,7 +422,11 @@ IDirectDraw2Impl_EnumSurfaces(LPDIRECTDRAW2 This, DWORD dwFlags,
LPDDSURFACEDESC
pDDSD
,
LPVOID
context
,
LPDDENUMSURFACESCALLBACK
cb
)
{
struct
surfacescallback_context
cbcontext
=
{
cb
,
context
};
struct
surfacescallback_context
cbcontext
;
cbcontext
.
func
=
cb
;
cbcontext
.
context
=
context
;
return
IDirectDraw7_EnumSurfaces
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw2
,
IDirectDraw7
,
This
),
...
...
dlls/ddraw/dsurface/thunks.c
View file @
bac71315
...
...
@@ -135,7 +135,11 @@ IDirectDrawSurface3Impl_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE3 This,
LPVOID
context
,
LPDDENUMSURFACESCALLBACK
callback
)
{
struct
callback_info
info
=
{
callback
,
context
};
struct
callback_info
info
;
info
.
callback
=
callback
;
info
.
context
=
context
;
return
IDirectDrawSurface7_EnumAttachedSurfaces
(
CONVERT
(
This
),
&
info
,
EnumCallback
);
}
...
...
@@ -145,7 +149,11 @@ IDirectDrawSurface3Impl_EnumOverlayZOrders(LPDIRECTDRAWSURFACE3 This,
DWORD
dwFlags
,
LPVOID
context
,
LPDDENUMSURFACESCALLBACK
callback
)
{
struct
callback_info
info
=
{
callback
,
context
};
struct
callback_info
info
;
info
.
callback
=
callback
;
info
.
context
=
context
;
return
IDirectDrawSurface7_EnumOverlayZOrders
(
CONVERT
(
This
),
dwFlags
,
&
info
,
EnumCallback
);
}
...
...
@@ -163,10 +171,15 @@ IDirectDrawSurface3Impl_GetAttachedSurface(LPDIRECTDRAWSURFACE3 This,
LPDDSCAPS
pCaps
,
LPDIRECTDRAWSURFACE3
*
ppAttached
)
{
DDSCAPS2
caps
=
{
pCaps
->
dwCaps
,
0
,
0
,
0
}
;
DDSCAPS2
caps
;
LPDIRECTDRAWSURFACE7
pAttached7
;
HRESULT
hr
;
caps
.
dwCaps
=
pCaps
->
dwCaps
;
caps
.
dwCaps2
=
0
;
caps
.
dwCaps3
=
0
;
caps
.
dwCaps4
=
0
;
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
CONVERT
(
This
),
&
caps
,
&
pAttached7
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/odbc32/proxyodbc.c
View file @
bac71315
...
...
@@ -133,7 +133,7 @@ static PROXYHANDLE gProxyHandle = {
FALSE
,
FALSE
,
ERROR_LIBRARY_NOT_FOUND
,
{
},
{
0
,
0
,
0
,
0
},
""
,
""
,
""
,
...
...
dlls/winsock/socket.c
View file @
bac71315
...
...
@@ -2329,7 +2329,10 @@ INT16 WINAPI WINSOCK_listen16(SOCKET16 s, INT16 backlog)
int
WINAPI
WS_recv
(
SOCKET
s
,
char
*
buf
,
int
len
,
int
flags
)
{
DWORD
n
,
dwFlags
=
flags
;
WSABUF
wsabuf
=
{
len
,
buf
};
WSABUF
wsabuf
;
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
buf
;
if
(
WSARecvFrom
(
s
,
&
wsabuf
,
1
,
&
n
,
&
dwFlags
,
NULL
,
NULL
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
...
...
@@ -2353,7 +2356,10 @@ int WINAPI WS_recvfrom(SOCKET s, char *buf, INT len, int flags,
struct
WS_sockaddr
*
from
,
int
*
fromlen
)
{
DWORD
n
,
dwFlags
=
flags
;
WSABUF
wsabuf
=
{
len
,
buf
};
WSABUF
wsabuf
;
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
buf
;
if
(
WSARecvFrom
(
s
,
&
wsabuf
,
1
,
&
n
,
&
dwFlags
,
from
,
fromlen
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
...
...
@@ -2476,7 +2482,10 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
int
WINAPI
WS_send
(
SOCKET
s
,
const
char
*
buf
,
int
len
,
int
flags
)
{
DWORD
n
;
WSABUF
wsabuf
=
{
len
,
(
char
*
)
buf
};
WSABUF
wsabuf
;
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
(
char
*
)
buf
;
if
(
WSASendTo
(
s
,
&
wsabuf
,
1
,
&
n
,
flags
,
NULL
,
0
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
...
...
@@ -2622,7 +2631,10 @@ int WINAPI WS_sendto(SOCKET s, const char *buf, int len, int flags,
const
struct
WS_sockaddr
*
to
,
int
tolen
)
{
DWORD
n
;
WSABUF
wsabuf
=
{
len
,
(
char
*
)
buf
};
WSABUF
wsabuf
;
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
(
char
*
)
buf
;
if
(
WSASendTo
(
s
,
&
wsabuf
,
1
,
&
n
,
flags
,
to
,
tolen
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
...
...
programs/winefile/winefile.c
View file @
bac71315
...
...
@@ -809,7 +809,12 @@ static void resize_frame_rect(HWND hwnd, PRECT prect)
static
void
resize_frame
(
HWND
hwnd
,
int
cx
,
int
cy
)
{
RECT
rect
=
{
0
,
0
,
cx
,
cy
};
RECT
rect
;
rect
.
left
=
0
;
rect
.
top
=
0
;
rect
.
right
=
cx
;
rect
.
bottom
=
cy
;
resize_frame_rect
(
hwnd
,
&
rect
);
}
...
...
@@ -842,15 +847,19 @@ LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam)
static
HWND
create_child_window
(
ChildWnd
*
child
)
{
MDICREATESTRUCT
mcs
=
{
WINEFILETREE
,
(
LPTSTR
)
child
->
path
,
Globals
.
hInstance
,
child
->
pos
.
rcNormalPosition
.
left
,
child
->
pos
.
rcNormalPosition
.
top
,
child
->
pos
.
rcNormalPosition
.
right
-
child
->
pos
.
rcNormalPosition
.
left
,
child
->
pos
.
rcNormalPosition
.
bottom
-
child
->
pos
.
rcNormalPosition
.
top
,
0
/*style*/
,
0
/*lParam*/
};
MDICREATESTRUCT
mcs
;
int
idx
;
mcs
.
szClass
=
WINEFILETREE
;
mcs
.
szTitle
=
(
LPTSTR
)
child
->
path
;
mcs
.
hOwner
=
Globals
.
hInstance
;
mcs
.
x
=
child
->
pos
.
rcNormalPosition
.
left
;
mcs
.
y
=
child
->
pos
.
rcNormalPosition
.
top
;
mcs
.
cx
=
child
->
pos
.
rcNormalPosition
.
right
-
child
->
pos
.
rcNormalPosition
.
left
;
mcs
.
cy
=
child
->
pos
.
rcNormalPosition
.
bottom
-
child
->
pos
.
rcNormalPosition
.
top
;
mcs
.
style
=
0
;
mcs
.
lParam
=
0
;
hcbthook
=
SetWindowsHookEx
(
WH_CBT
,
CBTProc
,
0
,
GetCurrentThreadId
());
newchild
=
child
;
...
...
@@ -1247,14 +1256,22 @@ const static int g_pos_align[] = {
static
void
resize_tree
(
ChildWnd
*
child
,
int
cx
,
int
cy
)
{
HDWP
hdwp
=
BeginDeferWindowPos
(
4
);
RECT
rt
=
{
0
,
0
,
cx
,
cy
};
RECT
rt
;
rt
.
left
=
0
;
rt
.
top
=
0
;
rt
.
right
=
cx
;
rt
.
bottom
=
cy
;
cx
=
child
->
split_pos
+
SPLIT_WIDTH
/
2
;
#ifndef _NO_EXTENSIONS
{
WINDOWPOS
wp
;
HD_LAYOUT
hdl
=
{
&
rt
,
&
wp
};
HD_LAYOUT
hdl
;
hdl
.
prc
=
&
rt
;
hdl
.
pwpos
=
&
wp
;
Header_Layout
(
child
->
left
.
hwndHeader
,
&
hdl
);
...
...
@@ -1345,9 +1362,15 @@ static BOOL calc_widths(Pane* pane, BOOL anyway)
for
(
cnt
=
0
;
cnt
<
entries
;
cnt
++
)
{
Entry
*
entry
=
(
Entry
*
)
ListBox_GetItemData
(
pane
->
hwnd
,
cnt
);
DRAWITEMSTRUCT
dis
=
{
0
/*CtlType*/
,
0
/*CtlID*/
,
0
/*itemID*/
,
0
/*itemAction*/
,
0
/*itemState*/
,
pane
->
hwnd
/*hwndItem*/
,
hdc
};
DRAWITEMSTRUCT
dis
;
dis
.
CtlType
=
0
;
dis
.
CtlID
=
0
;
dis
.
itemID
=
0
;
dis
.
itemAction
=
0
;
dis
.
itemState
=
0
;
dis
.
hwndItem
=
pane
->
hwnd
;
dis
.
hDC
=
hdc
;
draw_item
(
pane
,
&
dis
,
entry
,
COLUMNS
);
}
...
...
@@ -1412,7 +1435,15 @@ static void calc_single_width(Pane* pane, int col)
for
(
cnt
=
0
;
cnt
<
entries
;
cnt
++
)
{
Entry
*
entry
=
(
Entry
*
)
ListBox_GetItemData
(
pane
->
hwnd
,
cnt
);
DRAWITEMSTRUCT
dis
=
{
0
,
0
,
0
,
0
,
0
,
pane
->
hwnd
,
hdc
};
DRAWITEMSTRUCT
dis
;
dis
.
CtlType
=
0
;
dis
.
CtlID
=
0
;
dis
.
itemID
=
0
;
dis
.
itemAction
=
0
;
dis
.
itemState
=
0
;
dis
.
hwndItem
=
pane
->
hwnd
;
dis
.
hDC
=
hdc
;
draw_item
(
pane
,
&
dis
,
entry
,
col
);
}
...
...
@@ -1586,7 +1617,12 @@ static void calc_tabbed_width(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR
static
void
output_text
(
Pane
*
pane
,
LPDRAWITEMSTRUCT
dis
,
int
col
,
LPCTSTR
str
,
DWORD
flags
)
{
int
x
=
dis
->
rcItem
.
left
;
RECT
rt
=
{
x
+
pane
->
positions
[
col
]
+
Globals
.
spaceSize
.
cx
,
dis
->
rcItem
.
top
,
x
+
pane
->
positions
[
col
+
1
]
-
Globals
.
spaceSize
.
cx
,
dis
->
rcItem
.
bottom
};
RECT
rt
;
rt
.
left
=
x
+
pane
->
positions
[
col
]
+
Globals
.
spaceSize
.
cx
;
rt
.
top
=
dis
->
rcItem
.
top
;
rt
.
right
=
x
+
pane
->
positions
[
col
+
1
]
-
Globals
.
spaceSize
.
cx
;
rt
.
bottom
=
dis
->
rcItem
.
bottom
;
DrawText
(
dis
->
hDC
,
(
LPTSTR
)
str
,
-
1
,
&
rt
,
DT_SINGLELINE
|
DT_NOPREFIX
|
flags
);
}
...
...
@@ -1594,7 +1630,12 @@ static void output_text(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str,
static
void
output_tabbed_text
(
Pane
*
pane
,
LPDRAWITEMSTRUCT
dis
,
int
col
,
LPCTSTR
str
)
{
int
x
=
dis
->
rcItem
.
left
;
RECT
rt
=
{
x
+
pane
->
positions
[
col
]
+
Globals
.
spaceSize
.
cx
,
dis
->
rcItem
.
top
,
x
+
pane
->
positions
[
col
+
1
]
-
Globals
.
spaceSize
.
cx
,
dis
->
rcItem
.
bottom
};
RECT
rt
;
rt
.
left
=
x
+
pane
->
positions
[
col
]
+
Globals
.
spaceSize
.
cx
;
rt
.
top
=
dis
->
rcItem
.
top
;
rt
.
right
=
x
+
pane
->
positions
[
col
+
1
]
-
Globals
.
spaceSize
.
cx
;
rt
.
bottom
=
dis
->
rcItem
.
bottom
;
/* DRAWTEXTPARAMS dtp = {sizeof(DRAWTEXTPARAMS), 2};
DrawTextEx(dis->hDC, (LPTSTR)str, -1, &rt, DT_SINGLELINE|DT_NOPREFIX|DT_EXPANDTABS|DT_TABSTOP, &dtp);*/
...
...
@@ -1605,12 +1646,17 @@ static void output_tabbed_text(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTST
static
void
output_number
(
Pane
*
pane
,
LPDRAWITEMSTRUCT
dis
,
int
col
,
LPCTSTR
str
)
{
int
x
=
dis
->
rcItem
.
left
;
RECT
rt
=
{
x
+
pane
->
positions
[
col
]
+
Globals
.
spaceSize
.
cx
,
dis
->
rcItem
.
top
,
x
+
pane
->
positions
[
col
+
1
]
-
Globals
.
spaceSize
.
cx
,
dis
->
rcItem
.
bottom
}
;
RECT
rt
;
LPCTSTR
s
=
str
;
TCHAR
b
[
128
];
LPTSTR
d
=
b
;
int
pos
;
rt
.
left
=
x
+
pane
->
positions
[
col
]
+
Globals
.
spaceSize
.
cx
;
rt
.
top
=
dis
->
rcItem
.
top
;
rt
.
right
=
x
+
pane
->
positions
[
col
+
1
]
-
Globals
.
spaceSize
.
cx
;
rt
.
bottom
=
dis
->
rcItem
.
bottom
;
if
(
*
s
)
*
d
++
=
*
s
++
;
...
...
@@ -1726,9 +1772,16 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
int
x
;
int
y
=
dis
->
rcItem
.
top
+
IMAGE_HEIGHT
/
2
;
Entry
*
up
;
RECT
rt_clip
=
{
dis
->
rcItem
.
left
,
dis
->
rcItem
.
top
,
dis
->
rcItem
.
left
+
pane
->
widths
[
col
],
dis
->
rcItem
.
bottom
}
;
RECT
rt_clip
;
HRGN
hrgn_org
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
HRGN
hrgn
=
CreateRectRgnIndirect
(
&
rt_clip
);
HRGN
hrgn
;
rt_clip
.
left
=
dis
->
rcItem
.
left
;
rt_clip
.
top
=
dis
->
rcItem
.
top
;
rt_clip
.
right
=
dis
->
rcItem
.
left
+
pane
->
widths
[
col
];
rt_clip
.
bottom
=
dis
->
rcItem
.
bottom
;
hrgn
=
CreateRectRgnIndirect
(
&
rt_clip
);
if
(
!
GetClipRgn
(
dis
->
hDC
,
hrgn_org
))
{
DeleteObject
(
hrgn_org
);
...
...
@@ -2100,8 +2153,18 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
{
int
scroll_pos
=
GetScrollPos
(
pane
->
hwnd
,
SB_HORZ
);
RECT
rt_scr
=
{
pane
->
positions
[
idx
+
1
]
-
scroll_pos
,
0
,
clnt
.
right
,
clnt
.
bottom
};
RECT
rt_clip
=
{
pane
->
positions
[
idx
]
-
scroll_pos
,
0
,
clnt
.
right
,
clnt
.
bottom
};
RECT
rt_scr
;
RECT
rt_clip
;
rt_scr
.
left
=
pane
->
positions
[
idx
+
1
]
-
scroll_pos
;
rt_scr
.
top
=
0
;
rt_scr
.
right
=
clnt
.
right
;
rt_scr
.
bottom
=
clnt
.
bottom
;
rt_clip
.
left
=
pane
->
positions
[
idx
]
-
scroll_pos
;
rt_clip
.
top
=
0
;
rt_clip
.
right
=
clnt
.
right
;
rt_clip
.
bottom
=
clnt
.
bottom
;
if
(
rt_scr
.
left
<
0
)
rt_scr
.
left
=
0
;
if
(
rt_clip
.
left
<
0
)
rt_clip
.
left
=
0
;
...
...
@@ -2636,49 +2699,14 @@ LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
static
void
InitInstance
(
HINSTANCE
hinstance
)
{
WNDCLASSEX
wcFrame
=
{
sizeof
(
WNDCLASSEX
),
0
/*style*/
,
FrameWndProc
,
0
/*cbClsExtra*/
,
0
/*cbWndExtra*/
,
hinstance
,
LoadIcon
(
hinstance
,
MAKEINTRESOURCE
(
IDI_WINEFILE
)),
LoadCursor
(
0
,
IDC_ARROW
),
0
/*hbrBackground*/
,
0
/*lpszMenuName*/
,
WINEFILEFRAME
,
(
HICON
)
LoadImage
(
hinstance
,
MAKEINTRESOURCE
(
IDI_WINEFILE
),
IMAGE_ICON
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
LR_SHARED
)
};
// register frame window class
ATOM
hframeClass
=
RegisterClassEx
(
&
wcFrame
);
WNDCLASS
wcChild
=
{
CS_CLASSDC
|
CS_DBLCLKS
|
CS_VREDRAW
,
ChildWndProc
,
0
/*cbClsExtra*/
,
0
/*cbWndExtra*/
,
hinstance
,
0
/*hIcon*/
,
LoadCursor
(
0
,
IDC_ARROW
),
0
/*hbrBackground*/
,
0
/*lpszMenuName*/
,
WINEFILETREE
};
// register tree windows class
WINE_UNUSED
ATOM
hChildClass
=
RegisterClass
(
&
wcChild
);
WNDCLASSEX
wcFrame
;
ATOM
hframeClass
;
WNDCLASS
wcChild
;
WINE_UNUSED
ATOM
hChildClass
;
HMENU
hMenuFrame
=
LoadMenu
(
hinstance
,
MAKEINTRESOURCE
(
IDM_WINEFILE
));
HMENU
hMenuWindow
=
GetSubMenu
(
hMenuFrame
,
GetMenuItemCount
(
hMenuFrame
)
-
2
);
CLIENTCREATESTRUCT
ccs
=
{
hMenuWindow
,
IDW_FIRST_CHILD
};
CLIENTCREATESTRUCT
ccs
;
INITCOMMONCONTROLSEX
icc
=
{
sizeof
(
INITCOMMONCONTROLSEX
),
...
...
@@ -2690,6 +2718,46 @@ static void InitInstance(HINSTANCE hinstance)
HDC
hdc
=
GetDC
(
0
);
wcFrame
.
cbSize
=
sizeof
(
WNDCLASSEX
);
wcFrame
.
style
=
0
;
wcFrame
.
lpfnWndProc
=
FrameWndProc
;
wcFrame
.
cbClsExtra
=
0
;
wcFrame
.
cbWndExtra
=
0
;
wcFrame
.
hInstance
=
hinstance
;
wcFrame
.
hIcon
=
LoadIcon
(
hinstance
,
MAKEINTRESOURCE
(
IDI_WINEFILE
));
wcFrame
.
hCursor
=
LoadCursor
(
0
,
IDC_ARROW
);
wcFrame
.
hbrBackground
=
0
;
wcFrame
.
lpszMenuName
=
0
;
wcFrame
.
lpszClassName
=
WINEFILEFRAME
;
wcFrame
.
hIconSm
=
(
HICON
)
LoadImage
(
hinstance
,
MAKEINTRESOURCE
(
IDI_WINEFILE
),
IMAGE_ICON
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
LR_SHARED
);
/* register frame window class */
hframeClass
=
RegisterClassEx
(
&
wcFrame
);
wcChild
.
style
=
CS_CLASSDC
|
CS_DBLCLKS
|
CS_VREDRAW
;
wcChild
.
lpfnWndProc
=
ChildWndProc
;
wcChild
.
cbClsExtra
=
0
;
wcChild
.
cbWndExtra
=
0
;
wcChild
.
hInstance
=
hinstance
;
wcChild
.
hIcon
=
0
;
wcChild
.
hCursor
=
LoadCursor
(
0
,
IDC_ARROW
);
wcChild
.
hbrBackground
=
0
;
wcChild
.
lpszMenuName
=
0
;
wcChild
.
lpszClassName
=
WINEFILETREE
;
/* register tree windows class */
hChildClass
=
RegisterClass
(
&
wcChild
);
ccs
.
hWindowMenu
=
hMenuWindow
;
ccs
.
idFirstChild
=
IDW_FIRST_CHILD
;
Globals
.
hMenuFrame
=
hMenuFrame
;
Globals
.
hMenuView
=
GetSubMenu
(
hMenuFrame
,
3
);
Globals
.
hMenuOptions
=
GetSubMenu
(
hMenuFrame
,
4
);
...
...
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