VS2010项目添加引用的作用

Z343012090 2017-06-28 04:03:37
一,请问一下VS2010菜单的项目,添加引用的作用,
二,我用VS2010做VB程序时,在工具箱里添加通讯用的小电话组件,可以加上,不用在引用里加,那么项目,添加引用这有什么用呢
三,我想加一个AXMSChart控件,DLL文件已经下下来了,怎么才能放在工具箱里使用?
...全文
421 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-06-29
  • 打赏
  • 举报
回复
可以看作是同一个用处。
Z343012090 2017-06-29
  • 打赏
  • 举报
回复
引用 2 楼 zhao4zhong1 的回复:
在64位Windows下: 64位exe和dll在目录c:\windows\system32目录下; 32位exe和dll在目录c:\windows\syswow64目录下; 所以要注意: 在win64位系统下注册32位ocx或dll需要将32位ocx或dll拷贝到c:\windows\syswow64\目录下。 且注册要用c:\windows\syswow64\regsvr32 xxxxxxx.ocx或dll 在win64位系统下设置32位程序使用的数据库别名要用c:\windows\syswow64\cliconfg.exe 在win64位系统下设置32位程序使用的系统DSN要用c:\windows\syswow64\odbcad32.exe 64 位 Windows 平台注意点之文件系统重定向 http://www.cnblogs.com/jiake/p/4981555.html 64 位 Windows 平台注意点之注册表重定向 http://www.cnblogs.com/jiake/p/4956218.html
请问一下,VS2010项目菜单,添加引用,这个菜单栏有什么作用 因为我的小电话控件没有在这里添加,而是在工具箱,右键 COM组件里添加上的,是不是二个地方同一个用处?
赵4老师 2017-06-29
  • 打赏
  • 举报
回复
在64位Windows下: 64位exe和dll在目录c:\windows\system32目录下; 32位exe和dll在目录c:\windows\syswow64目录下; 所以要注意: 在win64位系统下注册32位ocx或dll需要将32位ocx或dll拷贝到c:\windows\syswow64\目录下。 且注册要用c:\windows\syswow64\regsvr32 xxxxxxx.ocx或dll 在win64位系统下设置32位程序使用的数据库别名要用c:\windows\syswow64\cliconfg.exe 在win64位系统下设置32位程序使用的系统DSN要用c:\windows\syswow64\odbcad32.exe 64 位 Windows 平台注意点之文件系统重定向 http://www.cnblogs.com/jiake/p/4981555.html 64 位 Windows 平台注意点之注册表重定向 http://www.cnblogs.com/jiake/p/4956218.html
赵4老师 2017-06-29
  • 打赏
  • 举报
回复
仅供参考:
// Copyright (C) 1992-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Visual C++ Language  Reference and related
// electronic documentation provided with Microsoft Visual C++.
// See these sources for detailed information regarding the
// Microsoft Visual C++ product.

// NOTE: This example will only work with Excel8 in Office97
// Compile with cl /GX comexcel.cpp
// TO DO: Edit the #import paths
//#pragma message ("Make sure you go to Tools.Options.Directories and add the paths to mso97.dll and vbeext1.olb.  Mso97.dll will usually be in c:\\\"Program Files\"\\\"Microsoft Office\"\\Office, and vbeext1.olb will be in c:\\\"Program Files\"\\\"Common Files\"\\\"Microsoft Shared\"\\VBA")
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\Office11\\mso.dll" no_namespace rename("DocumentProperties", "DocumentPropertiesXL")
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\VBA6\\VBE6EXT.OLB" no_namespace
#import "C:\\Program Files\\Microsoft Office\\OFFICE11\\excel.exe" rename("DialogBox", "DialogBoxXL") rename("RGB", "RBGXL") rename("DocumentProperties", "DocumentPropertiesXL") no_dual_interfaces

#pragma warning (disable:4192 4146)

#include <stdio.h>
#include <tchar.h>

void dump_com_error(_com_error &e)
{
    _tprintf(_T("Oops - hit an error!\n"));
    _tprintf(_T("\a\tCode = %08lx\n"), e.Error());
    _tprintf(_T("\a\tCode meaning = %s\n"), e.ErrorMessage());
    _bstr_t bstrSource(e.Source());
    _bstr_t bstrDescription(e.Description());
    _tprintf(_T("\a\tSource = %s\n"), (LPCTSTR) bstrSource);
    _tprintf(_T("\a\tDescription = %s\n"), (LPCTSTR) bstrDescription);
}

// If this is placed in the scope of the smart pointers, they must be
// explicitly Release(d) before CoUninitialize() is called.  If any reference
// count is non-zero, a protection fault will occur.
struct StartOle
{
    StartOle() { CoInitialize(NULL); }
    ~StartOle() { CoUninitialize(); }
} _inst_StartOle;

void main()
{
    using namespace Excel;

    _ApplicationPtr pXL;

    try
    {
      pXL.CreateInstance(L"Excel.Application");

      pXL->Visible = VARIANT_TRUE;

      WorkbooksPtr pBooks = pXL->Workbooks;
      _WorkbookPtr pBook  = pBooks->Add((long)xlWorksheet);
      _WorksheetPtr pSheet = pXL->ActiveSheet;

      RangePtr pRange;
      pRange = pSheet->Range["A21"];
      pRange->Value2 = 75L;
      //pRange->NumberFormatLocal = "@";

      _CommandBarsPtr pCmdbars = pXL->CommandBars;
      int iCmdbars = pCmdbars->GetCount();

      Sleep(1000);
      pRange = pSheet->Range["20:20"];
      pRange->Insert( (long)Excel::xlDown );
      pRange->Merge();

      Sleep(1000);

      pBook->Saved = VARIANT_TRUE;
      pXL->Quit();
    }
    catch(_com_error &e)
    {
      dump_com_error(e);

      pXL->Quit();
    }
}


16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧