瀏覽代碼

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 年之前
父節點
當前提交
81b43e9450
共有 1 個文件被更改,包括 3 次插入3 次删除
  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;