cursor

https://blog.csdn.net/zzzfb/article/details/80275760 

Keyboard cursor:
    the CWnd * pWnd the GetFocus = ();
    IF (pWnd == NULL)
     ; // NO Focus
     the else
     the nID = pWnd-> GetDlgCtrlID (); // get the ID of the keyboard cursor control's

Mouse cursor:
    a CPoint Point; // define a position for determining a cursor position
    GetCursorPos (& point); // Get the current cursor position, so that the menu can follow the cursor  
    while ScreenToClient (& Point);
    // get a handle to the form's control
    CWnd hControlWnd = * (the CWnd *) ChildWindowFromPoint (Point);
    UINT the nID = hControlWnd-> GetDlgCtrlID ();


Guess you like

Origin www.cnblogs.com/wllwqdeai/p/11004769.html