VC ++ learning notes (3)

xiaoxiao2021-03-06  41

The call to the Updatedata (TRUE) will give the variable to the user-defined value. The Updatedata (false) statement will clear the contents of the output edit box variable.

Perform application Winexec ("NOTEPAD.EXE", SW_SHOW);

Get the control object getdlgitem (ID);

Void OnMousemove (Uint Nflags, Cpoint Point) Through this function we can get two parameters: Uflags and Point, these two parameters. We find out the description of these two parameters in MSDN: NFlagsindicates WHether Various Virtual Keys Are Down. THIS Parameter Can Be An Combination Of The Following Values: Indicates which keys are pressed. This parameter can be any combination of the lower value: MK_Control set if the ctrl key is down. // Ctrl key · mk_lbutton set if the left mouse button · mk_mbutton set if the middle mouse button is down . / / MK_RBUTTON SET IF The Right Mouse Button Is Down.// Mouse Right-click · MK_SHIFT SET IF THE SHIFT Key Is Down. // Shift Key

if ((nFlags & MK_LBUTTON) == MK_LBUTTON) // determines whether the pressed button pointSpecifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window. indicating coordinates of the cursor . This cursor is relative to the upper left corner of the form. This is the parameter we have to find is Point, then this parameter is the cpoint type, let's check the cpoint type, how to check? A Tracted MSDN, another in the project, right-click on the CPOINT, in the right-click menu, click Goto The Definition of Cpoint. We saw the source code of the MFC, CPoint itself is a class, but it is tagpoint. We look at its original definition: typedef struct tagpoint {long x; long y;} Point, * Ppoint, Near * Nppoint, Far * LPPOINT

Program pointer IDC_CROSSIDC_UPARROWIDC_SIZEALLIDC_SIZENWSEIDC_SIDC_SIDC_SIZEIDC_SIZENSIDC_NOIDC_APPSTARTINGIDC_HELP

When using the setcursor method, if you want to keep your mouse shape, you need to return true.

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

New Post(0)