20#include <docholder.hxx>
35#define HWWL_STRUCTURE 0
38#define HWN_BORDERDOUBLECLICKED 1
39#define CBHATCHWNDEXTRA (sizeof(LONG))
40#define SZCLASSHATCHWIN L"hatchwin"
54 DestroyWindow(m_hWnd);
109 wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
110 wc.hInstance = hInst;
115 wc.hCursor = LoadCursor(
nullptr, IDC_ARROW);
116 wc.hbrBackground =
reinterpret_cast<HBRUSH
>(COLOR_WINDOW+1);
117 wc.lpszMenuName =
nullptr;
120 return RegisterClassW(&wc) != 0;
142 , L
"OleInPlaceBorderWidth"
190 | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent
191 ,
reinterpret_cast<HMENU
>(UINT_PTR(uID)),
m_hInst,
this);
202 HRGN hrgn = CreateRectRgn(0,0,0,0);
203 SetWindowRgn(
m_hWnd,hrgn,
true);
268 IntersectRect(&rc, &rcPos, prcClip);
270 SetWindowPos(
m_hWnd,
nullptr, rc.left, rc.top, rc.right-rc.left
271 , rc.bottom-rc.top, SWP_NOZORDER | SWP_NOACTIVATE);
283 GetClientRect(
m_hWnd,&newRC);
312 if (
nullptr!=hWndKid)
314 SetParent(hWndKid,
m_hWnd);
317 ShowWindow(hWndKid, SW_SHOW);
364 , WPARAM wParam, LPARAM lParam)
376 phw=
static_cast<PCHatchWin>(
reinterpret_cast<LPCREATESTRUCT
>(lParam)->lpCreateParams);
377 SetWindowLongPtrW(hWnd,
HWWL_STRUCTURE,
reinterpret_cast<LONG_PTR
>(phw));
380 hDC=BeginPaint(hWnd,&ps);
386 GetCursorPos(&ptMouse);
387 ScreenToClient(hWnd,&ptMouse);
399 GetCursorPos(&ptMouse);
400 ScreenToClient(hWnd,&ptMouse);
409 case WM_LBUTTONDBLCLK:
424 reinterpret_cast<LPARAM
>(hWnd));
429 return DefWindowProcW(hWnd, iMsg, wParam, lParam);
BOOL Init(HWND, WORD, HWND)
const DocumentHolder * m_pDocHolder
HWND HwndAssociateSet(HWND)
void RectsSet(LPRECT, LPRECT)
CHatchWin(HINSTANCE, const DocumentHolder *)
BOOL SetCursor(HWND hWnd, UINT nHitTest) const
BOOL Track(HWND hWnd, POINT point, BOOL bAllowInvert=FALSE, HWND hWndClipTo=nullptr)
void TransformRect(LPRECT rect, HWND pWnd, HWND pWndClipTo)
BOOL HatchWindowRegister(HINSTANCE hInst)
LRESULT APIENTRY HatchWndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
const wchar_t *typedef BOOL
#define HWN_BORDERDOUBLECLICKED
#define HATCHWIN_BORDERWIDTHDEFAULT