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
6cd9b1a3
Commit
6cd9b1a3
authored
Apr 22, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Store reference to the popup (if any) as a WINHELP_WINDOW pointer.
parent
3f1b62f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
winhelp.c
programs/winhelp/winhelp.c
+22
-12
winhelp.h
programs/winhelp/winhelp.h
+1
-1
No files found.
programs/winhelp/winhelp.c
View file @
6cd9b1a3
...
...
@@ -56,7 +56,7 @@ static void WINHELP_DeleteButtons(WINHELP_WINDOW*);
static
void
WINHELP_SetupText
(
HWND
hWnd
,
ULONG
relative
);
static
WINHELP_LINE_PART
*
WINHELP_IsOverLink
(
WINHELP_WINDOW
*
,
WPARAM
,
LPARAM
);
WINHELP_GLOBALS
Globals
=
{
3
,
NULL
,
NULL
,
TRUE
,
NULL
,
NULL
,
NULL
,
NULL
,
{{{
NULL
,
NULL
}},
0
}};
WINHELP_GLOBALS
Globals
=
{
3
,
NULL
,
TRUE
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
{{{
NULL
,
NULL
}},
0
}};
#define CTL_ID_BUTTON 0x700
#define CTL_ID_TEXT 0x701
...
...
@@ -593,7 +593,9 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
WINHELP_RememberPage
(
win
,
wpage
);
}
if
(
!
bPopup
)
if
(
bPopup
)
Globals
.
active_popup
=
win
;
else
Globals
.
active_win
=
win
;
/* Initialize default pushbuttons */
...
...
@@ -649,7 +651,6 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
}
WINHELP_LayoutMainWindow
(
win
);
if
(
bPopup
)
Globals
.
hPopupWnd
=
win
->
hMainWnd
;
ShowWindow
(
win
->
hMainWnd
,
nCmdShow
);
UpdateWindow
(
win
->
hMainWnd
);
...
...
@@ -736,9 +737,9 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
break
;
}
break
;
case
WM_DESTROY
:
if
(
Globals
.
hPopupWnd
)
DestroyWindow
(
Globals
.
hPopupWnd
);
break
;
/* EPP case WM_DESTROY: */
/* EPP if (Globals.hPopupWnd) DestroyWindow(Globals.hPopupWnd); */
/* EPP break; */
case
WM_COPYDATA
:
return
WINHELP_HandleCommand
((
HWND
)
wParam
,
lParam
);
...
...
@@ -789,7 +790,6 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
{
BOOL
bExit
;
win
=
(
WINHELP_WINDOW
*
)
GetWindowLongPtr
(
hWnd
,
0
);
if
(
hWnd
==
Globals
.
hPopupWnd
)
Globals
.
hPopupWnd
=
0
;
bExit
=
(
Globals
.
wVersion
>=
4
&&
!
lstrcmpi
(
win
->
lpszName
,
"main"
));
WINHELP_DeleteWindow
(
win
);
...
...
@@ -1172,8 +1172,12 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam,
case
WM_LBUTTONDOWN
:
win
=
(
WINHELP_WINDOW
*
)
GetWindowLongPtr
(
hWnd
,
0
);
hPopupWnd
=
Globals
.
hPopupWnd
;
Globals
.
hPopupWnd
=
0
;
if
(
Globals
.
active_popup
)
{
hPopupWnd
=
Globals
.
active_popup
->
hMainWnd
;
Globals
.
active_popup
=
NULL
;
}
else
hPopupWnd
=
NULL
;
part
=
WINHELP_IsOverLink
(
win
,
wParam
,
lParam
);
if
(
part
)
...
...
@@ -1739,7 +1743,9 @@ static BOOL WINHELP_SplitLines(HWND hWnd, LPSIZE newsize)
*/
static
void
WINHELP_CheckPopup
(
UINT
msg
)
{
if
(
!
Globals
.
hPopupWnd
)
return
;
HWND
hPopup
;
if
(
!
Globals
.
active_popup
)
return
;
switch
(
msg
)
{
...
...
@@ -1750,8 +1756,9 @@ static void WINHELP_CheckPopup(UINT msg)
case
WM_NCLBUTTONDOWN
:
case
WM_NCMBUTTONDOWN
:
case
WM_NCRBUTTONDOWN
:
DestroyWindow
(
Globals
.
hPopupWnd
);
Globals
.
hPopupWnd
=
0
;
hPopup
=
Globals
.
active_popup
->
hMainWnd
;
Globals
.
active_popup
=
NULL
;
DestroyWindow
(
hPopup
);
}
}
...
...
@@ -1834,6 +1841,9 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW* win)
SetActiveWindow
(
Globals
.
win_list
->
hMainWnd
);
}
if
(
win
==
Globals
.
active_popup
)
Globals
.
active_popup
=
NULL
;
WINHELP_DeleteButtons
(
win
);
if
(
win
->
hShadowWnd
)
DestroyWindow
(
win
->
hShadowWnd
);
...
...
programs/winhelp/winhelp.h
View file @
6cd9b1a3
...
...
@@ -166,9 +166,9 @@ typedef struct
{
UINT
wVersion
;
HANDLE
hInstance
;
HWND
hPopupWnd
;
BOOL
isBook
;
WINHELP_WINDOW
*
active_win
;
WINHELP_WINDOW
*
active_popup
;
WINHELP_WINDOW
*
win_list
;
WNDPROC
button_proc
;
WINHELP_DLL
*
dlls
;
...
...
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