56template<
typename TYP = CStatic>
64 , m_boHasHover(false), m_boIsPushed(false), m_boIsEnable(true)
67 m_hoverCursor = ::LoadCursor(NULL, IDC_HAND);
97 m_hoverCursor = other.m_hoverCursor;
98 m_pushedCursor = other.m_pushedCursor;
109 m_boIsEnable =
false;
133 virtual LRESULT
WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
138 case WM_LBUTTONDBLCLK:
139 if ( ! m_boIsPushed )
148 m_boIsPushed =
false;
154 if ( ! m_boHasHover )
164 m_boHasHover =
false;
172 m_boHasHover =
false;
173 m_boIsPushed =
false;
177 return _super::WindowProc(message, wParam, lParam);
182 HCURSOR m_normalCursor;
183 HCURSOR m_hoverCursor;
184 HCURSOR m_pushedCursor;
189 void m_HoverSub(
void)
192 tme.cbSize =
sizeof (TRACKMOUSEEVENT);
193 tme.hwndTrack = m_hWnd;
194 tme.dwHoverTime = HOVER_DEFAULT;
195 tme.dwFlags = TME_HOVER | TME_LEAVE;
196 ::_TrackMouseEvent(&tme);
199 void m_CheckNowState(
void)
201 if ( ! m_boIsEnable ) {
return; }
202 if ( m_normalCursor == NULL )
204 m_normalCursor = ::GetCursor();
205 ::SetClassLongPtr(m_hWnd, GCLP_HCURSOR, NULL);
207 HCURSOR h = m_normalCursor;
208 if ( _super::IsWindowEnabled() )
210 if ( m_boIsPushed && m_pushedCursor != NULL )
214 else if ( m_boHasHover && m_hoverCursor != NULL )
void SetHoverCursor(HCURSOR h)
[設定] ホバー状態のカーソル設定.
CCursorControlAddinT(void)
コンストラクタ
void CopyCursorState(const CCursorControlAddinT< T > &other)
[設定] カーソル設定コピー.
void ResetCursor(void)
[設定] 特殊カーソルモード解除.
void SpecialCursor(HCURSOR h)
[設定] 特殊カーソルモード.
void SetPushedCursor(HCURSOR h)
[設定] 押下状態のカーソル設定.
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
[通知] for processing Windows messages.