|
|
An enhanced DIBLOOK sample |
|
简 介:
This article describes a sample with the same funcionality as the known DIBLOOK MFC sample, but enhanced in some ways. The main (new) features of this new sample are:
The sample is now completely object oriented, there are no global functions
The standard file open dialog has been changed to a new (derived from standard) file dialog with preview
The palette treatment has been improved so the palette is not realized twice for the active image (the first in foregroud the second in background)
一个增强的DIBLOOK例子
这篇文章描述了具有我们已知的DIBLOOK MFC实例同样功能的一个例子。 其主要(新的)特征是:
例子完全地面向对象,没有全局函数。
打开对话框的标准文件已经改变为一个新的(从标准的继承)拥有预览的文件对话框。
调色板处理已经被改进,因为调色板不能为动态的图像实现两次(一次为前景,一次为背景)
来源: http://www.codeguru.com/bitmap/enh_diblook.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
ADO Data Bound Class Wizard |
|
简 介:
If you need a descendent class of CADORecordBinding to bind the member variables to columns in the database table, ADO Data Bound Class Wizard is a good program for you.
绑定ADO数据的类向导
如果你想要一个降序的CADORecordBinding类来将列的成员变量绑定到数据库的表中,那么绑定ADO数据的类向导对你来说将是一个好帮手。
来源: http://www.codeguru.com/mfc_database/ADORsWizard.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Toolbar with 16M colour images |
|
简 介:
At first, create your toolbar in Developer Studio - no matter what do you draw on buttons. Make a hi-color bitmap with a bitmap-editor (for example Paint Shop Pro). This new bitmap must be the same size as Toolbar.bmp in your project's \res folder. Then import the resource into your application as bitmap, name it IDB_TOOLBARHI. Here's what you must to do:
Make a CBitmap type global variable m_bmToolbarHi in your CMainFrame class
Include these lines in the function CMainFrame::OnCreate() after initializing the toolbar:
拥有16M彩色图片的工具栏
首先,在开发平台上创建你的工具栏-不管你作了什么样的按钮。
用图片编辑器创建一个高色调的彩色图片。这个新的图片必须和你工程中的工具栏一样大小。然后把资源作为位图引进到你的应用中,并把它命名为IDB_TOOLBARHI。这就是你必须要做的。
在你的CMainFrame类中定义一个CBitmap类型的全局变量m_bmToolbarHi。在初始化工具栏时,把这几行加入到函数CMainFrame::OnCreate()中。
来源: http://www.codeguru.com/toolbar/ToolbarHi.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Transparent Bitmap - True Mask Method |
|
简 介:
This code shows you how to draw a transparent bitmap using memory rather than directly using the screen. This is important as intensive bitmap operations are slow due to the number of bits that are affected, and using the screen makes things even worse; some flicker results. The visual flickering can be eliminated by using memory bitmaps:
Transparent Bitmap - True Mask Method
透明的位图 - 真正的Mask 方法
这段密码告诉你如何使用内存而不是直接使用荧屏来画一个位图。由于位图的位的数量而使位图操作速度变慢的时候,这很重要,而使用荧屏会更糟糕;会造成一些闪动的结果。视觉的闪动可以通过使用内存位图解决:
来源: http://www.codeguru.com/bitmap/CISBitmap.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
p2 Pass Scaling using Filters |
|
简 介:
Unlike traditional scaling of images, where every n'th pixel is sampled and copied to the result image, this template provides much more accurate image scaling features.
It takes a buffer of RGB values (as COLORREFs) and creates another buffer with new dimensions. The input / output buffers are sequential pixels (not compressed) compatible with the format used in 24-bit DIBs.
The template is instantiated with a specific filter. The filter determines the quality of the output image. Different basic filters are supplied with this template and additional filters can be easily added.
在传统的图像缩放中,每次对第n个像素采样,再复制到结果图像中。这个模板提供了许多更精确的图像缩放功能。
它用缓存来保存RGB值(作为COLORREFs),使用新的参数创建另一个缓存。输入/输出缓存是作为顺序像素(不经过压缩),和24位的DIB图像兼容。
模板使用一个专门的过滤器来初始化。过滤器决定了输出图像的品质。这个模板提供了不同的过滤器,也可以方便地增加其它过滤器。
来源: http://www.codeguru.com/bitmap/2_pass_scale.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Interactive SQL Tool (using ADO) |
|
简 介:
Interactive SQL (using ADO) is a query tool that allows you to query OLE DB data sources, author SQL scripts and queries, return query results to a grid or text, retrieve provider properties, execute multiple SQL scripts or stored procedures simultaneously, retrieve multiple query result sets (depends on the data source), etc.
交互式SQL工具(使用ADO)
交互式SQL是一个查询工具,它允许你查询OLE DB 数据源,SQL脚本和查询 , 将查询结果返回到一个网格中或文本框中,检索提供者属性,同时执行多SQL脚本和存储过程,检索多重查询集(依靠数据源) 等。
来源: http://www.codeguru.com/mfc_database/QTADO.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Hiding the Flat Toolbar Separators |
|
简 介:
have been taking part in a project for the last two years. At first we were using Microsoft Visual C++ 5.0. I placed some controls into our toolbars using well-known method by using a toolbar separator. You could get more info about that at http://www.codeguru.com/toolbar/ctrls_in_tb.shtml. Changing Visual C++ version from 5.0 to 6.0 I gave our toolbars the TBSTYLE_FLAT style.
隐藏扁平的工具栏分隔符
我在过去的两年中参加了一个项目。开始我们使用Microsoft Visual C++ 5.0.。我通过使用非常著名的工具栏分隔符法在我的工具栏中放置了一些控件。你可以在http://www.codeguru.com/toolbar/ctrls_in_tb.shtml中获得更多的信息。Visual C++的版本从5.0 到了 6.0,我给了我的工具栏TBSTYLE_FLAT的样式。
来源: http://www.codeguru.com/toolbar/HiddenToolBarSeparatorDemo.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Smart resize for monochrome bitmaps |
|
简 介:
If we make a monochrome bitmap smaller by a simple pixel resampling the resulting image looks lousy (pic.2). The problem here is that we take a stand-alone pixel and disregard its surrounding. We can improve the picture a little bit by calculating the value of a pixel as the average of the pixels we disregard and then rounding this value to the nearest color.
小巧的单色的位图
如果我们通过少量像素创建一个单色位图,那么结果是这个位图看起来效果很差(pic.2)。这里的问题是我们只考虑这些图素而忽视它的环境。我们可以计算像素的值,然后得出我们所忽视的像素的平均值,然后通过这个值对最近的颜色进行圆化这种方法来使图片效果好一些。
来源: http://www.codeguru.com/bitmap/smartresize.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
High quality image rotation (rotate by s |
|
简 介:
Unlike traditional rotation of images, where every n'th pixel is sampled and copied to the result image, this template provides much more accurate image rotation features (weighing the pixels).
高质量图像旋转
不像传统的图像旋转--每个像素都被抽样并被复制到结果图像, 这个模板提供更加精密的图像旋转特性。
来源: http://www.codeguru.com/bitmap/RotateByShear.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Using a Virtual CListView with a Dynaset |
|
简 介:
This example illustrates how to use an Access database file with an IE 4.0 virtual list view.
通过Dynaset使用虚拟类CListView
这一个例子说明该如何通过IE 4.0 虚拟列表访问数据库文件。
来源: http://www.codeguru.com/mfc_database/virtual_dblist.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
|
|
|