void CPWL_Edit::OnKillFocus() { ShowVScrollBar(false); m_pEdit->SelectNone(); SetCaret(false, CFX_PointF(), CFX_PointF()); SetCharSet(FXFONT_ANSI_CHARSET); m_bFocus = false; }
void CPWL_EditCtrl::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep) { PWL_SCROLL_INFO Info; Info.fPlateWidth = fPlateMax - fPlateMin; Info.fContentMin = fContentMin; Info.fContentMax = fContentMax; Info.fSmallStep = fSmallStep; Info.fBigStep = fBigStep; OnNotify(this, PNM_SETSCROLLINFO, SBT_VSCROLL, (intptr_t)&Info); if (IsFloatBigger(Info.fPlateWidth, Info.fContentMax - Info.fContentMin) || IsFloatEqual(Info.fPlateWidth, Info.fContentMax - Info.fContentMin)) { ShowVScrollBar(FALSE); } else { ShowVScrollBar(TRUE); } }
void CPWL_Edit::OnKillFocus() { ShowVScrollBar(FALSE); m_pEdit->SelectNone(); SetCaret(FALSE, CPDF_Point(0.0f, 0.0f), CPDF_Point(0.0f, 0.0f)); SetCharSet(0); if (!IsReadOnly()) { if (IPWL_FocusHandler* pFocusHandler = GetFocusHandler()) pFocusHandler->OnKillFocus(this); } m_bFocus = FALSE; }
/*============================================================================*/ void WScrollBars:: Register(CWnd *theView) /* Initialize scroll bars already attached to theView. This member cannot be called until the window has been created. the OnInitialUpdate() of the view is a good place for this call. *-----------------------------------------------------------------------------*/ { // attach the view to this object m_theView = theView; // set initial limits ScrollLimits sl(0, 100, 0, 100); SetScrollLimits(sl); // set initial increments ScrollIncrements si(1, 1, 1, 1); SetScrollIncrements(si); // hide the scroll bars until needed ShowHScrollBar(FALSE); ShowVScrollBar(FALSE); }