From 81b43e9450f029f10672482a070344246b6dfbe4 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Fri, 22 May 2015 14:09:17 +0100 Subject: [PATCH] Correct the dialog callbacks The dialog callback type actually returns INT_PTR even though it returns a boolean value. MSDN has the following to say: > Type: INT_PTR > > Typically, the dialog box procedure should return TRUE if it > processed the message, and FALSE if it did not. If the dialog box > procedure returns FALSE, the dialog manager performs the default > dialog operation in repsonse to the message. Top work Microsoft! --- src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index d636b2fe..756540ef 100644 --- a/src/main.c +++ b/src/main.c @@ -922,7 +922,7 @@ static void save_config(HWND hDlg, FILE *fp) } } -static BOOL CALLBACK +static INT_PTR CALLBACK SettingsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { FILE *fp; @@ -1079,7 +1079,7 @@ struct tstring_input_buf { char *buffer; }; -static BOOL CALLBACK InputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP) +static INT_PTR CALLBACK InputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP) { static struct tstring_input_buf *inBuf = 0; WORD ctrlId; @@ -1315,7 +1315,7 @@ static int get_password(const char *user, #undef LABEL_WIDTH } -static BOOL CALLBACK +static INT_PTR CALLBACK PasswordDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP) { static const char *passfile = 0;