-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathErrorDialog.cpp
More file actions
99 lines (85 loc) · 2.18 KB
/
ErrorDialog.cpp
File metadata and controls
99 lines (85 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include "stdafx.h"
#include "data.h"
#include "chess.h"
#include "Resource.h"
#include "pregen.h"
/* Nonmodal error box */
LRESULT CALLBACK ErrorDialog(HWND hDlg, UINT message,
WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK
ErrorDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
//HANDLE hwndText;
//RECT rChild;
//switch (message) {
//case WM_INITDIALOG:
// GetWindowRect(hDlg, &rChild);
// SetWindowPos(hDlg, NULL, rChild.left,
// rChild.top + DIS.boardRect.top - (rChild.bottom - rChild.top),
// 0, 0, SWP_NOZORDER|SWP_NOSIZE);
// DIS.errorDialog = hDlg;
// SetWindowText(hDlg, DIS.errorTitle);
// hwndText = GetDlgItem(hDlg, OPT_ErrorText);
// SetDlgItemText(hDlg, OPT_ErrorText, DIS.errorMessage);
// return FALSE;
//case WM_COMMAND:
// switch (LOWORD(wParam)) {
// case IDOK:
// case IDCANCEL:
// if (DIS.errorDialog == hDlg) DIS.errorDialog = NULL;
// DestroyWindow(hDlg);
// return TRUE;
// default:
// break;
// }
// break;
//}
return FALSE;
}
//void
//ErrorPopUp(char *title, TCHAR *content){
//FARPROC lpProc;
//char *p, *q;
//BOOLEAN modal = hwndMain == NULL;
//p = content;
//q = DIS.errorMessage;
//while (*p) {
// if (*p == '\n') {
// if (modal) {
// *q++ = ' ';
// p++;
// } else {
// *q++ = '\r';
// *q++ = *p++;
// }
// } else {
// *q++ = *p++;
// }
//}
// *q = NULLCHAR;
// //strncpy(DIS.errorTitle, title, sizeof(DIS.errorTitle));
// strncpy_s(DIS.errorTitle,MSG_SIZ, title, sizeof(DIS.errorTitle));
// DIS.errorTitle[sizeof(DIS.errorTitle) - 1] = '\0';
//
// if (modal) {
// MessageBox(NULL, DIS.errorMessage, DIS.errorTitle, MB_OK|MB_ICONEXCLAMATION);
// }
// else {
// lpProc = MakeProcInstance((FARPROC)ErrorDialog, hInst);
// CreateDialog(hInst, MAKEINTRESOURCE(DLG_Error),
// hwndMain, (DLGPROC)lpProc);
// FreeProcInstance(lpProc);
// }
//}
//void
//ErrorPopDown()
//{
// //if (!appData.popupMoveErrors && DIS.moveErrorMessageUp){
// // DisplayMessage("", ""); //µ±Ç°ÓдíÎóÐÅÏ¢ÍÛ
// //}
// //if (DIS.errorDialog == NULL){
// // return;
// //}
// //DestroyWindow(DIS.errorDialog);
// //DIS.errorDialog = NULL;
//}