void TTabCheckList::SetupWindow() { // If the listbox has the LBS_USETABSTOPS style, set the default tab stops // Can't do this in constuctor, because the window font is not valid // SetTabStops(); TCheckList::SetupWindow(); }
int CPhonesListBox::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CListBox::OnCreate(lpCreateStruct) == -1) return -1; m_font.CreatePointFont (80, _T ("MS Sans Serif")); SetFont (&m_font, FALSE); SetTabStops (128); return 0; }
int CPadView::OnCreate(LPCREATESTRUCT lpcs) { LOGFONT lf; if (CEditView::OnCreate(lpcs) != 0) return -1; GetObject(GetStockObject(OEM_FIXED_FONT), sizeof(LOGFONT), &lf); SetTabStops(lf.lfWidth); Font.CreateFontIndirect(&lf); SetFont(&Font); return 0; }
void CPadView::OnSetTabStops() { CSetTabStops dlg; dlg.m_nTabStops = m_nTabStops/4; if (dlg.DoModal() == IDOK) { CWaitCursor wait; SetTabStops(dlg.m_nTabStops*4); m_nDefTabStops = m_nTabStops; // notify container that content changed GetDocument()->UpdateAllItems(NULL); } }
//*********************************************************************** // Function: // // CHorzListBox::InitTabStops() PROTECTED // // Purpose: // // Initializes tab stops // // History: // // Date Comment Initials // ======== ================================================= ======== // 1/31/96 Created JMR //*********************************************************************** void CHorzListBox::InitTabStops() { int nDefault = 2; SetTabStops(1, &nDefault); }