From d79b1d94a13536a74d8a72caab3a1ed3c9e2e840 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期一, 01 七月 2024 14:57:39 +0800
Subject: [PATCH] bug createinstance less static

---
 jrj/project/start.vframe.vbusiness.cpp |    3 +--
 jrj/project/vindexform.cpp             |    3 +--
 jrj/project/vindexmenu.cpp             |    3 +--
 jrj/xframe/wobject/xwin.hpp            |    2 +-
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/jrj/project/start.vframe.vbusiness.cpp b/jrj/project/start.vframe.vbusiness.cpp
index 3d156d8..9ac9f36 100644
--- a/jrj/project/start.vframe.vbusiness.cpp
+++ b/jrj/project/start.vframe.vbusiness.cpp
@@ -14,8 +14,7 @@
 public:
 	static startvframevbusiness * CreateInstance(void* implPtr,void* hWnd)
 	{
-		startvframevbusiness* pWin = new startvframevbusiness(implPtr,(HWND)hWnd);
-		return pWin;
+		return new startvframevbusiness(implPtr,(HWND)hWnd);
 	}
 public:
 	int OnCmdDispatch(const wchar_t* comd)
diff --git a/jrj/project/vindexform.cpp b/jrj/project/vindexform.cpp
index cb6a969..7707025 100644
--- a/jrj/project/vindexform.cpp
+++ b/jrj/project/vindexform.cpp
@@ -26,8 +26,7 @@
 public:
 	static vindexform * CreateInstance(void* implPtr,void* hWnd)
 	{
-		vindexform* pWin = new vindexform(implPtr,(HWND)hWnd);
-		return pWin;
+		return  new vindexform(implPtr,(HWND)hWnd);
 	}
 public:
 	int OnDWClick(TEvent* evt, int p)
diff --git a/jrj/project/vindexmenu.cpp b/jrj/project/vindexmenu.cpp
index 6945e29..0a54c11 100644
--- a/jrj/project/vindexmenu.cpp
+++ b/jrj/project/vindexmenu.cpp
@@ -35,8 +35,7 @@
 public:
 	static vindexmenu* CreateInstance(void* implPtr, void* hWnd)
 	{
-		vindexmenu* pWin = new vindexmenu(implPtr, (HWND)hWnd);
-		return pWin;
+		return new vindexmenu(implPtr, (HWND)hWnd);
 	}
 
 	int OnHideWin()
diff --git a/jrj/xframe/wobject/xwin.hpp b/jrj/xframe/wobject/xwin.hpp
index 618b738..3a21359 100644
--- a/jrj/xframe/wobject/xwin.hpp
+++ b/jrj/xframe/wobject/xwin.hpp
@@ -16,7 +16,7 @@
 public:\
 	ty(void* impl,HWND hWnd):pty(impl,hWnd){}\
 public:\
-	ty * CreateInstance(void* impl,void* hWnd)\
+	static ty * CreateInstance(void* impl,void* hWnd)\
 	{\
 		return new ty(impl,(HWND)hWnd);\
 	}

--
Gitblit v1.9.3