PDA

View Full Version : hwnd



bebakhshid
دوشنبه 21 مهر 1382, 13:41 عصر
یه کمی راجع به hwnd,tmsgtype,... تو ظیح بدید
بهتر راه و چاه نشون بدید

Inprise
دوشنبه 21 مهر 1382, 15:27 عصر
Selected from MSDN




The window object is an object of the C++ CWnd class (or a derived class) that your program creates directly. It comes and goes in response to your program's constructor and destructor calls. The Windows window, on the other hand, is an opaque handle to an internal Windows data structure that corresponds to a window and consumes system resources when present. A Windows window is identified by a "window handle" (HWND) and is created after the CWnd object is created by a call to the Create member function of class CWnd. The window may be destroyed either by a program call or by a user's action. The window handle is stored in the window object's m_hWnd member variable.




selected from delphi's in-line help who says u hello with a little F 1 !



The TMsg type is holds the details of a Windows message. This is the structure that Windows uses to encode a message, as opposed to the TMessage type, which encodes the parameters that are passed to a CLX Window procedure.

elphi syntax:

type

TMsg = packed record
hwnd: HWND;
message: UINT;
wParam: WPARAM;
lParam: LPARAM;
time: DWORD;
pt: TPoint;

end;

C++ syntax:

typedef struct tagMSG {

HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG;

typedef tagMSG TMsg;


The following table list the fields of TMsg:

Field Meaning

hwnd The handle of the window to which the message is sent.
message The identifier of the message (the Windows message code).
wParam The wParam of the message.
lParam The lParam of the message.
time The time that the message was sent.
pt The position of the mouse cursor when the message was sent.




موفق باشید !!