本文整理汇总了C++中PLAYBACK::handleMiddleButtonClick方法的典型用法代码示例。如果您正苦于以下问题:C++ PLAYBACK::handleMiddleButtonClick方法的具体用法?C++ PLAYBACK::handleMiddleButtonClick怎么用?C++ PLAYBACK::handleMiddleButtonClick使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PLAYBACK
的用法示例。
在下文中一共展示了PLAYBACK::handleMiddleButtonClick方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: UpperMarkerEditWndProc
// -------------------------------------------------------------------------
LRESULT APIENTRY UpperMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
extern PLAYBACK playback;
extern SELECTION selection;
switch(msg)
{
case WM_SETFOCUS:
{
markersManager.markerNoteEditMode = MARKER_NOTE_EDIT_UPPER;
// enable editing
SendMessage(playback.hwndPlaybackMarkerEditField, EM_SETREADONLY, false, 0);
// disable FCEUX keyboard
disableGeneralKeyboardInput();
break;
}
case WM_KILLFOCUS:
{
// if we were editing, save and finish editing
if (markersManager.markerNoteEditMode == MARKER_NOTE_EDIT_UPPER)
{
markersManager.updateEditedMarkerNote();
markersManager.markerNoteEditMode = MARKER_NOTE_EDIT_NONE;
}
// disable editing (make the bg grayed)
SendMessage(playback.hwndPlaybackMarkerEditField, EM_SETREADONLY, true, 0);
// enable FCEUX keyboard
if (taseditorWindow.TASEditorIsInFocus)
enableGeneralKeyboardInput();
break;
}
case WM_CHAR:
case WM_KEYDOWN:
{
if (markersManager.markerNoteEditMode == MARKER_NOTE_EDIT_UPPER)
{
switch(wParam)
{
case VK_ESCAPE:
// revert text to original note text
SetWindowText(playback.hwndPlaybackMarkerEditField, markersManager.getNoteCopy(playback.displayedMarkerNumber).c_str());
SetFocus(pianoRoll.hwndList);
return 0;
case VK_RETURN:
// exit and save text changes
SetFocus(pianoRoll.hwndList);
return 0;
case VK_TAB:
{
// switch to lower edit control (also exit and save text changes)
SetFocus(selection.hwndSelectionMarkerEditField);
// scroll to the Marker
if (taseditorConfig.followMarkerNoteContext)
pianoRoll.followMarker(selection.displayedMarkerNumber);
return 0;
}
}
}
break;
}
case WM_MBUTTONDOWN:
case WM_MBUTTONDBLCLK:
{
playback.handleMiddleButtonClick();
return 0;
}
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
{
// scroll to the Marker
if (taseditorConfig.followMarkerNoteContext)
pianoRoll.followMarker(playback.displayedMarkerNumber);
break;
}
}
return CallWindowProc(playbackMarkerEdit_oldWndproc, hWnd, msg, wParam, lParam);
}