你的位置:丰满人妻偷人精品视频_未发育偷拍小缝缝视频_正播丰满少妇激情高潮_男女激情大尺度无遮挡_A级成人片视频在线看_衣服被扒开强摸双乳作_欧美春色视频免费网站 > 男女乱真视频全播放 > >人妻女医痴汉电车~被耻辱出现图片双击error C2059
热点资讯
男女乱真视频全播放

人妻女医痴汉电车~被耻辱出现图片双击error C2059

发布日期:2022-09-24 01:41    点击次数:151

潘金莲与西门庆吃饭人妻女医痴汉电车~被耻辱 版权通盘,未经允许不行算作交易用途!!转载请注明出处!!谢谢互助!!2013-03-20操作系统:Windows 7旗舰版器具:VS2010说话:MFC  C++第一步:初化COM接口。在InitInstance中加入如下代码:12345if(!AfxOleInit()){AfxMessageBox(_T( "Cannot initialize COM dll" ));return FALSE;}第二步:向工程添加Excel的C++操作类。具体规范见下图:1.Ctrl+Shift+X 掀开类向导。

图片

2.添加需要的类文献。如下图:

图片

4.将刚才导入的类头文献,加到模块std中。#include "CApplication.h"#include "CWorkbooks.h"#include "CWorkbook.h"#include "CWorksheets.h"#include "CWorksheet.h"#include "CRanges.h"#include "CRange.h"//以上加入到 stdafx.h中5、将以上面文献的#import "C:\\Program Files\\Microsoft Office\\Office14\\EXCEL.EXE" no_namespace替换成 以下:#pragma region Import the type libraries//#import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52"#import "C:\\Program Files\\Common Files\\Microsoft Shared\\Office14\\MSO.DLL" \rename("RGB", "ExclRGB") rename("DocumentProperties", "ExclDocumentProperties") \rename("SearchPath", "ExclSearchPath")using namespace Office;//#import "libid:0002E157-0000-0000-C000-000000000046"#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB" \rename("Reference", "ignorethis")using namespace VBIDE;#pragma warning( disable : 4049 )//#import "libid:00020813-0000-0000-C000-000000000046"#import "C:\\Program Files\\Microsoft Office\\Office14\\EXCEL.EXE" \exclude("IFont", "IPicture") \rename("RGB", "ExclRGB") \rename("DocumentProperties", "ExclDocumentProperties") \rename("SearchPath", "ExclSearchPath") \rename("CopyFile", "ExclCopyFile") \rename("DialogBox", "ExclDialogBox") \rename("ReplaceText", "ExclReplaceText")using namespace Excel;6、编译,出现

图片

双击error C2059,将VARIANT DialogBox()改成VARIANT _DialogBox()再次编译,通过!!以下为读excel操作CApplication ExcelApp;CWorkbooks books;CWorkbook book;CWorksheets sheets;CWorksheet sheet;CRange range;CRange excel_current_range_;LPDISPATCH lpDisp = NULL;CString name;CString FilePathname;CString Filescr = _T("F:\\BenderMenu.xlsx");CString strSheetName = _T("Menu");CString strItem1;COleVariant varItem;COleVariant File;int PointSum = 0;long i = 0, j = 0;CEdit* pEdit = NULL;int IDL = 0;int IDA = 0;//创建Excel 工作器(运转Excel)if(!ExcelApp.CreateDispatch(_T("Excel.Application"),NULL)){AfxMessageBox(_T("运转Excel工作器失败!"));return;}ExcelApp.put_Visible(FALSE);ExcelApp.put_UserControl(TRUE);books.AttachDispatch(ExcelApp.get_Workbooks());CFileDialog Fdlg(TRUE,精品 _T("Worksheet Files (*.xlsx)|*.xlsx"), NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("Worksheet Files (*.xlsx)|*.xlsx"), NULL);Fdlg.m_ofn.lpstrInitialDir = _T("F:\\");if(IDOK == Fdlg.DoModal()){//get path of the fileFilePathname = Fdlg.GetPathName();//File = FilePathname;}else{return;}//掀开一个责任簿lpDisp = books.Open(FilePathname,vtMissing, vtMissing, vtMissing, vtMissing,国产手机朵唯排第几 vtMissing,vtMissing, vtMissing, vtMissing, vtMissing, vtMissing,vtMissing, vtMissing, vtMissing, vtMissing);if(lpDisp != NULL){book.AttachDispatch(lpDisp);}sheets.AttachDispatch(book.get_Sheets());lpDisp = sheets.get_Item(_variant_t(strSheetName));if(lpDisp != NULL){sheet.AttachDispatch(lpDisp);}//以上为联系sheet,book等,,以下为读操作range.AttachDispatch(sheet.get_Cells());//一定要,不领略为何range.AttachDispatch(range.get_Item(COleVariant((long)20), COleVariant((long)2)).pdispVal, TRUE);//联系(20,2)单位格varItem = range.get_Value2();strItem1.Format(_T("%.lf"), varItem.dblVal);//领略是double类型,平直使用,若不领略得做类型判断PointSum = _ttoi(strItem1);m_PIC.m_pointSum = PointSum;range.ReleaseDispatch();//以下为写excelrange.AttachDispatch(sheet.get_Cells());range.AttachDispatch(range.get_Item(COleVariant((long)i), COleVariant((long)2)).pdispVal, TRUE);//varItem.dblVal = m_PIC.m_Len[i - 2];//range.put_Item(COleVariant((long)i), COleVariant((long)2), COleVariant(m_PIC.m_Len[i - 2]));range.put_Value2(COleVariant(m_PIC.m_Len[i - 2]));range.ReleaseDispatch();//临了保存book.Save();//开释对象sheet.ReleaseDispatch();sheets.ReleaseDispatch();book.ReleaseDispatch();books.ReleaseDispatch();ExcelApp.Quit();ExcelApp.ReleaseDispatch(); 本站仅提供存储工作,通盘本色均由用户发布,如发现存害或侵权本色,请点击举报。

上一篇:亚洲精品制服丝袜四区这一层浅红色便是“快速蒙板”
下一篇:我和黑人做了好大好爽下载完后通过图标大开谷歌浏览器