Decree of the three hits of the mouse

zhaozj2021-02-08  245

void click_3 () {} BOOL CDlgApp :: PreTranslateMessage (MSG * pMsg) {static short flag = 0, flagtime = 0; UINT time; static MSG tempMsg; static DWORD t1, t2, t3 = 20000; time = GetDoubleClickTime (); T2 = gettickcount (); if ((pmsg-> message == wm_lbuttondblclk) || (PMSG-> Message == WM_LButtondown)) {if (pmsg-> message == wm_lbuttondblclk) {t1 = gettickcount (); flag = 1 FlagTime = 1; tempmsg.hwnd = pmsg-> hw; tempmsg.MESSAGE = PMSG-> Message; tempmsg.lparam = pmsg-> lpaam; tempmsg.wparam = pmsg-> wparam; return true;} if (PMSG-> Message == wm_lbuttondown) {if (flag == 1) {T2 = gettickcount (); t3 = t2-t1; if (t3 Time) {FlagTime = 0; Return CWINAPP :: PretranslateMessage (& Tempmsg);}}} Return CWINAPP :: PretranslateMessage (PMSG);

}

转载请注明原文地址:https://www.9cbs.com/read-2620.html

New Post(0)