From 863f21995955fb3e9aa471430218967d4e642c27 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期四, 29 五月 2025 16:11:24 +0800
Subject: [PATCH] Merge branch 'liuyang'
---
SourceCode/Bond/Servo/GridControl/NewCellTypes/GridURLCell.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/GridControl/NewCellTypes/GridURLCell.h b/SourceCode/Bond/Servo/GridControl/NewCellTypes/GridURLCell.h
new file mode 100644
index 0000000..1960250
--- /dev/null
+++ b/SourceCode/Bond/Servo/GridControl/NewCellTypes/GridURLCell.h
@@ -0,0 +1,55 @@
+// GridURLCell.h: interface for the CGridURLCell class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_GRIDURLCELL_H__9F4A50B4_D773_11D3_A439_F7E60631F563__INCLUDED_)
+#define AFX_GRIDURLCELL_H__9F4A50B4_D773_11D3_A439_F7E60631F563__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "GridCell.h"
+
+typedef struct {
+ LPCTSTR szURLPrefix;
+ size_t nLength;
+} URLStruct;
+
+
+
+class CGridURLCell : public CGridCell
+{
+ DECLARE_DYNCREATE(CGridURLCell)
+
+public:
+ CGridURLCell();
+ virtual ~CGridURLCell();
+
+ virtual BOOL Draw(CDC* pDC, int nRow, int nCol, CRect rect, BOOL bEraseBkgnd = TRUE);
+ virtual BOOL Edit(int nRow, int nCol, CRect rect, CPoint point, UINT nID, UINT nChar);
+ virtual LPCTSTR GetTipText() { return NULL; }
+ void SetAutoLaunchUrl(BOOL bLaunch = TRUE) { m_bLaunchUrl = bLaunch; }
+ BOOL GetAutoLaunchUrl() { return m_bLaunchUrl; }
+
+protected:
+ virtual BOOL OnSetCursor();
+ virtual void OnClick(CPoint PointCellRelative);
+
+ BOOL HasUrl(CString str);
+ BOOL OverURL(CPoint& pt, CString& strURL);
+
+protected:
+#ifndef _WIN32_WCE
+ static HCURSOR g_hLinkCursor; // Hyperlink mouse cursor
+ HCURSOR GetHandCursor();
+#endif
+ static URLStruct g_szURIprefixes[];
+
+protected:
+ COLORREF m_clrUrl;
+ BOOL m_bLaunchUrl;
+ CRect m_Rect;
+};
+
+#endif // !defined(AFX_GRIDURLCELL_H__9F4A50B4_D773_11D3_A439_F7E60631F563__INCLUDED_)
--
Gitblit v1.9.3