|
|
|
|
Standard file open dialog with preview |
   |
简 介:
The template for the dialog is a normal developer studio dialog template. Note however, the use of the stc32 static control. As it hasn't any text in it, it is invisible unless you select it. This static control will serve as a place holder for the standard file dialog controls, thus establishing the position of the newly added controls in respect to the standards. If there is no stc32 control specified in the template, all the new controls will be placed below the standard controls.
这是一个带有预览功能的标准文件打开对话框。对话框模板是一个普通的 developer studio 对话框模板。然而,它使用了stc32 static 控件。因为其上没有任何文本,除非你选择它,否则它是不可见的。这个 static 控件将作为标准文件对话框的一个占位控件,这样为新增加的控件预留了位置。如果在模板中没有stc32 控件,所有新增加的控件将位于标准控件的下面。
来源: https://www.codeguru.com/dialog/bitmap_preview_dialog.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
A Smart Pointer Class for Subclass Point |
   |
简 介:
The SmartPtr class by Stefan Tchekanov works nicely for homogenous class objects but it does not allow assignment between base and derived class pointers. I am presenting here a simple template class that performs reference counting garbage collection and supports subclass pointers.
由 Stefan Tchekanov 提供的SmartPtr 类可以很好地用于同构类对象,但它不支持基类和派生类指针间的赋值。我在这里提供一个简单的模板类,它执行引用计数垃圾回收功能,支持子类指针。
来源: https://www.codeguru.com/cpp_mfc/pointer.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Fading Ticker for IE |
   |
简 介:
This JavaScript is a Fading Ticker for IE
这个 JavaScript 是为IE提供的一个渐变的Ticker。
来源: https://java.ittoolbox.com/code/d.asp?d=1951&a=s |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Simple ADO Database Read, Insert, Update |
   |
简 介:
Accessing databases is a common part of most applications and with the introduction of C# and ADO.NET, has become quite simple. This article will demonstrate the four most basic database operations.
访问数据库是大多数应用程序的常用操作,使用 C# and ADO.NET,这一操作会变得很简单。这个项目演示了四种最基本的数据库操作。
来源: https://www.codeguru.com/cs_data/SimpleDbReadWrite.html |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Transparent Dialog |
   |
简 介:
Ok. Every window has a Region. This is how Windows knows what area of the screen to draw on when something changes in your program. Normally a windows Region is square, but you can make one that is non-square (basically any shape you want) so that Windows will only draw the part of your window that is within the non-square Region. What I have done is scan through the window pixel by pixel looking for the color I want to make transparent. Everytime I find that color, I add it to a temporary Region. I collect all the transparent spaces, then invert it and assign it to the window. The CRgn class, as it turns out, it a very powerful little class.
每个窗口都有一个区域。这就是Windows知道当应用程序变化时应该在屏幕的什么地方绘制窗口。通常一个Windows区域是矩形的,但可以生成非矩形窗口(基本上可以是任意窗口),这样Windows将只绘制非矩形区域中的一部分。我所希望的是按像素扫描窗口以查找需要设置为透明的颜色。一旦找到这一颜色,我将相应的像素增加到一个临时区域中。我收集所有的透明区域,反转它,并将它分配给窗口。CRgn 是一个功能强大的类。
来源: https://www.codeguru.com/dialog/transparent_dialog.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Function Pointers to Non-Static Object M |
   |
简 介:
The code I have included is a holder class that takes a pointer to an object and a pointer to a method.   Either can be changed at any time. During the lifetime of the holder class object, a helper method can be called that calls the stored method pointer.  
我在这里提供的是一个容器类,它接收一个指向对象的指针和一个指向一个方法的指针。可以随意改变任何一个参数。在窗口对象的生命期内,可以调用一个helper 方法来调用保存的方法指针。
来源: https://www.codeguru.com/cpp_mfc/methodpointers.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Infix to Postfix |
   |
简 介:
This is the JavaScript Implementation of converting an Infix(Inorder) expression to Postfix(Postorder) expression.
Infix to Postfix这个 JavaScript 可以实现将中序表达式转换为后序表达式。
来源: https://java.ittoolbox.com/code/d.asp?d=1972&a=s |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Introduction to Maintaining User-Specifi |
   |
简 介:
The .NET framework provides a very useful feature that allows an application to store and retrieve data on a per-user basis. This new Isolated Storage mechanism replaces the previous methods of storing such data in Windows .ini files and the system Registry. Isolated Storage allows applications to save user-specific data into a unique location determined via the user and assembly identities. This effectively eliminates storage conflicts and provides the developer with a completely transparent and reliable storage location.
.NET 框架提供了一个非常有用的功能,可以让一个应用程序在每-用户的基础上保存和检索数据。这种新的分离存储机制取代了以前在 Windows .ini文件和注册表中存储数据的方法。分离存储可以让应用程序保存特定用户的数据到一个唯一的由用户和汇编身份决定的位置中。这样就有效地消除了存储冲突,为开发人员提供了一个完全透明的和可靠的存储空间。
来源: https://www.codeguru.com/cs_data/IsolatedStorage.html |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Subselection Dialog |
   |
简 介:
Often when the user can select some items from a predefined set and has to sort them at the same time, a dialog similar to the one above is used. For instance for selecting a set of fields for a database access or for exporting to a file.
The CSubSelectionDlg is derived from CDialog and can be used as a base for your own class. The included sample gives you a sample whith all the possibilities (CMySelectionDlg). You can create your own dialog template, but it needs (at least) two CListBoxes.
用户经常需要从一个预定义的集合中选择元素,并同时排序,使用一个类似的对话框来完成以上功能。例如为一个数据库访问选择一套字段,以导出到一个文件。
CSubSelectionDlg 类派生自 CDialog ,可以用于你自己的基类。包括了例子演示了所有的可能情况 (CMySelectionDlg)。可以创建自己的对话框模板,但它(至少)需要两个CListBoxes.
来源: https://www.codeguru.com/dialog/subselectiondlg.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
Observer Pattern Class |
   |
简 介:
The class CObserver is a base class from which you can derive both observer and subject classes. An 'observer' object is one whose internal state depends upon the internal state of one or more other objects. The objects that it depends on are referred to as 'subjects'. The class interface is very simple, having only a few inline functions, one of which is virtual and can be overridden to implement the update function. In spite of its simplicity, it can be used in very powerful ways to keep track of value dependencies and only update values when they are needed and only those values that need updating.
CObserver 是一个基类,从它可以派生观察器(observer)和主题 (subject)类。 'observer'对象的内部状态依赖一个或多个其它对象的内部状态。依赖的对象称为'subjects'。类接口是非常简单的,只有几个内联函数,其中一个是虚拟函数,可以重载来实现更新函数。虽然它简单,但其强大的功能可以用于跟踪值的依赖关系,只在需要的时候更新值,以及只更新需要更新的值。
来源: https://www.codeguru.com/cpp_mfc/virzi_observer.shtml |
分 类:
|
许可证:
GNU General Public License (GPL) |
|
|
|
|
|