#ifndef	__DEFINE_H__
#define __DEFINE_H__


#define IP_ADDR							"128.134.63.186"
#define PORT_NUM						7802
#define IDP_SOCKETS_INIT_FAILD			"Windows 소켓 초기화에 실패하였습니다."
#define WS_EX_LAYERED					0x00080000
#define LWA_COLORKEY					1
#define	LWA_ALPHA						2


enum
{
	FILE_PATH_TYPE_FILE = 0, 
	FILE_PATH_TYPE_DIRECTORY,
};

enum
{
	KEY_MAKING_START = 0,
	KEY_MAKING_SET_PATH, 
	KEY_MAKING_SET_TOTAL, 
	KEY_MAKING_SET_CUR, 
	KEY_MAKING_END,
};

enum
{
	SUB_BACKGROUND_STATE_NULL = 0, 
	SUB_BACKGROUND_STATE_HOME, 
	SUB_BACKGROUND_STATE_VERTIFICATION, 
	SUB_BACKGROUND_STATE_REGISTER,
};

enum
{
	MOUSE_STATE_NULL = 0, 
	MOUSE_STATE_LDOWN, 
};

enum
{
	PAINT_STATE_NULL = 0,
	PAINT_STATE_GUEST_DRAWING,
	PAINT_STATE_GUEST_DRAW_END,
	PAINT_STATE_USER_DRAWING,
	PAINT_STATE_USER_DRAW_END,
	PAINT_STATE_TOTAL_DRAWING,
	PAINT_STATE_TOTAL_DRAW_END,
};

#define READY_BACKBUFFER(hwnd,pDC,pDrawDC,BackColor) \
	CDC _MACRO_dc;\
	CBitmap _MACRO_bitmap;\
	CBitmap	* _MACRO_pOldBitmap;\
	CRect _MACRO_client;\
	CRect _MACRO_clip;\
	pDrawDC = pDC;\
	pDC->GetClipBox(_MACRO_clip);\
	::GetClientRect(hwnd,&_MACRO_client);\
	if (!pDC->IsPrinting()) { \
		if (_MACRO_dc.CreateCompatibleDC(pDC))	{ \
			if (_MACRO_bitmap.CreateCompatibleBitmap(pDC, _MACRO_client.Width(), _MACRO_client.Height())) {\
				pDrawDC = &_MACRO_dc;\
				_MACRO_pOldBitmap = _MACRO_dc.SelectObject(&_MACRO_bitmap);\
				_MACRO_dc.FillSolidRect(_MACRO_clip,BackColor);\
  			}\
		}\
	}\

#define BLIT_OPAQUE_BACKBUFFER(pDC,pDrawDC) \
		if (pDrawDC != pDC) {\
		pDC->LPtoDP(&_MACRO_clip);\
		pDC->SetViewportOrg(0, 0);\
		pDC->SetWindowOrg(0,0);\
		pDC->SetMapMode(MM_TEXT);\
		_MACRO_dc.SetViewportOrg(0, 0);\
		_MACRO_dc.SetWindowOrg(0,0);\
		_MACRO_dc.SetMapMode(MM_TEXT);\
		pDC->BitBlt(_MACRO_clip.left, _MACRO_clip.top, _MACRO_clip.Width(), _MACRO_clip.Height(),\
			&_MACRO_dc,_MACRO_clip.left, _MACRO_clip.top, SRCCOPY);\
		_MACRO_dc.SelectObject(_MACRO_pOldBitmap);\
	}\

#include "KPacket.h"
#include "CCeXDib.h"
#include "PPDrawManager.h"
#include "PPHtmlDrawer.h"
#include "PPTooltip.h"
#include "YButton.h"
#include "KMessageBoxDlg.h"
#include "InfomationDlg.h"
#include "CheckSoftware.h"
#include "CheckReliability.h"
#include "SearchDataList.h"
#include "ClientSocket.h"
#include "MemberJoinDlg.h"
#include "LoginDlg.h"
#include "ReplyListDlg.h"
#include "ReportListDlg.h"
#include "RegisterReportDlg.h"



//#include <gdiplus.h>
//#pragma comment( lib, "gdiplus.lib");
//using namespace Gdiplus;
//Image img(_TEXT("z.png"));
/*
#ifndef ULONG_PTR
#define ULONG_PTR unsigned long*
#endif 

#include <Gdiplus.h>
#include <GdiplusBase.h>
#include <GdiplusColor.h>
#include <GdiplusPen.h>
#include <GdiplusBrash.h>
#include <GdiplusPath.h>
#include <Gdiplusgraphics.h>
#include <Gdiplusflat.h>

using namespace Gdiplus;
#pragma comment( lib, "gdiplus.lib" )


*/

#endif //__DEFINE_H__