// VerticalLine.h: interface for the CVerticalLine class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_VERTICALLINE_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_) #define AFX_VERTICALLINE_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_ #pragma comment(lib, "Msimg32.lib") // TransparentBlt //====== VerticalLine ===================================================== #ifndef NOVERTICALLINE #ifdef _WIN32 #define BYVERTICALLINE_CLASSA "BYVerticalLine" #define BYVERTICALLINE_CLASSW L"BYVerticalLine" #ifdef UNICODE #define BYVERTICALLINE_CLASS BYVERTICALLINE_CLASSW #else #define BYVERTICALLINE_CLASS BYVERTICALLINE_CLASSA #endif #else #define BYVERTICALLINE_CLASS "BYVerticalLine" #endif #define BYSTAG_VERTICALLINE _T("ISVERTICALLINE") //====== WM_NOTIFY codes (NMHDR.code values) ================================== #define BYVERTICALLINE_FIRST (0U-2330U) // #define BYVERTICALLINE_LAST (0U-2320U) #define BYVERTICALLINE_MOVEX (BYVERTICALLINE_FIRST - 1) typedef struct tagBYVERTICALLINE_NMHDR { NMHDR nmhdr; DWORD dwData; DWORD dwData1; DWORD dwData2; } BYVERTICALLINE_NMHDR; #endif #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CVerticalLine { public: CVerticalLine(); virtual ~CVerticalLine(); public: void EnableResize(); void DisableResize(); static BOOL RegisterWndClass(); static CVerticalLine* Hook(HWND hWnd); void Notify(int nCode, int dwData, int dwData1 = 0, int dwData2 = 0); void Release(); void SetBkgndColor(COLORREF cr); void SetLineColor(COLORREF cr); static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam); LRESULT OnDestroy(WPARAM wParam, LPARAM lParam); LRESULT OnTimer(WPARAM wParam, LPARAM lParam); LRESULT OnSetCursor(WPARAM wParam, LPARAM lParam); LRESULT OnPaint(WPARAM wParam, LPARAM lParam); LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam); private: HWND m_hWnd; COLORREF m_crBkgnd; COLORREF m_crLineColor; private: BOOL m_bEnableResize; }; #endif // !defined(AFX_VERTICALLINE_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_)