From d6b32f9886e5794500498b4d1e1f4dd373265199 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期一, 01 七月 2024 18:19:12 +0800
Subject: [PATCH] this update excel
---
jrj/project/printview/Template.Print.ViewEx.cpp | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/jrj/project/printview/Template.Print.ViewEx.cpp b/jrj/project/printview/Template.Print.ViewEx.cpp
index ebdaa3d..2c1e1ab 100644
--- a/jrj/project/printview/Template.Print.ViewEx.cpp
+++ b/jrj/project/printview/Template.Print.ViewEx.cpp
@@ -76,12 +76,10 @@
#endif
- xstring GetSaveFileName(xstring initFileName, xstring filter, xstring ext)
+ xstring GetMySaveFileName(xstring initFileName, xstring filter, xstring ext)
{
- wchar_t szFileName[255];
- wchar_t szPath[255];
- szFileName[0] = 0;
- szPath[0] = 0;
+ wchar_t szFileName[255] = { 0 };
+ wchar_t szPath[255] = { 0 };
if(initFileName !=L"")
{
@@ -95,10 +93,11 @@
}
int nFilterIndex = 1;
- OPENFILENAMEW ofn;
-
- ofn.lStructSize = 88;//sizeof(ofn);
- ofn.hwndOwner = 0;
+ OPENFILENAMEW ofn = { 0 };
+ //::ZeroMemory(&ofn,sizeof(OPENFILENAMEW))
+ //ofn.lStructSize = 88;//sizeof(ofn);
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = GetHWND();
ofn.hInstance = 0;
ofn.lpstrFilter = filter;
//"JPEG 文件(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0全部文件(*.*)\0*.*\0";
@@ -138,7 +137,7 @@
if(m_EntityName==L"SaleOrder") pre=L"PI";
if(m_EntityName==L"GDN3")pre=L"INV";
}
- xstring file1 = GetSaveFileName(pre+m_EntityNo+L".xlsx",
+ xstring file1 = GetMySaveFileName(pre+m_EntityNo+L".xlsx",
L"Excel1文件(*.xlsx)\0*.xlsx;*.xls\0Excel97文件(*.xls)\0*.xls\0PDF文件(*.pdf)\0*.pdf\0",
L"xlsx");
if(file1 ==L"") return 1;
--
Gitblit v1.9.3