• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >vc/mfc > 各位路过的神仙关注一下:关于flexgrid控件?

各位路过的神仙关注一下:关于flexgrid控件?

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-04

佚名通过本文主要向大家介绍了c1flexgrid控件,c1flexgrid,c1flexgrid单元格背景,c1.win.c1flexgrid,c1.win.c1flexgrid.2等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 各位路过的神仙关注一下:关于flexgrid控件?
描述:

我在C*View的OnCreate()有如下代码:
int CGridView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
//-----------------------------------------------------------------------------------
CRect* rect = new CRect();
this->GetClientRect(rect);
m_pEditGrid->Create(NULL,WS_CHILD|WS_VISIBLE,*rect,this,IDC_EDIT_GRID);
delete rect;
OnUpdate(NULL,NULL,NULL);
return 0;
}
在装过VC 6.0 的机子上运行,出现一个2行2列的表格;在没有装VC 6.0 的机子上,当我注册过regsvr32 命令注册过MSFLXGRD.OCX控件后(系统提示注册成功),依然什么都没有显示,各路神仙指点一下小弟,是何原因? 谢谢先!


解决方案1:

未安装VC使用activeX控件- -Tag: 串口控件    注册                                           
在使用串口控件时,在没有装VC的机器上碰到问题
regsvr32 注册成功,但仍然不能使用,经查找是LicenseKey的问题
只需在创建控件时增加下列几行即可
WCHAR pwchLicenseKey[] =
  {
    0x0043,  0x006F,  0x0070,  0x0079,  0x0072,  0x0069,
    0x0067,  0x0068,  0x0074,  0x0020,  0x0028,  0x0063,
    0x0029,  0x0020,  0x0031,  0x0039,  0x0039,  0x0034,
    0x0020
  }; 
 BSTR bstrLicense = ::SysAllocStringLen(pwchLicenseKey,
       sizeof(pwchLicenseKey)/sizeof(WCHAR));
 if(!m_ComPort.Create(NULL,0,CRect(0,0,0,0),AfxGetMainWnd(),
                IDC_MSCOMM1,NULL,FALSE,bstrLicense))
  {
    AfxMessageBox("Failed to create OLE Communications Control\n");
   return -1;  //fail to create 
 }
......
::SysFreeString(bstrLicense);
具体参考原文见下:
-----------------------------------------------------------------------------------------------------
This article was previously published under Q151771 
SUMMARYThe LicReqst sample illustrates how to use the IClassFactory2 interface to request an object's License key. 
The following file is available for download from the Microsoft Download Center:
Licreqst.exe
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 
119591 How to Obtain Microsoft Support Files from Online Services 
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. NOTE: Use the -d option when running Licrqst.exe to decompress the file and recreate the proper directory structure. 
MORE INFORMATIONThe LicReqst sample is a dialog-based MFC application that illustrates how to use the IClassFactory2 interface to request an object's License key. LicReqst displays the ProgID of each of the currently registered ActiveX controls in a Listbox. When one of the displayed ProgID's is selected, an instance of the corresponding control is created and then asked for it's License key. If a valid key is returned, LicReqst displays the key and enables the "Copy to Clipboard" button that allows the License key to be copied to the Clipboard. The License key can then easily be pasted into code that uses the CWnd::CreateControl method to dynamically create an instance of the Control. 
LicReqst creates a textual version of the License key data in the form of a declaration of an array of WCHAR when copying the key to the Clipboard. This is done because the License key data could contain non-printable characters. A human-readable version of the License key data is also provided for reference and is included inside a Comment block in the final string that is copied to the Clipboard. 
For example, if an object uses the string "Copyright (c) 1994" (without the quotes) for its License key, LicReqst would generate the following block of text that could be copied to and pasted from the Clipboard: 
  /*
  Copyright (c) 1994
  */ 
  WCHAR pwchLicenseKey[] =
  {
    0x0043,  0x006F,  0x0070,  0x0079,  0x0072,  0x0069,
    0x0067,  0x0068,  0x0074,  0x0020,  0x0028,  0x0063,
    0x0029,  0x0020,  0x0031,  0x0039,  0x0039,  0x0034,
    0x0020
  }; 
You can use the previous block of text in code that creates an instance of the Licensed object, and you can use the pwchLicenseKey variable to specify the object's License key. 
For example, if MFC code is dynamically creating an instance of a Licensed ActiveX Control using the Create method of a Visual C++&nbs

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 各位路过的神仙关注一下:关于flexgrid控件?

相关文章

  • 2017-06-05 容器中调用GetExtent获得控件的大小不正确
  • 2017-06-04 IWebBrowser2疑惑请指教
  • 2017-06-04 ATL菜鸟问题
  • 2017-06-04 vs2008中使用ADO连接数据库SQLsever2005时出现问题,希望大家能够帮助解决
  • 2017-06-05 VC6创建一个ATL项目,没有找到Com要求的各个接口啊?
  • 2017-06-05 请大侠们给我看看钩子取得的窗口标题乱码是怎么回事
  • 2017-06-04 如何获取一个activex控件的属性和方法,我只知道控件的progid!
  • 2017-06-04 使用setparent的奇怪问题
  • 2017-06-04 救命为什么编译"生成MFC的dll项目"提示类型SC_HANDLE没定义?
  • 2017-06-05 询问进程间通信atl对象接口如何衔接?

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 一个关于使用IActiveDesktop的问题
    • 在任务管理器中,关闭进程时,如何关闭程序中存在的对象句柄?请看正文
    • 远线程的问题
    • 如何在vc中实现数据库中的音频数据的播放
    • 控件debug出错信息
    • 相当有难度的问题,期待能人解决
    • 求VC6操作WPS电子表格源代码
    • 我有一个VC的插件VisualAssistX1011031是注册版的但不知道怎么注册?
    • vc6oleword2003导入mswordolb竟然没有commandbars类?如果操作菜单呀?
    • 求DirectX90bSDK下载地址!!!

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有