Lines Matching refs:hWnd
47 static void onChooseDir(HWND hWnd)
49 Logger * logger = (Logger *)GetWindowLong(hWnd, DWL_USER);
56 GetDlgItemText(hWnd, IDC_EDIT_FILE, string, strlen(string));
65 if(PickupDirectory(hWnd, string))
78 SetDlgItemText(hWnd, IDC_EDIT_FILE, string);
82 static void onCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify)
87 EnableWindow(GetDlgItem(hWnd, IDC_EDIT_FILE), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
88 EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_CHOOSEDIR), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
91 onChooseDir(hWnd);
98 static void onApply(HWND hWnd)
100 Logger * logger = (Logger *)GetWindowLong(hWnd, DWL_USER);
104 logger->bToWindow = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOWINDOW));
105 logger->bToConsole = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOCONSOLE));
108 GetDlgItemText(hWnd, IDC_EDIT_FILE, filename, strlen(filename));
109 logger->setToFile(BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE), filename);
114 static void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr)
121 onApply(hWnd);
126 static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
133 SetWindowLong(hWnd, DWL_USER, (long)logger);
138 CheckDlgButton(hWnd, IDC_CHECK_TOWINDOW, logger->bToWindow ? BST_CHECKED : BST_UNCHECKED);
139 CheckDlgButton(hWnd, IDC_CHECK_TOCONSOLE, logger->bToConsole ? BST_CHECKED : BST_UNCHECKED);
140 CheckDlgButton(hWnd, IDC_CHECK_TOFILE, logger->bToFile ? BST_CHECKED : BST_UNCHECKED);
142 SetDlgItemText(hWnd, IDC_EDIT_FILE, logger->szFile);
143 EnableWindow(GetDlgItem(hWnd, IDC_EDIT_FILE), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
144 EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_CHOOSEDIR), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
150 BOOL CALLBACK LogPageProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
155 return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
157 HANDLE_WM_COMMAND(hWnd, wParam, lParam, onCommand);
160 HANDLE_WM_NOTIFY(hWnd, wParam, lParam, onNotify);