home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
sybase
/
starbuck
/
hpp.z
/
WMESSAGE.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
3KB
|
92 lines
/*************************************************************************
*
* WMessage --
*
*************************************************************************/
#ifndef _WMESSAGE_HPP_INCLUDED
#define _WMESSAGE_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WDEF_HPP_INCLUDED
# include "wdef.hpp"
#endif
#ifndef _WEVENTD_HPP_INCLUDED
# include "weventd.hpp"
#endif
//
// WMessage -- A convenience class for encapsulating window messages.
//
class WCMCLASS WMessage {
public:
/**********************************************************
* Constructors and destructors
*********************************************************/
// Construct & destruct
WMessage();
WMessage( WUInt msg, WUInt wParam, WLong lParam );
WMessage( WWindowHandle hWnd, WUInt msg, WUInt wParam, WLong lParam );
WMessage( WWindowHandle hWnd, WUInt msg, WUInt wParam, WLong lParam,
WDWord time, const WPoint & pt );
~WMessage();
/**********************************************************
* Properties
*********************************************************/
WUShort GetControlID() const;
WWindowHandle GetControlHandle() const;
WInt GetCommandCode() const;
WUShort GetMenuFlags() const;
WMenuHandle GetMenuHandle() const;
WUShort GetMenuID() const;
WBool GetMenuClosed() const;
/**********************************************************
* Methods
*********************************************************/
/**********************************************************
* Data members
*********************************************************/
// Data that describes the message... exposed for quick access.
// This is very system-specific!
// NOTE: Only msg, wParam, and lParam are always set;
// periodically, hWnd, time and pt will remain unset
WWindowHandle hWnd;
WUInt msg;
WUInt wParam;
WLong lParam;
WDWord time;
WPoint pt;
};
//
// WMessageHookEventData
//
struct WMessageHookEventData : public WEventData {
WMessage message;
WLong returns;
};
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WMESSAGE_HPP_INCLUDED