- if (m_printDialogData.GetEnablePageNumbers())
- {
- m_fromText->Enable(TRUE);
- m_toText->Enable(TRUE);
-
- sprintf(buf, "%d", m_printDialogData.GetFromPage());
- m_fromText->SetValue(buf);
- sprintf(buf, "%d", m_printDialogData.GetToPage());
- m_toText->SetValue(buf);
-
- if (m_printDialogData.GetAllPages())
+ if(m_fromText)
+ {
+ if (m_printDialogData.GetEnablePageNumbers())
+ {
+ m_fromText->Enable(TRUE);
+ m_toText->Enable(TRUE);
+ sprintf(buf, "%d", m_printDialogData.GetFromPage());
+ m_fromText->SetValue(buf);
+ sprintf(buf, "%d", m_printDialogData.GetToPage());
+ m_toText->SetValue(buf);
+ if(m_rangeRadioBox)
+ if (m_printDialogData.GetAllPages())
+ m_rangeRadioBox->SetSelection(0);
+ else
+ m_rangeRadioBox->SetSelection(1);
+ }
+ else
+ {
+ m_fromText->Enable(FALSE);
+ m_toText->Enable(FALSE);
+ if(m_rangeRadioBox)
+ {