CheckDlgButton(hWnd, IDC_CHECK_REMEMBER_LAST, (pPlugin->m_Pref_bRememberLastCall) ? BST_CHECKED : BST_UNCHECKED);
static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam){  CPlugin * pPlugin = (CPlugin *)lParam;  SetWindowLong(hWnd, DWL_USER, (long)pPlugin);  SetWindowPos(hWnd, NULL, 0,0, 0,0, SWP_NOZORDER | SWP_NOSIZE);  HINSTANCE hInst = pPlugin->getInstance();  HWND hWndManual = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DIALOG_MANUAL), hWnd, (DLGPROC)ManualDlgProc, (LPARAM)pPlugin);  HWND hWndAuto = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DIALOG_AUTO), hWnd, (DLGPROC)AutoDlgProc, (LPARAM)pPlugin);  CheckRadioButton(hWnd, IDC_RADIO_MODE_MANUAL, IDC_RADIO_MODE_AUTO,                   (pPlugin->m_Pref_ShowGUI == sg_manual) ? IDC_RADIO_MODE_MANUAL : IDC_RADIO_MODE_AUTO);  Edit_SetText(GetDlgItem(hWnd, IDC_EDIT_LOG_FILE_NAME), pPlugin->m_Pref_szLogFile);  CheckDlgButton(hWnd, IDC_CHECK_LOG_TO_FILE, (pPlugin->m_Pref_bToFile) ? BST_CHECKED : BST_UNCHECKED);  EnableWindow(GetDlgItem(hWnd, IDC_EDIT_LOG_FILE_NAME), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_LOG_TO_FILE)));  CheckDlgButton(hWnd, IDC_CHECK_LOG_TO_FRAME, (pPlugin->m_Pref_bToFrame) ? BST_CHECKED : BST_UNCHECKED);  EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_CLEAR), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_LOG_TO_FRAME)));  EnableWindow(GetDlgItem(hWnd, IDC_CHECK_SHOW_LOG), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_LOG_TO_FRAME)));  CheckDlgButton(hWnd, IDC_CHECK_SHOW_LOG, (pPlugin->m_Pref_bFlushNow) ? BST_CHECKED : BST_UNCHECKED);  EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_FLUSH), (BST_UNCHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_SHOW_LOG))                                                  && (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_LOG_TO_FRAME)));  pPlugin->onInit(hWnd, hWndManual, hWndAuto);  pPlugin->showGUI(pPlugin->m_Pref_ShowGUI);  return TRUE;}