|
|
Visual Component Framework - Libraries a |
   |
简 介:
The Visual Component Framework was inspired by the ease of use of environments like NeXTStep's Interface Builder, Java IDE's like JBuilder, Visual J++, and Borland's Delphi and C++ Builder.
可视化控件Framework从像NeXTStep的Interface Builder,Java IDE的JBuilder,Visual J++,和 Borland的Delphi以及和C++ Builder的简单易用中得到灵感的。
来源: http://www.codeguru.com/advancedui/vcf.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
ODBC Dynamic Connection |
   |
简 介:
Many times it is neccessary to access databases without knowing the scheme of the database at design time.
Think that you are developing an application that supports ISE (Incremental Search and Edit) for a certain purpose.
The application reads a column of a database table to determine if there is any match to the letters that are allready typed in
a combo box. If it finds any then it displays the nearest one in the edit part of the combo.
When you do not know from where to get the information that should be displayed,or when the the source column
is being changed from time to time, the only solution is to bound your data columns at run time.
Of course you can also hard code the names of the columns, but you do not come far that way.
To solve a similar problem I developed a database connection class that can access any ODBC-database by using its DSN.
The CDBConnection is a class that takes care of all access to a database, regardless of the purpose. When it needs to fetch data
it uses Microsofts CDynamicBulkSet, and when it needs to edit data ( New, Update or Delete ) it uses CDynamicRow.
I used the CDynamicBulkSet here just to show several ways of accessing data dynamiclly and not at least to show also how to use multiple row fetch.
许多时候在不知道数据库设计时的方案的情况下也必须能够访问数据库。
考虑到你正在开发为某一特定目的支持ISE(逐渐增加的搜寻和编辑) 的应用程序。
应用程序读一个数据库表中的一列来决定是否有与已经敲入组合框中的字段相符合的记录。如果它发现了任何的一个,它将最近的一个显示在组合框中。
当你不知道该从哪里获得应该被显示的信息时候, 或当源列随时都在改变时,唯一的解决方法是在运行时绑定你的数据列。
Of course you can also hard code the names of the columns, but you do not come far that way.
为了解决同样的问题,我开发了一个数据库连接类,它可以通过使用数据库的DSN访问任何的ODBC数据库。
CDBConnection是一个负责数据库的所有连接的类而不管其目的。 当它需要取数据的时候
它使用微软的CDynamicBulkSet,当它需要编辑(新建,修改,删除
)时它使用 CDynamicRow。我使用CDynamicBulkSet只是为了展示动态存取数据几种方法而不是展示怎样获取多行数据。
来源: http://www.codeguru.com/mfc_database/DynData.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Writing Scribble with the Visual Compone |
   |
简 介:
The last article I wrote introduced some of the basic concepts of the Visual Component Framework.In this article we'll see that all of the stuff is actually there for a reason ! As I know you are all breathless with anticipation, and in fact due to the millions of letters of fan mail, and the hundreds of thousands of adoring fans out there, let's dive right in !!!
Writing Scribble with the Visual Component Framework (VCF)
我写的最后一篇文章介绍了可视化框架的一些基本概念。在这篇文章中,我们将会明白所有的东西放在那儿是有理由的! 当我得知你对预期的工作和爱好者成千上万的邮件而感到喘不过气来的时候,让我们一起投入进去吧!!!
来源: http://www.codeguru.com/advancedui/vcfScribble.html |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
QueryDef - a complete implementation of |
   |
简 介:
This article tries to explain the class library QueryDef intended to be used instead of the classic MFC class CRecordset. CRecordset is a great class with one single exception. You have to generate/write too much code. In a project I was involved there were over 700 recordsets defined. Soon working with CRecordset became a real hassle. I wanted a simpler method to access the data from an ODBC data source.
ADO is AOK (简单的ADO教程)
QueryDef- 动态recordset一个完全的实施
这篇文章试着解释QueryDef类库的使用,而不是经典的MFC类库CRecordset。CRecordset是只有一个异常的一个很棒的类。你必须生成/编写太多代码。在一个工程中,我编写了超过700记录集。很快使用CRecordset的工作变成一个的麻烦。我想要一个更简单的方法存取来自一个ODBC数据源的数据。
来源: http://www.codeguru.com/mfc_database/querydef.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
List Control - Enhanced list control |
   |
简 介:
This is an enhanced version of the list control; it include some features from other Codeguru's articles. I would especially name Zafir's articles and Sam Fugarino's (his article enlightened me about database & list controls). However, a lot of code comes from other people, too much to be all named here. So please don't say I stole code! I put it here and everybody can take what needed from it.
List Control - Enhanced list control
这是一个增强版本的列表控件;它包括来自其他的 Codeguru的文章一些特征。 我会以Zafir和Sam Fugarino的文章命名(他们的文章在有关数据库和目录控制方面启发了我)。然而,大量的代码来自其它的人, 人数太多在这里不能一一列举。因此的请不要说我盗用了这些代码! 我把它放在这里,每个人都可以使用它。
来源: http://www.codeguru.com/advancedui/gfxlist.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
ADO is AOK (a simple ADO tutorial) |
   |
简 介:
We are all familiar with the CDatabase classes, and the CDaoDatabase classes. They are relitivly simple to use, they mesh well with our applicaiton and they are easily distributed. Using something like the GenericRecordset class (found here ar code guru) makes it even easier to create powerful database aplication with little effort on your part.
Now just as you felt safe to start doing database development in C++, Microsoft pushes something called UDA (Universal Data Access) and a relitivly simple but mostly undocumented object called ADO (ActiveX Data Object). Unfortunatly they felt that there is little need to show any kind of documentation for us Visual C developers. If you try to search around you will be hard pressed to find any good examples. Even here at code guru there is only 1 other article about ADO.
So after several months of playing around with ADO, I finally feel good about it, and will probably never use anything but ADO for all huturd development. When you see how easy it is to use ADO, and how powerfull it is (can we say thread safe?) you will probably never go back either. When I wrote the GenericRecordset for DAO, it was to provide a simple way to use dynamic data binding. That is, to allow me to base a recordset on a query rather than a table. One of the things I liked about ADO from the start was that this, dynamic data binding, is the default way ADO works.
ADO is AOK(简单的ADO教程)
我们都熟悉CDatabase类和CDaoDatabase类。他们使用简单,在我们的应用中他们耦合的很好,并且他们能后很容易的分开处理。 GenericRecordset类的使用是你更加容易的创建功能强大的数据库应用。
Now just as you felt safe to start doing database development in C++, Microsoft pushes something called UDA (Universal Data Access) and a relitivly simple but mostly undocumented object called ADO (ActiveX Data Object).不幸的是他们认为没有必要为我们这些Visual C 的开发者提供任何类型的文档。如果你试图搜寻,你将会发现很难找到任何的好例子。即使是在这里--code guru也只有1篇关于ADO的文章。 当我为DAO写了GenericRecordset的时候,它要提供一个简单的使用动态数据绑定的方法。就是允许我基于一个查询的记录集,而不是基于一个表的记录集。从一开始我喜欢ADO的原因时动态的数据绑定,这也是ADO默认的工作方式。
来源: http://www.codeguru.com/mfc_database/Ado_Aok.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Information Bar |
   |
简 介:
This bar is similar to the Outlook, Outlook express, or Front Page 98 editor. It is useful to display application specific information with text and bitmaps. You can change dynamically
信息栏和Outlook,Outlook express或Front Page 98编辑器上的相似。用它来通过本文和位图显示应用程序的特性信息非常实用。你能动态地改变它
来源: http://www.codeguru.com/advancedui/infobar.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Exploring the Internal Structure of a 24 |
   |
简 介:
A bitmap file consists of four different parts. The first structure is the BITMAPFILEHEADER structure. You can check the Visual Studio\'s Help file for this structure:
typedef struct tagBITMAPFILEHEADER {
  WORD     bfType;
  DWORD   bfSize;
  WORD     bfReserved1;
  WORD     bfReserved2;
  DWORD   bfOffBits;  
} BITMAPFILEHEADER, *PBITMAPFILEHEADER;
24位无压缩位图文件内部结构的探究
一个位图文件由四个不同的部分组成。第一部分是 BITMAPFILEHEADER结构。你可以在Visual Studio的 帮忙文件中获得这个结构:
typedef struct tagBITMAPFILEHEADER {
  WORD     bfType;
  DWORD   bfSize;
  WORD     bfReserved1;
  WORD     bfReserved2;
  DWORD   bfOffBits;  
} BITMAPFILEHEADER, *PBITMAPFILEHEADER;
来源: http://www.codeguru.com/bitmap/BitmapLoad.html |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Data Replication Prototype Using ADO |
   |
简 介:
Here is a version of a data replication prototyping attempt made almost seven years ago. Some parts of it might still be of interest. Initially, it used a proprietary library built on top of ODBC, but it can be easily modified to use any database interfacing layer. A demo application is drafted using ADO and the Nwind.mdb MS Access sample that comes with the MSDEV distributive.
This prototype engine uses real or artificially assigned unique indices of inter-database meaning to identify records. Auto-Numbers or Counters are handled properly during the insertion of records. The replication plan is built by initializing collections of replication entry or link descriptors in the replicator class's Init method. See DemoCopyHelper.cpp for an example.
使用ADO的数据复制原型
这是一个几乎在七年前我试图做的数据复制原型。它的一些部份可能仍然很有趣。最初,它使用了一个建造在ODBC上的的专有库,但是它可被容易地修改以使用任何的数据库接口层。 演示例子使用ADO和MSDEV 中自带 Nwind.mdb MS Access数据库。
这个原型引擎使用一个实际的或者人工制定的唯一的数据库内索引来标识一个记录。 在插入记录时可以正确处理Auto-Number或Counter数据类型。通过初始化复制条目集合或复制器类的Init方法中的链接描述符来执行复制计划。参考DemoCopyHelper.cpp这个例子.
来源: http://www.codeguru.com/mfc_database/etl.html |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Independent Message Handlers in Window M |
   |
简 介:
The Article consists of two parts. The Part 1 contains an example of CFrameBounder which guards the size of window and doesn't allow to exceed it's maximal and minimal sizes. In the implementation of CFrameBounder the special approach was used. This approach of Independent Message Handlers (IMH) is described in Part 2 of the article.
窗口消息处理中的独立消息处理
文章由两部份组成。第一部份包含一个CFrameBounder的例子,它控制着窗口的大小并且不允许超过它的最大和最小值。CFrameBounder的运行过程中使用了一个特别的方法。这个方法就是独立的消息处理(IMH),在文章的第2部分作了描述。
来源: http://www.codeguru.com/advancedui/Imh.html |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
|
|
|