// ShitarabianPostCommand.cpp: CShitarabianPostCommand クラスのインプリメンテーション
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ShitarabianPostCommand.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// 構築/消滅
//////////////////////////////////////////////////////////////////////

CShitarabianPostCommand::CShitarabianPostCommand()
{
}

CShitarabianPostCommand::~CShitarabianPostCommand()
{

}


CShitarabianPostCommand*	CShitarabianPostCommand::GetInstance()
{
	static CShitarabianPostCommand	Instance;
	return( &Instance );
}

BOOL	CShitarabianPostCommand::Send(
	HWND	hShitarabian,			// <I> したらびあんウィンドウ [-] (-) :-
	HWND	hMy,
	WPARAM	iCommand,
	void*	pParamValue,
	int		iParamSize
)
{
//	CString	str;
//	str.Format("%d", hShitarabian);
//	::AfxMessageBox( str );

	COPYDATASTRUCT cds;
	cds.dwData = iCommand;
	cds.cbData = iParamSize;
	cds.lpData = pParamValue;
	LRESULT	iResult = ::SendMessage( hShitarabian, WM_COPYDATA, (WPARAM)hMy, (LPARAM)&cds );
	if ( iResult == 0 )
	{
		return( TRUE );
	}
	return( FALSE );
}