iczelion tut24 (转)
iczelion tut24 (转)[@more@]Tutorial 24: windows Hooks We will learn about Windows hooks in this tutorial. Windows hooks are very powerful. With them, you can poke inside other processes and sometimes alter their behaviors. DOWNLOAD the example here. Theory:Windows hooks can be considered one of the most powerful features of Windows. With them, you can trap events that will occur, either in your own process or in other processes. By "hooking", you tell Windows about a function, filter functi
iczelion tut25 (转)
iczelion tut25 (转)[@more@]Tutorial 25: Simple Bitmap In this tutorial, we will learn how to use bitmap in our program. To be exact, we will learn how to display a bitmap in the client area of our window. DOWNLOAD the example. TheoryBitmaps can be thought of as pictures stored in computer. There are many picture formats used with computers but windows only natively supports Windows Bitmap Graphics files (.bmp). The bitmaps I'll refer to in this tutorial are Windows bitmap graphics files. Th
iczelion tut23 (转)
iczelion tut23 (转)[@more@]Tutorial 23: Tray Icon In this tutorial, we will learn how to put icons into system tray and how to create/use a popup menu. DOWNLOAD the example here. Theory:System tray is the rectangular region in the taskbar where several icons reside. Normally, you'll see at least a digital clock in it. You can also put icons in the system tray too. Below are the steps you have to perfoRM to put an icon into the system tray: Fill a NOTIFYICONDATA structure which has the f
iczelion tut22 (转)
iczelion tut22 (转)[@more@]Tutorial 22: Superclassing In this tutorial, we will learn about superclassing, what it is and what it is for. You will also learn how to provide Tab key navigation to the controls in your own window. DOWNLOAD the example here Theory:In your programming career, you will surely encounter a situation where you need several controls with *slightly* different behavior. For example, you may need 10 edit controls which accept only number. There are several ways to achie
iczelion tut21 (转)
iczelion tut21 (转)[@more@] Tutorial 21: Pipe In this tutorial, we will explore pipe, what it is and what we can use it for. To make it more interesting, I throw in the technique on how to change the background and text color of an edit control. DOWNLOAD the example here. Theory:Pipe is a communication conduit or pathway with two ends. You can use pipe to Exchange the data between two different processes, or within the same process. It's like a walkie-talkie. You give the other party one s
iczelion tut20 (转)
iczelion tut20 (转)[@more@]Tutorial 20: Window Subclassing In this tutorial, we will learn about window subclassing, what it is and how to use it to your advantage. DOWNLOAD the example here. Theory:If you program in windows for some time, you will find some cases where a window has nearly the attributes you need in your program but not quite. Have you encountered a situation where you want some special kind of edit control that can filter out some unwanted text? The straightforward thing t
iczelion tut17 (转)
iczelion tut17 (转)[@more@]Tutorial 17: Dynamic Link Libraries In this tutorial, we will learn about DLLs , what are they and how to create them. You can DOWNLOAD the example here. Theory:If you program long enough, you'll find that the programs you wrote usually have some code routines in common. It's such a waste of time to rewrite them everytime you start coding new programs. Back in the old days of DOS, programmers store those commonly used routines in one or more libraries. When
iczelion tut18 (转)
iczelion tut18 (转)[@more@]Tutorial 18: Common Controls We will learn what common controls are and how to use them. This tutorial will be a quick introduction to them only. DOWNLOAD the example source code here. Theory:windows 95 comes with several user-interface enhancements over Windows 3.1x. They make the GUI richer. Several of them are in widely used before Windows 95 hit the shelf, such as status bar, toolbars etc. Programmers have to code them themselves. Now microsoft has included th
iczelion tut16 (转)
iczelion tut16 (转)[@more@]Tutorial 16: Event object We will learn what an event object is and how to use it in a multithreaded program. DOWNLOAD the example here. Theory:From the previous tutorial, I demonstrated how threads communicate with a custom window message. I left out two other methods: global variable and event object. We will use both of them in this tutorial. An event object is like a switch: it has only two states: on or off. When an event object is turned on, it's in the "s
iczelion tut14 (转)
iczelion tut14 (转)[@more@]We will learn what a process is and how to create and teRminate it. DOWNLOAD the example here. Preliminary:What is a process? I quote this definition from win32 api reference: "A process is an executing application that consists of a private virtual address space, code, data, and other operating system resources, such as files, pipes, and synchronization objects that are visible to the process."As you can see from the definition above, a process "owns" several ob
iczelion tut15 (转)
iczelion tut15 (转)[@more@]Tutorial 15: Multithreading Programming We will learn how to create a multithreading program in this tutorial. We also study the communication methods between the threads. DOWNLOAD the example here. Theory:In previous tutorial, you learn the a process consists of at least one thread: the primary thread. A thread is a chain of execution. You can also create additional threads in your program. You can view multithreading as multitasking within one program. In teRM
自绘菜单的实现 (转)
自绘菜单的实现 (转)[@more@]自绘菜单的实现 闻怡洋译 在这里提供一个C++类(CCustomMenu),该类是CMenu的子类,并且拥有自绘能力。它可以向你提供以下的功能: 设置字体颜色。 设置高亮度颜色。 设置高亮度时的风格。 设置选中时和在普通状态下的菜单显示的图标。 设置显示图标大小。 在CCustomMenu中定义了结构MENUDATA,你必须根据你的需要填充该结构,并且在增加菜单时提供该结构的指针(调用AppendMenu,InsertMenu)。下面是一个例子: 1、定义CCustomMenu的实例,和MENUDATA结构变量。 CCustomMenu m_cCustomMenu; M
一种专家数据库的开发与实现 (转)
一种专家数据库的开发与实现 (转)[@more@]一种专家数据库的开发与实现 齐玉东 李逸波 传统数据库系统缺乏知识,只能处理静态数据;而专家系统的狭窄应用领域及不能访问现存数据库,又防碍了专家系统的有效应用。数据库和人工智能这两个领域单独发展的局限性,促使了两者取长补短, 共同发展。这就是专家数据库EDS(Expert Database Syst em)产生和发展的原因。通常,我们把既具有数据库管理功能及演绎能力、又提供专家系统中若干良好性能的数据库系统,称为专家数据库。EDS的基本思想是把以知识表达和知识处理为主的专家系统ES(Expert System )技
VB与VC混合编程中处理消息的方法 (转)
VB与VC混合编程中处理消息的方法 (转)[@more@]VB与VC混合编程中处理消息的方法 现在越来越多的人采用VB与VC的混合编程:用VB快速开发出漂亮的界面以及外围处理程序,再用VC编写底层的各种操作,例如内存的操作、IO端口的操作等,VC中还可以嵌入汇编语言进行更底层的操作。 一般的做法是将VC程序编译成DLL,在VB中用Declare语句声明DLL中的函数,例如: Declare Function SendCommand Lib ″c:program filesdevstudiowjfprojectsHr0506dllMnsrdebugHr0506dllMnsr.dll″(CmdNum As Integer) As Boolean 声明以后,函数SendComma
VC实现对话框上信息的显示 (转)
VC实现对话框上信息的显示 (转)[@more@]VC实现对话框上信息的显示 利用 VC的AppWizard,可以很容易地实现工具条和菜单项的ToolTip,或在状态条上显示帮助信息,但要在对话框的控件上显示ToolTip和在状态条上显示控件信息并不容易实现。现在,我们用VC中的WM_SETCURSOR 与TTN_NEEDTEXT消息就可达到目的。具体操作如下: 一、利用 VC的 MFC AppWizard 生成一个 SDI 或 MDI 的应用程序 二、编辑对话框控件的字符串资源 例如:IDC_dbBUTTON1 = “This is 肖天鹏的第一自制按钮n天鹏", 其中字符串“This is肖天鹏的第
VC++中STL的使用 (转)
VC++中STL的使用 (转)[@more@]Visaul C++作为一种优秀的编程工具,已越来越受到广大程序员的喜爱, 本人使用C&C++已有相当长的时间,发现C++语言博大精深,现只举一简单的例子: ---- 各位在编程中一定用过链表之类的数据结构,是否是自己重写整个代码? ---- 还是使用现成的模版?其实,Visual C++提供了非常好的STL供大家使用, 以链表为例: map>m_string ; 使用上面语句即构建了 一个如下结构的链表: typedef struct List { string name; string value ; List next ; }LIST ; map 的主要操作有insert ,find,end等功
VC++环境下菜单和工具栏的动态修改技术 (转)
VC++环境下菜单和工具栏的动态修改技术 (转)[@more@]VC++环境下菜单和工具栏的动态修改技术 Visual C++是一种可视化很强的编程工具,其内置的向导AppWizard可以自动生成程序的基本框架,减少了大量程序开发基本工作。比如利用的AppWizard可以自动为应用程序生成菜单和工具栏,非常方便。如果是编写一般的应用程序,完 全可以在其提供的菜单和工具栏上进行修改,添加或删除菜单项。但在实际使用中,如果遇上些比较复杂的程序,仅用系统提供的菜单和工具栏是远远不够的。应用程序应该可以按照用户的不同状态,显示不同菜单项和工具栏
Windows95的设备驱动程序的编写 (转)
Windows95的设备驱动程序的编写 (转)[@more@]windows95的设备驱动程序的编写 录入/江湖小子 1999.08.07 1 ? 为 什 么 需 要 设 备 驱 动 程 序从 Windows 3.1 开 始 , 对 于 硬 件 设 备 的 访 问 便 采 取 了 一 种 设 备 驱 动 程 序 的 方 法 , 客 户 通 过 设 备 驱 动 程 序 来 获 得 硬 件 的 参 数 或 者 设 置 , 但 是 由 于 16 位 的 操 作 系 统 基 于 原 来 的 Dos , 所 以 客 户 程 序 仍 然 可 以 通 过 一 些 BIOS 或 者 DOS 的 DPMI 中 断 调 用 来 实 现 对 硬 件 的 操 作 。32 位 的 操 作 系 统 如 Windows 95
随心所欲改变窗口的图标 (转)
随心所欲改变窗口的图标 (转)[@more@]随心所欲改变窗口的图标 苏州市西塘南巷 沈建新 ---- 在使用VC++5.0开发应用程序时,我们可能需要改变框架窗口(包括主框架窗口和子框架窗口)的图标,而不是使用VC为你已经准备好了的、很难看的那个图标。但笔者参考了很多书籍、资料,却没有找到任何叙述如何去改变窗口图标的方法的文章(或许很多人认为这根本就不值得一提),让很多初学者无从着手。笔者经过实践,发现了以下两个改变框架窗口图标的方法。使用方法一可以在编写应用程序时指定框架窗口的图标,使用方法二可以在程序运行时根据需
一致的数据访问技术ADO/OLE DB (转)
一致的数据访问技术ADO/OLE DB (转)[@more@]一致的数据访问技术ADO/OLE db 潘爱民 microsoft新近推出的UDA(Universal Data Access,一致数据访问技术)为关系型或非关系型数据访问提供了一致的访问接口,为企业级Intr.NET应用多层软件结构提供了数据接口标准。一致数据访问包括两层软件接口,分别为ADO(Active Data object)和OLED B,对应于不同层次的应用开发,ADO提供了高层软件接口,可在各种脚本语言(Sc ript)或一些宏语言中直接使用;OLE DB提供了底层软件接口,可在C/C ++语言中直接使用。ADO以OL E DB为基础,它对OLE DB进行了封装。一致数据