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
32484769
Commit
32484769
authored
Jan 08, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Use GetWindowLongPtr to retrieve a pointer, and make sure there is enough space for it.
parent
aacdc9ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
winhelp.c
programs/winhlp32/winhelp.c
+6
-6
No files found.
programs/winhlp32/winhelp.c
View file @
32484769
...
@@ -1327,7 +1327,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -1327,7 +1327,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
break
;
break
;
case
MNID_OPTS_FONTS_NORMAL
:
case
MNID_OPTS_FONTS_NORMAL
:
case
MNID_CTXT_FONTS_NORMAL
:
case
MNID_CTXT_FONTS_NORMAL
:
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
(
hWnd
,
0
);
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
Ptr
(
hWnd
,
0
);
if
(
win
->
font_scale
!=
1
)
if
(
win
->
font_scale
!=
1
)
{
{
win
->
font_scale
=
1
;
win
->
font_scale
=
1
;
...
@@ -1336,7 +1336,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -1336,7 +1336,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
break
;
break
;
case
MNID_OPTS_FONTS_LARGE
:
case
MNID_OPTS_FONTS_LARGE
:
case
MNID_CTXT_FONTS_LARGE
:
case
MNID_CTXT_FONTS_LARGE
:
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
(
hWnd
,
0
);
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
Ptr
(
hWnd
,
0
);
if
(
win
->
font_scale
!=
2
)
if
(
win
->
font_scale
!=
2
)
{
{
win
->
font_scale
=
2
;
win
->
font_scale
=
2
;
...
@@ -1443,7 +1443,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -1443,7 +1443,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
HMENU
hMenu
;
HMENU
hMenu
;
POINT
pt
;
POINT
pt
;
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
(
hWnd
,
0
);
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
Ptr
(
hWnd
,
0
);
hMenu
=
LoadMenu
(
Globals
.
hInstance
,
(
LPSTR
)
CONTEXT_MENU
);
hMenu
=
LoadMenu
(
Globals
.
hInstance
,
(
LPSTR
)
CONTEXT_MENU
);
switch
(
win
->
font_scale
)
switch
(
win
->
font_scale
)
{
{
...
@@ -1479,7 +1479,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -1479,7 +1479,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
case
EN_REQUESTRESIZE
:
case
EN_REQUESTRESIZE
:
rc
=
((
REQRESIZE
*
)
lParam
)
->
rc
;
rc
=
((
REQRESIZE
*
)
lParam
)
->
rc
;
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
(
hWnd
,
0
);
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
Ptr
(
hWnd
,
0
);
AdjustWindowRect
(
&
rc
,
GetWindowLong
(
win
->
hMainWnd
,
GWL_STYLE
),
AdjustWindowRect
(
&
rc
,
GetWindowLong
(
win
->
hMainWnd
,
GWL_STYLE
),
FALSE
);
FALSE
);
SetWindowPos
(
win
->
hMainWnd
,
HWND_TOP
,
0
,
0
,
SetWindowPos
(
win
->
hMainWnd
,
HWND_TOP
,
0
,
0
,
...
@@ -1492,7 +1492,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -1492,7 +1492,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
break
;
break
;
case
WM_INITMENUPOPUP
:
case
WM_INITMENUPOPUP
:
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
(
hWnd
,
0
);
win
=
(
WINHELP_WINDOW
*
)
GetWindowLong
Ptr
(
hWnd
,
0
);
CheckMenuItem
((
HMENU
)
wParam
,
MNID_OPTS_FONTS_SMALL
,
CheckMenuItem
((
HMENU
)
wParam
,
MNID_OPTS_FONTS_SMALL
,
MF_BYCOMMAND
|
(
win
->
font_scale
==
0
)
?
MF_CHECKED
:
0
);
MF_BYCOMMAND
|
(
win
->
font_scale
==
0
)
?
MF_CHECKED
:
0
);
CheckMenuItem
((
HMENU
)
wParam
,
MNID_OPTS_FONTS_NORMAL
,
CheckMenuItem
((
HMENU
)
wParam
,
MNID_OPTS_FONTS_NORMAL
,
...
@@ -1594,7 +1594,7 @@ static BOOL WINHELP_RegisterWinClasses(void)
...
@@ -1594,7 +1594,7 @@ static BOOL WINHELP_RegisterWinClasses(void)
class_main
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
class_main
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
class_main
.
lpfnWndProc
=
WINHELP_MainWndProc
;
class_main
.
lpfnWndProc
=
WINHELP_MainWndProc
;
class_main
.
cbClsExtra
=
0
;
class_main
.
cbClsExtra
=
0
;
class_main
.
cbWndExtra
=
sizeof
(
LONG
);
class_main
.
cbWndExtra
=
sizeof
(
WINHELP_WINDOW
*
);
class_main
.
hInstance
=
Globals
.
hInstance
;
class_main
.
hInstance
=
Globals
.
hInstance
;
class_main
.
hIcon
=
LoadIcon
(
Globals
.
hInstance
,
MAKEINTRESOURCE
(
IDI_WINHELP
));
class_main
.
hIcon
=
LoadIcon
(
Globals
.
hInstance
,
MAKEINTRESOURCE
(
IDI_WINHELP
));
class_main
.
hCursor
=
LoadCursor
(
0
,
IDC_ARROW
);
class_main
.
hCursor
=
LoadCursor
(
0
,
IDC_ARROW
);
...
...
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