Home > Software engineering >  The small white for help
The small white for help

Time:10-17

According to the coordinates, judge the position of the button, the button press after not loosen, the position of the cursor outside the button again to loosen, button will be up, how,

Small white just contact, I don't know don't know clearly

CodePudding user response:

Is there a library functions can be implemented, or through variable judgment

CodePudding user response:

Had to press the button, the cursor and then loosen the button will bounce, do not need special treatment

CodePudding user response:

I can't, after I add a new button, the cursor after the release button or press the state,

CodePudding user response:

refer to the second floor boylafong response:
was press the button, the cursor and then loosen the button will pop-up ah, do not need special treatment.


I can't, I in the press and pop-up function after adding a new button, move the cursor to another location after the button has been pressed state, if they don't move the cursor, the mouse pop-up button will also be up

CodePudding user response:

Default should work is that you say, say what you are using the development environment and project types have a look, you can also directly create an MFC dialog based project, and then drag a button up to see the effect, is the effect that you say

CodePudding user response:

You're the button will not draw the ~

CodePudding user response:

Rewrite a button class, inheritance cbutton
Rewrite lbuttondown
 
Void CCustomButton: : OnLButtonDown (UINT nFlags, CPoint point)
{
//TODO: add the message handler code and/or invoke the default

CButton: : OnLButtonDown (nFlags, point);
WPARAM WPARAM=(((DWORD) WM_LBUTTONDOWN) & lt; <16) + ((DWORD) GetDlgCtrlID ());
: : SendMessage (this - & gt; The GetParent () - & gt; GetSafeHwnd (), WM_COMMAND, wParam, 0);
}
  • Related