|  |  |  | 
|---|
|  |  |  | #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"") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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"; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|