projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ben Rudiak-Gould points out that we should be using WM_APP as the base for
[u/mdw/putty]
/
windows
/
winpgen.c
diff --git
a/windows/winpgen.c
b/windows/winpgen.c
index
dc9d273
..
d767b23
100644
(file)
--- a/
windows/winpgen.c
+++ b/
windows/winpgen.c
@@
-17,7
+17,7
@@
#define ICON_BIG 1
#endif
#define ICON_BIG 1
#endif
-#define WM_DONEKEY (WM_
XUSER
+ 1)
+#define WM_DONEKEY (WM_
APP
+ 1)
#define DEFAULT_KEYSIZE 1024
#define DEFAULT_KEYSIZE 1024
@@
-801,8
+801,9
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
switch (msg) {
case WM_INITDIALOG:
if (help_path)
switch (msg) {
case WM_INITDIALOG:
if (help_path)
- SetWindowLong(hwnd, GWL_EXSTYLE,
- GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_CONTEXTHELP);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE,
+ GetWindowLongPtr(hwnd, GWL_EXSTYLE) |
+ WS_EX_CONTEXTHELP);
else {
/*
* If we add a Help button, this is where we destroy it
else {
/*
* If we add a Help button, this is where we destroy it
@@
-818,7
+819,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
state->collecting_entropy = FALSE;
state->entropy = NULL;
state->key_exists = FALSE;
state->collecting_entropy = FALSE;
state->entropy = NULL;
state->key_exists = FALSE;
- SetWindowLong
(hwnd, GWL_USERDATA, (LONG
) state);
+ SetWindowLong
Ptr(hwnd, GWLP_USERDATA, (LONG_PTR
) state);
{
HMENU menu, menu1;
{
HMENU menu, menu1;
@@
-943,7
+944,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
return 1;
case WM_MOUSEMOVE:
return 1;
case WM_MOUSEMOVE:
- state = (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ state = (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (state->collecting_entropy &&
state->entropy && state->entropy_got < state->entropy_required) {
state->entropy[state->entropy_got++] = lParam;
if (state->collecting_entropy &&
state->entropy && state->entropy_got < state->entropy_required) {
state->entropy[state->entropy_got++] = lParam;
@@
-994,7
+995,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
case IDC_KEYSSH2DSA:
{
state = (struct MainDlgState *)
case IDC_KEYSSH2DSA:
{
state = (struct MainDlgState *)
- GetWindowLong
(hwnd, GWL
_USERDATA);
+ GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (!IsDlgButtonChecked(hwnd, LOWORD(wParam)))
CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA,
LOWORD(wParam));
if (!IsDlgButtonChecked(hwnd, LOWORD(wParam)))
CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA,
LOWORD(wParam));
@@
-1008,7
+1009,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
case IDC_COMMENTEDIT:
if (HIWORD(wParam) == EN_CHANGE) {
state = (struct MainDlgState *)
case IDC_COMMENTEDIT:
if (HIWORD(wParam) == EN_CHANGE) {
state = (struct MainDlgState *)
- GetWindowLong
(hwnd, GWL
_USERDATA);
+ GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (state->key_exists) {
HWND editctl = GetDlgItem(hwnd, IDC_COMMENTEDIT);
int len = GetWindowTextLength(editctl);
if (state->key_exists) {
HWND editctl = GetDlgItem(hwnd, IDC_COMMENTEDIT);
int len = GetWindowTextLength(editctl);
@@
-1047,7
+1048,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
HIWORD(wParam) != BN_DOUBLECLICKED)
break;
state =
HIWORD(wParam) != BN_DOUBLECLICKED)
break;
state =
- (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (!state->generation_thread_exists) {
BOOL ok;
state->keysize = GetDlgItemInt(hwnd, IDC_BITS, &ok, FALSE);
if (!state->generation_thread_exists) {
BOOL ok;
state->keysize = GetDlgItemInt(hwnd, IDC_BITS, &ok, FALSE);
@@
-1103,7
+1104,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
if (HIWORD(wParam) != BN_CLICKED)
break;
state =
if (HIWORD(wParam) != BN_CLICKED)
break;
state =
- (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (state->key_exists) {
char filename[FILENAME_MAX];
char passphrase[PASSPHRASE_MAXLEN];
if (state->key_exists) {
char filename[FILENAME_MAX];
char passphrase[PASSPHRASE_MAXLEN];
@@
-1198,7
+1199,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
if (HIWORD(wParam) != BN_CLICKED)
break;
state =
if (HIWORD(wParam) != BN_CLICKED)
break;
state =
- (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (state->key_exists) {
char filename[FILENAME_MAX];
if (prompt_keyfile(hwnd, "Save public key as:",
if (state->key_exists) {
char filename[FILENAME_MAX];
if (prompt_keyfile(hwnd, "Save public key as:",
@@
-1233,7
+1234,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
if (HIWORD(wParam) != BN_CLICKED)
break;
state =
if (HIWORD(wParam) != BN_CLICKED)
break;
state =
- (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
if (!state->generation_thread_exists) {
char filename[FILENAME_MAX];
if (prompt_keyfile(hwnd, "Load private key:",
if (!state->generation_thread_exists) {
char filename[FILENAME_MAX];
if (prompt_keyfile(hwnd, "Load private key:",
@@
-1245,7
+1246,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
}
return 0;
case WM_DONEKEY:
}
return 0;
case WM_DONEKEY:
- state = (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ state = (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
state->generation_thread_exists = FALSE;
state->key_exists = TRUE;
SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETRANGE, 0,
state->generation_thread_exists = FALSE;
state->key_exists = TRUE;
SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETRANGE, 0,
@@
-1385,7
+1386,7
@@
static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
}
break;
case WM_CLOSE:
}
break;
case WM_CLOSE:
- state = (struct MainDlgState *) GetWindowLong
(hwnd, GWL
_USERDATA);
+ state = (struct MainDlgState *) GetWindowLong
Ptr(hwnd, GWLP
_USERDATA);
sfree(state);
if (requested_help) {
WinHelp(hwnd, help_path, HELP_QUIT, 0);
sfree(state);
if (requested_help) {
WinHelp(hwnd, help_path, HELP_QUIT, 0);