mrDarker
2025-05-20 2a803976ed12e59f3e082e7c08941ef5004e6ea1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// 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_)