chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
85a091e
)
Win64-cleanness: switch to {Get,Set}WindowLongPtr.
author
Simon Tatham
<anakin@pobox.com>
Thu, 24 Aug 2017 18:11:13 +0000
(19:11 +0100)
committer
Simon Tatham
<anakin@pobox.com>
Thu, 24 Aug 2017 18:40:50 +0000
(19:40 +0100)
windows.c
patch
|
blob
|
history
diff --git
a/windows.c
b/windows.c
index d4b30386a6127067d5eac47ca012f18f696591d9..6b0a7debe0b0916dafb15f736d2e5b82f984035c 100644
(file)
--- a/
windows.c
+++ b/
windows.c
@@
-1545,7
+1545,7
@@
static frontend *frontend_new(HINSTANCE inst)
fe->statusbar = NULL;
fe->bitmap = NULL;
fe->statusbar = NULL;
fe->bitmap = NULL;
- SetWindowLong
(fe->hwnd, GWL_USERDATA, (LONG
)fe);
+ SetWindowLong
Ptr(fe->hwnd, GWLP_USERDATA, (LONG_PTR
)fe);
return fe;
}
return fe;
}
@@
-1992,7
+1992,7
@@
static void make_dialog_full_screen(HWND hwnd)
static int CALLBACK AboutDlgProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
static int CALLBACK AboutDlgProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
- frontend *fe = (frontend *)GetWindowLong
(hwnd, GWL
_USERDATA);
+ frontend *fe = (frontend *)GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
switch (msg) {
case WM_INITDIALOG:
switch (msg) {
case WM_INITDIALOG:
@@
-2249,7
+2249,7
@@
static void create_config_controls(frontend * fe)
static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
- frontend *fe = (frontend *)GetWindowLong
(hwnd, GWL
_USERDATA);
+ frontend *fe = (frontend *)GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
config_item *i;
struct cfg_aux *j;
config_item *i;
struct cfg_aux *j;
@@
-2260,7
+2260,7
@@
static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg,
char *title;
fe = (frontend *) lParam;
char *title;
fe = (frontend *) lParam;
- SetWindowLong
(hwnd, GWL
_USERDATA, lParam);
+ SetWindowLong
Ptr(hwnd, GWLP
_USERDATA, lParam);
fe->cfgbox = hwnd;
fe->cfg = frontend_get_config(fe, fe->cfg_which, &title);
fe->cfgbox = hwnd;
fe->cfg = frontend_get_config(fe, fe->cfg_which, &title);
@@
-2479,8
+2479,8
@@
static void about(frontend *fe)
SendMessage(fe->cfgbox, WM_SETFONT, (WPARAM)fe->cfgfont, FALSE);
SendMessage(fe->cfgbox, WM_SETFONT, (WPARAM)fe->cfgfont, FALSE);
- SetWindowLong
(fe->cfgbox, GWL_USERDATA, (LONG
)fe);
- SetWindowLong
(fe->cfgbox, DWL_DLGPROC, (LONG
)AboutDlgProc);
+ SetWindowLong
Ptr(fe->cfgbox, GWLP_USERDATA, (LONG_PTR
)fe);
+ SetWindowLong
Ptr(fe->cfgbox, DWLP_DLGPROC, (LONG_PTR
)AboutDlgProc);
id = 1000;
y = height/2;
id = 1000;
y = height/2;
@@
-2660,8
+2660,8
@@
static int get_config(frontend *fe, int which)
SendMessage(fe->cfgbox, WM_SETFONT, (WPARAM)fe->cfgfont, FALSE);
SendMessage(fe->cfgbox, WM_SETFONT, (WPARAM)fe->cfgfont, FALSE);
- SetWindowLong
(fe->cfgbox, GWL_USERDATA, (LONG
)fe);
- SetWindowLong
(fe->cfgbox, DWL_DLGPROC, (LONG
)ConfigDlgProc);
+ SetWindowLong
Ptr(fe->cfgbox, GWLP_USERDATA, (LONG_PTR
)fe);
+ SetWindowLong
Ptr(fe->cfgbox, DWLP_DLGPROC, (LONG_PTR
)ConfigDlgProc);
/*
* Count the controls so we can allocate cfgaux.
/*
* Count the controls so we can allocate cfgaux.
@@
-2975,7
+2975,7
@@
static int is_alt_pressed(void)
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
- frontend *fe = (frontend *)GetWindowLong
(hwnd, GWL
_USERDATA);
+ frontend *fe = (frontend *)GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
int cmd;
switch (message) {
int cmd;
switch (message) {