本文整理汇总了C++中HISTORY::handleSingleClick方法的典型用法代码示例。如果您正苦于以下问题:C++ HISTORY::handleSingleClick方法的具体用法?C++ HISTORY::handleSingleClick怎么用?C++ HISTORY::handleSingleClick使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HISTORY
的用法示例。
在下文中一共展示了HISTORY::handleSingleClick方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: historyListWndProc
// ---------------------------------------------------------------------------------
LRESULT APIENTRY historyListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
extern HISTORY history;
switch(msg)
{
case WM_CHAR:
case WM_KEYDOWN:
case WM_KEYUP:
case WM_KILLFOCUS:
return 0;
case WM_LBUTTONDOWN:
case WM_LBUTTONDBLCLK:
{
if (GetFocus() != hWnd)
SetFocus(hWnd);
// perform hit test
LVHITTESTINFO info;
info.pt.x = GET_X_LPARAM(lParam);
info.pt.y = GET_Y_LPARAM(lParam);
ListView_SubItemHitTest(hWnd, (LPARAM)&info);
history.handleSingleClick(info.iItem);
return 0;
}
case WM_MBUTTONDOWN:
case WM_MBUTTONDBLCLK:
{
if (GetFocus() != hWnd)
SetFocus(hWnd);
playback.handleMiddleButtonClick();
return 0;
}
case WM_RBUTTONDOWN:
case WM_RBUTTONDBLCLK:
if (GetFocus() != hWnd)
SetFocus(hWnd);
return 0;
case WM_MOUSEWHEEL:
{
if (!history.isCursorOverHistoryList())
return SendMessage(pianoRoll.hwndList, msg, wParam, lParam);
break;
}
case WM_MOUSEWHEEL_RESENT:
{
// this is message from Piano Roll
// it means that cursor is currently over History List, and user scrolls the wheel (although focus may be on some other window)
// ensure that wParam's low-order word is 0 (so fwKeys = 0)
CallWindowProc(hwndHistoryList_oldWndProc, hWnd, WM_MOUSEWHEEL, wParam & ~(LOWORD(-1)), lParam);
return 0;
}
case WM_MOUSEACTIVATE:
if (GetFocus() != hWnd)
SetFocus(hWnd);
break;
}
return CallWindowProc(hwndHistoryList_oldWndProc, hWnd, msg, wParam, lParam);
}