// MyCell - version 1.1
// Written by Yanxueming <yanxm2003@hotmail.com>
// Copyright (C) 2006-2007
// All rights reserved.
//
// The code and information is provided "as-is" without
// warranty of any kind, either expressed or implied.
#pragma once
#include "line.h"
namespace mycell{
inline void DrawGhostBar(HDC hDC,LPCRECT lprc)
{
CBrush brush(CDCHandle::GetHalftoneBrush());
if(brush.m_hBrush != NULL)
{
HGDIOBJ hBrushOld = SelectObject(hDC,brush);
PatBlt(hDC,lprc->left, lprc->top,lprc->right-lprc->left,lprc->bottom-lprc->top, PATINVERT);
SelectObject(hDC,hBrushOld);
}
}
inline void CleanGhostBar(HDC hDC,LPCRECT lprc)
{
DrawGhostBar(hDC,lprc);
}
inline void DrawGhostHLine(HDC hDC,HLine hl)
{
if(hl.IsValid()){
RECT rc={hl.xLeft,hl.y,hl.xRight,hl.y+3};
DrawGhostBar(hDC,&rc);
}
}
inline void DrawGhostVLine(HDC hDC,VLine vl)
{
RECT rc={vl.x,vl.yTop,vl.x+3,vl.yBottom};//.xLeft,hl.y,hl.xRight,hl.y+3};
DrawGhostBar(hDC,&rc);
}
}//namespace mycell