Browse Source

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!
Matt Clarkson 10 years ago
parent
commit
81b43e9450
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/main.c

+ 3 - 3
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;