gFrameSelectedRadioBtn = rad5;
gFrameSelectedRadioBtn = rad4;
UINT CALLBACK PrintHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) {  if (uiMsg == WM_COMMAND) {    UINT id = LOWORD(wParam);    if (id == rad4 || id == rad5 || id == rad6) {      gFrameSelectedRadioBtn = id;    }  } else if (uiMsg == WM_INITDIALOG) {    PRINTDLG *   printDlg           = (PRINTDLG *)lParam;    PRInt16      howToEnableFrameUI = (PRBool)printDlg->lCustData;    HWND         collateChk         = GetDlgItem (hdlg, chx2);    if (collateChk) {      ::ShowWindow(collateChk, SW_SHOW);    }    if (howToEnableFrameUI == nsIPrintOptions::kFrameEnableAll) {      SetRadio(hdlg, rad4, PR_FALSE, PR_FALSE);  // XXX this is just temporary (should be enabled)      SetRadio(hdlg, rad5, PR_TRUE);       SetRadio(hdlg, rad6, PR_FALSE);      // set default so user doesn't have to actually press on it      gFrameSelectedRadioBtn = rad5;    } else if (howToEnableFrameUI == nsIPrintOptions::kFrameEnableAsIsAndEach) {      SetRadio(hdlg, rad4, PR_FALSE, PR_FALSE);  // XXX this is just temporary (should be enabled)      SetRadio(hdlg, rad5, PR_FALSE, PR_FALSE);       SetRadio(hdlg, rad6, PR_TRUE);      // set default so user doesn't have to actually press on it      gFrameSelectedRadioBtn = rad6;    } else {  // nsIPrintOptions::kFrameEnableNone      // we are using this function to disabe the group box      SetRadio(hdlg, grp3, PR_FALSE, PR_FALSE);       // now disable radiobuttons      SetRadio(hdlg, rad4, PR_FALSE, PR_FALSE);       SetRadio(hdlg, rad5, PR_FALSE, PR_FALSE);       SetRadio(hdlg, rad6, PR_FALSE, PR_FALSE);     }  }  return 0L;}