comparison foosdk/sdk/libPPUI/CMiddleDragOverlay.h @ 1:20d02a178406 default tip

*: check in everything else yay
author Paper <paper@tflc.us>
date Mon, 05 Jan 2026 02:15:46 -0500
parents
children
comparison
equal deleted inserted replaced
0:e9bb126753e7 1:20d02a178406
1 #pragma once
2
3 #include "win32_op.h"
4 #include "win32_utility.h"
5
6 class CMiddleDragOverlay : public CWindowImpl<CMiddleDragOverlay,CWindow, CWinTraits<WS_POPUP, WS_EX_LAYERED> > {
7 public:
8 DECLARE_WND_CLASS_EX(TEXT("{61BFC7AD-C00F-4CEA-8E6A-EA22E01F43F9}"),0,(-1));
9
10 enum {
11 ColorKey = 0xc0ffee
12 };
13
14 BEGIN_MSG_MAP_EX(CMiddleDragOverlay)
15 MESSAGE_HANDLER(WM_CREATE,OnCreate);
16 MSG_WM_ERASEBKGND(OnEraseBkgnd)
17 MSG_WM_PAINT(OnPaint)
18 END_MSG_MAP()
19
20 void ShowHere(CPoint pt);
21 private:
22 LRESULT OnCreate(UINT,WPARAM,LPARAM,BOOL&) {
23 ::SetLayeredWindowAttributes(*this,ColorKey,0,LWA_COLORKEY);
24 return 0;
25 }
26 BOOL OnEraseBkgnd(CDCHandle dc) {
27 CRect rcClient;
28 WIN32_OP_D(GetClientRect(rcClient));
29 dc.FillSolidRect(rcClient, ColorKey);
30 return TRUE;
31 }
32 void OnPaint(CDCHandle dc) {
33 if (dc) {
34 Paint(dc);
35 } else {
36 CPaintDC pdc(*this);
37 Paint(pdc.m_hDC);
38 }
39 }
40 void Paint(CDCHandle dc);
41 };