#ifndef _COMMON_NOTIFYMESSAGEHEADER_HPP_
#define _COMMON_NOTIFYMESSAGEHEADER_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_COMMCTRL_HPP_
#include <common/commctrl.hpp>
#endif

class NotifyMessageHeader : private NMHDR
{
public:
	NotifyMessageHeader(void);
  NotifyMessageHeader(const NotifyMessageHeader &someNotifyMessageHeader);
	NotifyMessageHeader(const NMHDR &someNMHDR);
	virtual ~NotifyMessageHeader();
	NotifyMessageHeader &operator=(const NotifyMessageHeader &someNotifyMessageHeader);
	NotifyMessageHeader &operator=(const NMHDR &someNMHDR);
	WORD operator==(const NotifyMessageHeader &someNotifyMessageHeader)const;
	WORD operator==(const NMHDR &someNMHDR)const;
  operator NMHDR&(void);
	HWND hwndFrom(void)const;
	void hwndFrom(HWND hwndFrom);
	UINT idFrom(void)const;
	void idFrom(UINT idFrom);
	UINT code(void)const;
  void code(UINT code);
private:
};

inline
NotifyMessageHeader::NotifyMessageHeader(void)
{
	hwndFrom(0);
	idFrom(0);
  code(0);
}

inline
NotifyMessageHeader::NotifyMessageHeader(const NotifyMessageHeader &someNotifyMessageHeader)
{
  *this=someNotifyMessageHeader;
}

inline
NotifyMessageHeader::NotifyMessageHeader(const NMHDR &someNMHDR)
{
  *this=someNMHDR;
}

inline
NotifyMessageHeader::~NotifyMessageHeader()
{
}

inline
NotifyMessageHeader &NotifyMessageHeader::operator=(const NotifyMessageHeader &someNotifyMessageHeader)
{
	hwndFrom(someNotifyMessageHeader.hwndFrom());
	idFrom(someNotifyMessageHeader.idFrom());
	code(someNotifyMessageHeader.code());
  return *this;
}

inline
NotifyMessageHeader &NotifyMessageHeader::operator=(const NMHDR &someNMHDR)
{
  hwndFrom(someNMHDR.hwndFrom);
	idFrom(someNMHDR.idFrom);
	code(someNMHDR.code);
	return *this;
}

inline
WORD NotifyMessageHeader::operator==(const NotifyMessageHeader &someNotifyMessageHeader)const
{
	return (hwndFrom()==someNotifyMessageHeader.hwndFrom()&&
					idFrom()==someNotifyMessageHeader.idFrom()&&
          code()==someNotifyMessageHeader.code());
}

inline
WORD NotifyMessageHeader::operator==(const NMHDR &someNMHDR)const
{
  return (hwndFrom()==someNMHDR.hwndFrom&&
	  			idFrom()==someNMHDR.idFrom&&
					code()==someNMHDR.code);
}

inline
NotifyMessageHeader::operator NMHDR&(void)
{
  return *this;
}

inline
HWND NotifyMessageHeader::hwndFrom(void)const
{
	return NMHDR::hwndFrom;
}

inline
void NotifyMessageHeader::hwndFrom(HWND hwndFrom)
{
	NMHDR::hwndFrom=hwndFrom;
}

inline
UINT NotifyMessageHeader::idFrom(void)const
{
	return NMHDR::idFrom;
}

inline
void NotifyMessageHeader::idFrom(UINT idFrom)
{
  NMHDR::idFrom=idFrom;
}

inline
UINT NotifyMessageHeader::code(void)const
{
  return NMHDR::code;
}

inline
void NotifyMessageHeader::code(UINT code)
{
  NMHDR::code=code;
}
#endif

