SendDlgItemMessage (hDlg, 202, WM_SETFONT, (WPARAM)myGetSysFont(), 0L); SendDlgItemMessage (hDlg, IDC_RADIO_YES, WM_SETFONT, (WPARAM)myGetSysFont(), 0L); SendDlgItemMessage (hDlg, IDC_RADIO_NO, WM_SETFONT, (WPARAM)myGetSysFont(), 0L); SendDlgItemMessage (hDlg, IDOK, WM_SETFONT, (WPARAM)myGetSysFont(), 0L);
SendDlgItemMessage (hDlg, 202, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); SendDlgItemMessage (hDlg, IDC_RADIO_YES, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); SendDlgItemMessage (hDlg, IDC_RADIO_NO, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); SendDlgItemMessage (hDlg, IDOK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
LRESULT CALLBACK DlgProcReboot(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam){  HANDLE            hToken;  TOKEN_PRIVILEGES  tkp;  HWND              hRadioYes;  RECT              rDlg;  hRadioYes = GetDlgItem(hDlg, IDC_RADIO_YES);  switch(msg)  {    case WM_INITDIALOG:      DisableSystemMenuItems(hDlg, FALSE);      CheckDlgButton(hDlg, IDC_RADIO_YES, BST_CHECKED);      SetFocus(hRadioYes);      if(GetClientRect(hDlg, &rDlg))        SetWindowPos(hDlg,                     HWND_TOP,                     (gSystemInfo.dwScreenX/2)-(rDlg.right/2),                     (gSystemInfo.dwScreenY/2)-(rDlg.bottom/2),                     0,                     0,                     SWP_NOSIZE);      SetDlgItemText(hDlg, 202, sgInstallGui.szSetupMessage);      SetDlgItemText(hDlg, IDC_RADIO_YES, sgInstallGui.szYesRestart);      SetDlgItemText(hDlg, IDC_RADIO_NO, sgInstallGui.szNoRestart);      SetDlgItemText(hDlg, IDOK, sgInstallGui.szOk);      SendDlgItemMessage (hDlg, 202, WM_SETFONT, (WPARAM)myGetSysFont(), 0L);      SendDlgItemMessage (hDlg, IDC_RADIO_YES, WM_SETFONT, (WPARAM)myGetSysFont(), 0L);      SendDlgItemMessage (hDlg, IDC_RADIO_NO, WM_SETFONT, (WPARAM)myGetSysFont(), 0L);      SendDlgItemMessage (hDlg, IDOK, WM_SETFONT, (WPARAM)myGetSysFont(), 0L);      break;    case WM_COMMAND:      switch(LOWORD(wParam))      {        case IDOK:          if(IsDlgButtonChecked(hDlg, IDC_RADIO_YES) == BST_CHECKED)          {            // Get a token for this process.            OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);            // Get the LUID for the shutdown privilege.            LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);            tkp.PrivilegeCount = 1;  // one privilege to set            tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;            // Get the shutdown privilege for this process.            AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);            DestroyWindow(hDlg);            PostQuitMessage(0);            DestroyWindow(hWndMain);            // Reboot the system and force all applications to close.            ExitWindowsEx(EWX_REBOOT, 0);          }          else          {            DestroyWindow(hDlg);            PostQuitMessage(0);          }          break;        case IDCANCEL:          DestroyWindow(hDlg);          PostQuitMessage(0);          break;        default:          break;      }      break;  }  return(0);}