MCPcopy Create free account
hub / github.com/SOUI2/soui / OnMouseWheel

Method OnMouseWheel

SOUI/src/control/SComboBase.cpp:238–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236 }
237
238 BOOL SComboBase::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
239 {
240 //鼠标滚轮改变当前选项
241 if (zDelta > 0) // 上滚
242 {
243 int iSel = GetCurSel();
244 iSel -= 1;
245 if ( iSel < GetCount() && iSel >= 0 )
246 SetCurSel(iSel);
247 }
248 else // 下滚
249 {
250 int iSel = GetCurSel();
251 iSel += 1;
252 if ( iSel < GetCount() )
253 SetCurSel(iSel);
254 }
255 return TRUE;
256 }
257
258 void SComboBase::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
259 {

Callers

nothing calls this directly

Calls 3

GetCountFunction · 0.85
SetCurSelFunction · 0.85
GetCurSelFunction · 0.50

Tested by

no test coverage detected