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
d58ab515
Commit
d58ab515
authored
Apr 18, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Get rid of the WM_USER message.
parent
077964a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
23 deletions
+30
-23
macro.c
programs/winhelp/macro.c
+2
-2
winhelp.c
programs/winhelp/winhelp.c
+27
-21
winhelp.h
programs/winhelp/winhelp.h
+1
-0
No files found.
programs/winhelp/macro.c
View file @
d58ab515
...
...
@@ -300,7 +300,7 @@ void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
*
b
=
button
;
SendMessage
(
win
->
hMainWnd
,
WM_USER
,
0
,
0
);
WINHELP_LayoutMainWindow
(
win
);
}
void
CALLBACK
MACRO_ChangeEnable
(
LPCSTR
id
,
LPCSTR
macro
)
...
...
@@ -407,7 +407,7 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
button
->
wParam
=
max
(
button
->
wParam
,
(
*
b
)
->
wParam
+
1
);
*
b
=
button
;
SendMessage
(
win
->
hMainWnd
,
WM_USER
,
0
,
0
);
WINHELP_LayoutMainWindow
(
win
);
}
void
CALLBACK
MACRO_DeleteItem
(
LPCSTR
str
)
...
...
programs/winhelp/winhelp.c
View file @
d58ab515
...
...
@@ -449,6 +449,29 @@ static LRESULT WINHELP_HandleCommand(HWND hSrcWnd, LPARAM lParam)
return
1
;
}
void
WINHELP_LayoutMainWindow
(
WINHELP_WINDOW
*
win
)
{
RECT
rect
,
button_box_rect
;
INT
text_top
;
GetClientRect
(
win
->
hMainWnd
,
&
rect
);
/* Update button box and text Window */
SetWindowPos
(
win
->
hButtonBoxWnd
,
HWND_TOP
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
0
);
GetWindowRect
(
win
->
hButtonBoxWnd
,
&
button_box_rect
);
text_top
=
rect
.
top
+
button_box_rect
.
bottom
-
button_box_rect
.
top
;
SetWindowPos
(
win
->
hTextWnd
,
HWND_TOP
,
rect
.
left
,
text_top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
text_top
,
0
);
}
/******************************************************************
* WINHELP_ReuseWindow
*
...
...
@@ -478,7 +501,7 @@ static BOOL WINHELP_ReuseWindow(WINHELP_WINDOW* win, WINHELP_WINDOW* oldwin,
WINHELP_SetupText
(
win
->
hTextWnd
);
InvalidateRect
(
win
->
hTextWnd
,
NULL
,
TRUE
);
SendMessage
(
win
->
hMainWnd
,
WM_USER
,
0
,
0
);
WINHELP_LayoutMainWindow
(
win
);
ShowWindow
(
win
->
hMainWnd
,
nCmdShow
);
UpdateWindow
(
win
->
hTextWnd
);
...
...
@@ -692,8 +715,8 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
{
WINHELP_WINDOW
*
win
;
WINHELP_BUTTON
*
button
;
RECT
rect
,
button_box_rect
;
INT
text_top
,
curPos
,
min
,
max
,
dy
,
keyDelta
;
RECT
rect
;
INT
curPos
,
min
,
max
,
dy
,
keyDelta
;
WINHELP_CheckPopup
(
msg
);
...
...
@@ -716,25 +739,8 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
0
,
0
,
0
,
0
,
hWnd
,
0
,
Globals
.
hInstance
,
win
);
/* Fall through */
case
WM_USER
:
case
WM_WINDOWPOSCHANGED
:
win
=
(
WINHELP_WINDOW
*
)
GetWindowLongPtr
(
hWnd
,
0
);
GetClientRect
(
hWnd
,
&
rect
);
/* Update button box and text Window */
SetWindowPos
(
win
->
hButtonBoxWnd
,
HWND_TOP
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
0
);
GetWindowRect
(
win
->
hButtonBoxWnd
,
&
button_box_rect
);
text_top
=
rect
.
top
+
button_box_rect
.
bottom
-
button_box_rect
.
top
;
SetWindowPos
(
win
->
hTextWnd
,
HWND_TOP
,
rect
.
left
,
text_top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
text_top
,
0
);
WINHELP_LayoutMainWindow
((
WINHELP_WINDOW
*
)
GetWindowLongPtr
(
hWnd
,
0
));
break
;
case
WM_COMMAND
:
...
...
programs/winhelp/winhelp.h
View file @
d58ab515
...
...
@@ -180,6 +180,7 @@ INT WINHELP_MessageBoxIDS(UINT, UINT, WORD);
INT
WINHELP_MessageBoxIDS_s
(
UINT
,
LPCSTR
,
UINT
,
WORD
);
HLPFILE
*
WINHELP_LookupHelpFile
(
LPCSTR
lpszFile
);
HLPFILE_WINDOWINFO
*
WINHELP_GetWindowInfo
(
HLPFILE
*
hlpfile
,
LPCSTR
name
);
void
WINHELP_LayoutMainWindow
(
WINHELP_WINDOW
*
win
);
extern
const
char
MAIN_WIN_CLASS_NAME
[];
extern
const
char
BUTTON_BOX_WIN_CLASS_NAME
[];
...
...
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