Fix signature of FuncDlg properly

Previous fix caused a small diff, see:
https://docs.microsoft.com/en-us/previous-versions/ms960202%28v%3dmsdn.10%29
This commit is contained in:
Anders Jenbo 2020-04-06 04:39:23 +02:00
commit 2cdb83c8ff
2 changed files with 21 additions and 22 deletions

View file

@ -573,6 +573,26 @@ void center_window(HWND hDlg)
}
}
static BOOL CALLBACK FuncDlg(HWND hDlg, UINT uMsg,WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
case WM_INITDIALOG:
TextDlg(hDlg, (char *)lParam);
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK) {
EndDialog(hDlg, TRUE);
} else if (LOWORD(wParam) == IDCANCEL) {
EndDialog(hDlg, FALSE);
}
break;
default:
return FALSE;
}
return TRUE;
}
void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr)
{
char *size;
@ -591,27 +611,7 @@ void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line
app_fatal(NULL);
}
BOOL __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM text)
{
switch (uMsg) {
case WM_INITDIALOG:
TextDlg(hDlg, (char *)text);
break;
case WM_COMMAND:
if (wParam == IDOK) {
EndDialog(hDlg, TRUE);
} else if (wParam == IDCANCEL) {
EndDialog(hDlg, FALSE);
}
break;
default:
return FALSE;
}
return TRUE;
}
void TextDlg(HWND hDlg, char *text)
static void TextDlg(HWND hDlg, char *text)
{
center_window(hDlg);

View file

@ -29,7 +29,6 @@ void DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path);
void DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path);
void center_window(HWND hDlg);
void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr);
BOOL __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM text);
void TextDlg(HWND hDlg, char *text);
void ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr);
void FileErrDlg(const char *error);