社区
Delphi
帖子详情
'printer is not currently printing ' 这个错误怎么回事,怎么解决??
flycat_bob
2003-06-17 11:45:27
谢谢大家帮助
...全文
782
4
打赏
收藏
'printer is not currently printing ' 这个错误怎么回事,怎么解决??
谢谢大家帮助
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
上海老李
2003-06-17
打赏
举报
回复
这应该是打印机和系统间的问题,你到其它电脑上试试不用这台打印机
WWWWA
2003-06-17
打赏
举报
回复
一般是打印驱动程序有问题,重新安装一下。
hammer_shi
2003-06-17
打赏
举报
回复
设断点跟踪调试,看看到哪里报错!
捕捉一下,屏蔽掉!
flycat_bob
2003-06-17
打赏
举报
回复
系统提示报错,但是我还是能打一次,怎么回事!??
我的打印机是联好了的,用的是激光打印机!!!!!!
PPT 2010 播放软件 (PPT兼容包) PowerPo
int
Viewer 2010
Microsoft PowerPo
int
Viewer 2010 播放程序.
解决
了安装Microsoft Office 2003及以下版本和WPS Office 不能打开播放.pptx(MS Office 2010演示文稿)的问题.
解决
了Microsoft Office 2007打开由Microsoft Office 2010创建的演示文稿播放时效果的损失. 并非兼容包, 即仅只能打开播放幻灯片, 不能进行编辑. -----------------官方说明(介绍)--------------------------- Microsoft PowerPo
int
Viewer lets you view full-featured
pr
esentations created in PowerPo
int
97 and later versions. Overview PowerPo
int
Viewer lets you view full-featured
pr
esentations created in PowerPo
int
97 and later versions with full fidelity. This viewer also supports open
ing
password-
pr
otected Microsoft PowerPo
int
pr
esentations. You can view and
pr
int
pr
esentations, but you cannot edit them in the PowerPo
int
Viewer. The follow
ing
section on Font Components amends the license terms for the PowerPo
int
Viewer and must accompany any permitted redistribution of the PowerPo
int
Viewer: Font Components You may use the fonts that accompany the PowerPo
int
Viewer on
ly
to display and
pr
int
content from a device runn
ing
a Microsoft Windows operat
ing
system. Additional
ly
, you may do the follow
ing
: •Embed fonts in content as permitted by the embedd
ing
restrictions in the fonts •When
pr
int
ing
content, temporari
ly
download the fonts to a
pr
int
e
r or other output device You may not copy, install or use the fonts on other devices. Note: If no end user license agreement is
pr
esented dur
ing
installation or the first run of PowerPo
int
Viewer, by download
ing
this software you agree that the software is subject to the terms of the end user license agreement that you already accepted with your
pr
evious installation of PowerPo
int
Viewer, with Microsoft as the licensor. The follow
ing
Microsoft PowerPo
int
features are not supported by this viewer: •Information Rights Management (IRM)
pr
esentations. •Runn
ing
macros,
pr
ograms, or open
ing
linked or embedded objects. System requirements Supported Operat
ing
Systems: Windows 7, Windows Server 2003 R2 (32-Bit x86), Windows Server 2003 R2 x64 editions, Windows Server 2008, Windows Vista Service Pack 1, Windows Vista Service Pack 2, Windows XP Service Pack 3 •Memory: ◦256 MB RAM or more •270 MB of available hard disk space •Display: 1024x768 or higher resolution monitor •Additional: Graphics hardware acceleration requires a DirectX 9.0c graphics card with 64 MB or more video memory.
Pr
oduct functionality and graphics may vary based on your system configuration. •This download works with
pr
esentations created in the follow
ing
Microsoft Office
pr
ograms: ◦Microsoft PowerPo
int
2010 ◦Microsoft Office PowerPo
int
2007 ◦Microsoft Office PowerPo
int
2003 ◦Microsoft PowerPo
int
2002 ◦Microsoft PowerPo
int
2000 ◦Microsoft PowerPo
int
97 Instructions To install this download: 1.Download the file by click
ing
the Download button (above) and sav
ing
the file to your hard disk. 2.Double-click the PowerPo
int
Viewer.exe
pr
ogram file on your hard disk to start the setup
pr
ogram. 3.Follow the instructions on the screen to complete the installation. Instructions for use: •Once you have installed this download, from the Start menu under All
Pr
ograms, open Microsoft PowerPo
int
Viewer. Note PowerPo
int
Viewer registers with the .ppt, .pptx, .pptm, .pot, .potx, .potm, .pps, .ppsx and .ppsm file extensions on
ly
if a version of PowerPo
int
is not installed on your computer. If registered, double-click
ing
on these file types will launch PowerPo
int
Viewer. To remove this download: 1.On the Start menu, po
int
to Sett
ing
s, and then click Control Panel. 2.Double-click Add/Remove
Pr
ograms. 3.In the list of
current
ly
installed
pr
ograms, select Microsoft PowerPo
int
Viewer, and then click Remove or Add/Remove. 4.Click Yes or OK to confirm that you want to remove the
pr
ogram. To remove the download file •Delete the file PowerPo
int
Viewer.exe. http://www.microsoft.com/download/en/details.aspx?id=13
SQLMemTable for Delphi / C++ Builder
SQLMemTable for Delphi / C++ Builder: README============================================Please read this file careful
ly
(especial
ly
the INSTALLATION chapter) before install
ing
the
pr
ogram to your computer.Contents--------
Pr
ogram information Company information Description Specification Features and Benefits Installation Purchas
ing
/ Registration Copyright and licenses Warranty and guarantee Technical support Important note Other
pr
oducts recommended to use
Pr
ogram information-------------------
Pr
ogram Name: SQLMemTableLicense Types: Personal (for personal use, without source code) Com (for 1 developer, without source code)
Pr
o (for 1 developer, with source code) Team4 (for 4 developers, with source code) Team8 (for 8 developers, with source code) Enter
pr
ise (Enter
pr
ise License - for entire company, with source code)
Pr
ogram Version: 1.00
Pr
ogram Release Date: 07/15/2003
Pr
ogram Purpose: SQLMemTable is a compact, fast and powerful in-memory table with SQL support. Target Environment: Delphi 4, 5, 6, 7 and C++ Builder 4, 5, 6.Company information-------------------Company Name: AidAim SoftwareContact E-mail Address: support@aidaim.comContact WWW URL: http://www.aidaim.comDescription-----------SQLMemTable is a compact in-memory table with SQL support for Delphi and C++ Builder. SQLMemTable does not require BDE and
pr
ovides all the TTable‘s functionssuch as Master/Detail relationship, Filter
ing
, Search
ing
, Sort
ing
, Key, Range, BLOB fields, and has some advanced features such as BLOB data com
pr
ession, multi-indexes and table restructur
ing
, shareable in memory capabilities. It is ful
ly
compatible with all standard DB controls, supports calculated and lookup fields as well as
int
e
rnationalization/localization and Unicode,
pr
ovides data import
ing
from and export
ing
to any dataset, includes SQLConsole utility with source code, com
pr
ehensive help and demos.SQLMemTable
pr
ovides the follow
ing
services: - SQL support - Master / detail relationship - Creat
ing
, renam
ing
, empty
ing
, delet
ing
and restructur
ing
tables - Creat
ing
, edit
ing
, delet
ing
, navigat
ing
and search
ing
for records - Creat
ing
and delet
ing
multiple indexes - Calculated and lookup fields - Filter
ing
support - Us
ing
BLOB fields with data com
pr
ession ability - Import
ing
from and export
ing
to any dataset in fast and easy way -
Int
e
rnationalization/Localization and Unicode supportSQLMemTable does not require BDE or any external drivers and has small foot
pr
int
. Its search performance is excellent and data access speed is extreme
ly
fast.Specification-------------Data types: ftAutoInc, ft
Int
e
ger, ftSmall
Int
, ftFloat, ftDateTime, ftDate, ftTime, ftBLOB, ftMemo, ftGraphic, ftStr
ing
(any fixed length str
ing
), ftCurrency, ftWord, ftBoolean, ftLarge
Int
, ftFmtMemo, ftBytes, ftWideStr
ing
.Advanced data types: aftExtended, aftWideMemoMaximum records quantity: up to 2^31 (over 2 billions). Maximum fields per table: 2^31 (over 2 billions). Maximum indexes per table: 2^31 (over 2 billions). Maximum index fields per index: 2^31 (over 2 billions). Maximum field name‘s length: 255 characters.Maximum index name‘s length: 255 characters.BLOB fields block size: > 1 byte, default 100 Kb. BLOB com
pr
ession: ZLib, BZip, PPM Search operators: <,>,=,<>,<=,>=, like, not like, is null, is not null, and, or, not, (). Features and Benefits---------------------Compactness. - Short compiled code with ap
pr
oximate size 300 Kb, no external drivers (such as BDE) required. - Small memory consumption by SQLMemTable database engine. - Fast BLOB data com
pr
ession. Your large data fields will need less memory. SQLMemTable can com
pr
ess data on the f
ly
. The com
pr
ession routines used in the SQLMemTable are much faster than most of popular archivers like PKZip, WinRar, Arj. High performance. - Fast search by B-tree indexes. At the moment SQLMemTable is one of the fastest exist
ing
in-memory tables for Delphi and C++ Builder. - High-speed memory operations performance is achieved by means of us
ing
special
ly
optimized memory manager and tuned algorithms. - Quick operations with str
ing
s. SQLMemTable compares str
ing
s up to 3 times faster than standard Delphi str
ing
routines. High performance is achieved by us
ing
a special library written in Assembler and an advanced sort
ing
algorithm. - Advanced SQL optimizer often makes query execution several times faster by choos
ing
the best execution plans. Functionality. - A subset of SQL‘92 includ
ing
DDL operators is supported by TSQLMemQuery component. With SQLMemTable you can create SQL scripts for creat
ing
tables, insert
ing
, edit
ing
and delet
ing
records, retriev
ing
data by SELECT command. - Advanced search engine. SQLMemTable supports ‘LIKE‘ operator with wildcards ‘%‘ and ‘_‘, as well as ‘IS NULL‘ and ‘IS NOT NULL‘ in filters and queries. - Full multiple index support, i.e. numerous fields in a table may com
pr
ise an index. SQLMemTable
pr
ovides descend
ing
and ascend
ing
indexes, case-sensitive and insensitive indexes for str
ing
fields. - Shareable in-memory tables. SQLMemTable supports simultaneous access to a table by multiple TSQLMemTable components within a s
ing
le application. - Default values support. - Record-level constra
int
s, i.e. constra
int
s that must be met when edit
ing
the data. Compatibility. - SQLMemTable supports most of TTable field data types, includ
ing
BLOB fields, moreover it allows to create str
ing
and wide str
ing
fields of any fixed length. - SQLMemTable is ful
ly
compatible with standard DB-aware visual controls such as QuickReport, DBGrid, DBNavigator, DBImage, DBMemo, DBRichEdit, as well as with third party vendor‘s
pr
oducts support
ing
TDataset descendant components - FastReport, DBF
ly
TreeView and others. - Calculated and lookup fields can be used in the same way as TTable. - Most of TTable functions are supported includ
ing
Key and Range methods. Convenience. - Table restructur
ing
is be
ing
performed in the easiest way keep
ing
all the exist
ing
data. - Data import
ing
from and export
ing
to any dataset is supported. SQLMemTable
pr
ovides you with the simplest way to import and export tables us
ing
ImportTable and ExportTable methods. -
Int
e
rnationalization / localization support. All text search and sort
ing
functions use
current
system locale, so localiz
ing
your
pr
ogram with SQLMemTable is a very simple task. - Unicode support. All the text operations work with multi-byte encod
ing
us
ing
ftWideStr
ing
. - Com
pr
ehensive help. SQLMemTable comes with full documentation
pr
esented in SQLMemTable Developer‘s Guide and SQLMemTable Reference. Installation------------1) Make sure that all copies of Delphi (or C++ Builder) are
current
ly
closed and not runn
ing
on the target system. Also, if you are replac
ing
an exist
ing
version of SQLMemTable, please remove all files and the package of the
pr
ior version before runn
ing
the new setup
pr
ogram.2) Unpack zip archive contain
ing
SQLMemTable
int
o any directory. 3) Run the INSTALL.EXE from this directory.4) Follow on-screen instructions of step-by-step setup wizard to install SQLMemTable.5) If after the installation SQLMemTable components don‘t appear in Components Palette of the IDE, please follow the next instructions: * From the IDE, select ‘Component | Install Packages...‘. * Click the ‘Add‘ button. * In the ..SQLMemTableLibDelphi# (or ..SQLMemTableLibC++ Builder#) directory, select the dclSQLMemTableD#.BPL (or dclSQLMemTableB#.BPL) file. * Click the ‘OK‘ button to close the dialog. * Final
ly
, select ‘Tools | Environment Options‘ from the main menu. From this dialog, select the ‘Library‘ tab and insure that the ..SQLMemTableLibDelphi# (or ..SQLMemTableLibC++ Builder#) directory is included in the ‘Library Path‘ line.Purchas
ing
/ Registration-------------------------Visit our site http://www.aidaim.com to purchase or register the
pr
oduct.Copyright and license---------------------See "license.txt" file.Warranty and guarantee----------------------See "license.txt" file.Technical support-----------------Before you contact us, please do the follow
ing
: - Make sure you have performed all the required steps correct
ly
. - Look at the Help files and Demos: it may already contain an answer to your question. A lot of people ask us someth
ing
like "how do I:", though the complete information is there. - Visit our
Int
e
rnet site at http://www.aidaim.com. It‘s a good chance that you‘ll find the newer version of our
pr
oduct there.If the
pr
oblem persists, please, inform us about the follow
ing
: - SQLMemTable version. - Where did you obtain SQLMemTable (http or ftp site). - Compiler information: Delphi or C++ Builder, Version, Edition, Service Pack - Environmental information: your OS and Service Pack - Description of your
pr
oblem (as much information as possible to retrieve the
pr
oblem). - Attach a test
pr
oject where the
pr
oblem could be re
pr
oduced (it helps us to solve your issue as soon as possible)Typical
ly
AidAim Software Support Team answer messages in 24 hours, but depend
ing
on s
ing
ularity and difficulty of your question it may take a bit longer.Should you have any ideas on im
pr
ov
ing
the exist
ing
functions of this
pr
oduct after you have downloaded and used it, be easy to e-mail us. All registered users who buy this
pr
oduct may also send their offers to add new possibilities and/or to change the
pr
oduct‘s functions.We consider any ideas and we may take them
int
o account while creat
ing
new versions of our
pr
oducts.Other
pr
oducts AidAim Software recommended-------------------------------------------All the
pr
oducts in this chapter are ful
ly
compatible with SQLMemTable and recommended to work with our
pr
oduct. AidAim Software had tested all these
pr
oducts released by our partner companies for complete compatibility with SQLMemTable. In its turn, all the partner companies have carried out similar test
ing
of the compatibilityof SQLMemTable with their own
pr
oducts. All the companies whose
pr
oducts
pr
esent here are technology partners of AidAim Software. It means that both partner companies guarantee the correct jo
int
work of the
pr
oducts. In case of encounter
ing
bugs in the time of jo
int
work and ow
ing
to it, the partners incur the obligation to resolve such
pr
oblems for their clients for FREE. FastReport Software -------------------Advanced report generators for Delphi and Kylix.Web Site: http://www.fast-report.comFastReport VCL--------------FastReport VCL is report
ing
tool component for Borland Delphi 2-6 and Borland C++Builder 3-5. It consists of report engine, designer and
pr
eview. Some FastReport possibilities are real
ly
unique. The generator allows you to create tables, queries and databases in run-time. Built-in dialog designer allows you creation of dialog forms (they can be used for ask
ing
some parameters before
pr
int
ing
a report). You also able to use built-in Pascal-like
int
e
r
pr
eter to do rather complex data
pr
ocess
ing
. In spite of power of FastReport, its code is quite small.
Pr
obab
ly
FastReport is leader in correlation of functionality/size. The FastReport kernel (without designer) adds to your
pr
ogram the small foot
pr
int
(less than QR3), but its functionality is like in ReportBuilder‘s one.FastReport CLX edition----------------------FastReport CLX edition is powerfull of FastReport for Borland Delphi 6 and Borland Kylix 1-2 for Linux. It use new CLX-library. Do you want to create reports for Linux as well as for Windows? Use FastReport CLX edition!FastReport VCL 2.3 lite-----------------------FreeWare version of FastReport. Imca Systems DevTeam --------------------Imca Systems DevTeam - Flexible and powerful Delphi/C++ Builder/ActiveX trees, grids and editors.Web Site: http://www.9rays.netDBF
ly
TreeView Suite-------------------Add grid and treeview functionality with a s
ing
le component. DBF
ly
TreeView is a ful
ly
customizable, data-bound grid and tree view component that allows you to add huge arrays of nodes. OLE drag-and-drop is supported and the component is customizable at both design-time and runtime. DBF
ly
TreeView supports custom colors, fonts, and alignment for each cell, and you can even create scrollable background wallpapers without creat
ing
huge bitmaps.Included: RapidTree, F
ly
TreeView,
Pr
opertiesTree, DBF
ly
TreeView controls.DBF
ly
TreeView
Pr
o Suite----------------------Enable your Delphi and C++Builder applications to display and browse hierarchical, table, and list data. DBF
ly
TreeView
Pr
o Suite is a set of VCL components that are a direct descendent from F
ly
TreeView
Pr
o. It supports more than 40 types of in place editors plus your custom format. It is data-aware and allows you to draw any array of cells direct
ly
to a
pr
int
e
r, Metafile, or Bitmap canvas.Included: RapidTree, IsPlugeditor, F
ly
TreeView
Pr
o,
Pr
opertiesTree
Pr
o, DBF
ly
TreeView
Pr
o controls.
VB编程资源大全(英文源码 控制)
1 , TaskBar_v0.5.zip"Form_Taskbar is a control for Visual Basic which, once placed onto a form, makes the form act like the Taskbar (minus the Start Menu)." -- David Newcum2 , RemBuilderplus.zip"Rem Builder will auto load on startup to use Rem Builder; start your Visual Basic
pr
ogram with your
pr
oject code show
ing
, right click and you should see "Rem Builder".3 , syntax.zipThis is an excellent example of how to highlight HTML code in a rich textbox. I encourage everyone to check it out.4 , status.zipThis example demonstrates how to display text about each control the mouse is
current
ly
above.5 , dm10e.zipThis COM object allows you to send SMTP mail from many of the most used applications, includ
ing
:Active Server Pages (Microsoft IIS or Chili!ASP extensions) Microsoft Visual Basic 4.x/5.x/6.x Microsoft Word, Access, Excel 95/97 (VBA) Windows Script
ing
Host (cscript / wscript) Perl 5.x for Win32 In
pr
ise Delphi 4 Microsoft Visual C++ 4.x/5.x/6.x Microsoft Visual J++ 1.x/6.0 (Java) 6 , ocxex.zip"This is a quick example I made to show you how to use Events and
pr
operties in a OCX."7 , news.exeThis control aids as a complete Newsgroup control. It can post messages and recieve messages through the
int
e
rnet.8 , optiondemo.zipThis example demonstrates how to create realistic Option Buttons in Visual Basic.9 , mencrypt.zipThis ocx allows you to encrypt str
ing
s while utiliz
ing
a password shift method.10 , listtxt.zipThis shows how to retrieve the text from the
current
selection in a listbox.11 , list_index.zipThis example tells you if the inputted List Index is selected or not.12 , fade.zipThis is a bas to fade a pictuerbox. Can be used to make a
pr
ogressbar13 , subcls32.zipThis demonstrates hoe to write a subclass
ing
control. And it has many examples as to how to use the control (included.)14 , djmeter.zipThis is the source for a
Pr
ogress Bar control. Also includes a helpful example.15 ,
pr
ogress.zipThis is an example on how to use the
Pr
ogress Bar included with Microsoft's Visual Basic.16 , slider.zip"This is a sample of the Slider control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "17 , statusbar.zip"This is a sample of the StatusBar control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "18 , tabstrip.zip"This is a sample of the TabStrip control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "19 , uncommondialog.zipThis is an alternative to Microsoft's (tm) Common Dialog control by Nick Mancini.20 , ucmdex.zipThis is the example to go with Uncommon Dialog OCX.21 , scroll.zipThis demonstrates how to create an auto-scroll
ing
textbox.22 , splitter.zipThis demonstrates how to "split" controls. This is an excellent example, and I reccomend this file for everyone. 23 , mtymse.zip"This
pr
oject is a ful
ly
work
ing
ActiveX control, with code, that allows you to control almost every aspect of the mouse. You can move the mouse, click the buttons and adjust the click time from your application."24 , ucmdsrc.zipThis is the source to my OCX. This demontrates how to create a basic OCX. This will aid anyone who wants to create an OCX.25 , avb-systray.zipThis is a good example to add your
pr
ograms' icon to the Systray. This Zip also includes a helpful example.26 , cmdex.zipThis is an example of how to use the Common Dialog. This demonstrates most of the event
pr
ocedures of the CM Dialog control.27 , campbell-reg.zipThis demonstrates how to write and retrieve information from the registry.28 , basChangeCursor.zipThis module demonstrates how to animate your cursor through Visual Basic, and Win32.29 , hdcat.zipThis will grab every file on your hard drive and add its path to a listbox.30 , vbo_bump.zipThis DLL allows
pr
ogrammers to easi
ly
draw 3D grippers and lines on Device Contexts (DC). 31 , vbo_user32_bas.zipThis BAS file contains many functions to ease the
pr
ocess of us
ing
the USER32 DLL. 32 , vbo_gdi32_bas.zipThis BAS File conatains many functions to ease the
pr
ocess of us
ing
the GDI32 DLL. 33 , vbo_button_bas.zipThis bas contains functions to manipulate Button class objects34 , LPT_Port.zi
pR
ead/write to LPT parallel port35 , Danc
ing
Baby.zipA Danc
ing
Baby Screen Saver Which Dance on A Famous Song Macarena ( With Sound ) A Very Cute Screen Saver ,with source code, If you want more avi files then please mail me.36 , superwriter.zipA complete Word
pr
ocessor, with source code. You can save, open files,
pr
int
them out, copy, cut, paste, well you know the concept!37 , LogOff.zipThis convenient
ly
placed
pr
ogram allows you to log off from your system tray.38 , ChPass.zipChanges NT Domain Passord. This
pr
ogram has two compenants... a server and a a client. The Server must run on a Domain Controller.39 , Reboot.zipThis convenient
ly
placed
pr
ogram allows you to restart your computer more easi
ly
, from your system tray. 40 , analogclock.zipThis is a very good demo OCX for an analog clock. Although quite big in size, this is due to the very good background to the clock face. The analog click itself is very accurate and looks very im
pr
essive.41 , edge.zipThis
pr
ogram uses a few API calls/functions to set 3D, sunken and etched effects to an image inside an image control. It also has an example of how to change a label control to a 3D command button.42 , splitpanel2.zipA re-written version of the SplitPanel that David original
ly
put onto this site about a year ago. It basical
ly
is a control that you place on a form and you can put other controls on the form and by dragg
ing
the splitpanel bar around, it does the resiz
ing
for you. 43 , avcontrol.zipThis control takes care of many audio and visual functions needed for game and graphical
pr
ogrammers. You can easi
ly
retrieve or change the screen resolution and color depth, play audio CDs and standard wave files 44 , fsocontrol.zipThis demonstration version of this control is a wrapper around the FileSystemObject - and makes us
ing
the FSO much easier.45 , slid
ing
toolbar.zipThis
pr
oject shows how to implement a slid
ing
toolbar in an application us
ing
one quick Kernel32 API function "Sleep". The application is fair
ly
simple and easy to implement. 46 , dcsize.zipWhen this control is put onto a form, it ensures that all other controls retain the correct aspect-ratio from the design time view. Basical
ly
, it resize all controls on a form when the form resizes. This code is 100% free.47 , colorchooseocx.zipThis great OCX allows you to have a drop down list of colors to allow your user to choose from. The control itself has all the events and
pr
operties that you need.48 , xgraphmeter.zipThis is XGraphMeter, a bargraph/meter control good for display
ing
constant
ly
chang
ing
values such as CPU usage or DUN throughput.49 , dynlistmnu.zipWhile try
ing
to come up with a Dynamic menu in VB, I decided that VBs menu object was just too much of a pain to work with This
pr
oject contains a form to mimic the functionality that I was look
ing
for.. Part of my design criteria was that the menu form 50 , runtime.zipSupposed
ly
, what this code does cannot be done... But it works. Basical
ly
, its a demonstration of how you can change control
pr
operties at run-time. If you try it in VB, you will get a runtime error, but this code shows you how to do it. Gilbert says51 , ledbulb.zipThis is a first for this author. Its an OCX which re
pr
esents a characters in the form of led bulbs.52 , textapiroutines.basContained here is a small set of routines can be used with a Rich Text box (RTF) control. It can be used for other controls as well with minor modifications. You are welcome to change, use and distribute the code as you see fit.53 , xflatbutton.zipFlatButton is an owner-drawn flat button that pops up when the mouse passes over it. This version is text-on
ly
, but has flexible color support.54 , urllabel.zipWith the development of the
int
e
rnet and
int
ranet applications, this control could could in more and more useful. Its a hyperlink label which will change color or underline when the mouse goes over it 55 ,
pr
ogbar.zipThis is a great replacement for the standard VB
pr
ogress bar. Its smooth, total
ly
free (all the source code is here), and more versitile than the one that comes with VB.56 , splitpanel.zipThis little control with full source code is remarkab
ly
compact but does a lot of fancy th
ing
s. It allows you to be able to split panels and handles all the resiz
ing
behind it. We couldn't think of how to describe it
pr
oper
ly
, but 下载 it and try it57,basicreg.zipBasic Save and Retrieve Functions58,
pr
oguse.zipKeep Track of a
Pr
ograms Usage59,millisec.zipCount Time in Milliseconds 60,getday.zipGet the Day of Week that a Day Falls On61,shellend.zipNotify the User when a Shelled
Pr
ocess Ends 62,varlist.zipGet a List of Windows Variables 63,detdisp.zipDetermine Display Colors 64,ctrlntwk.zipControl Panel - Network65,ctrluser.zipControl Panel - User
Pr
operties66,ctrltwui.zipControl Panel - TweakUI67,ctrlthm.zipControl Panel - Themes68,ctrltele.zipControl Panel - Telephony69,ctrlsys.zipControl Panel - System
Pr
operties70,ctrlscrn.zipControl Panel - Screen Savers71,ctrlreg.zipControl Panel - Regional Sett
ing
s72,ctrl
pr
nt.zipControl Panel -
Pr
int
e
rs73,ctrlpwr.zipControl Panel - Power Management74,ctrlpw.zipControl Panel - Passwords75,ctrlodbc.zipControl Panel - ODBC3276,ctrlmm.zipControl Panel - Multimedia77,ctrlmdm.zipControl Panel - Modem78,ctrlkbd.zipControl Panel - Keyboard79,ctrlmous.zipControl Panel - Mouse80,ctrlpoa.zipControl Panel - Post Office Admin81,ctrlotlk.zipControl Panel - Outlook82,ctrljoy.zipControl Panel - Joystick83,ctrlie4.zipControl Panel -
Int
e
rnet Explorer 84,ctrlgame.zipControl Panel - Game Controllers85,ctrlfont.zipControl Panel - Fonts86,ctrlarmp.zip Control Panel - Add/Remove
Pr
ograms87,ctrlanh.zipControl Panel - Add New Hardware88,ctrlanp.zipControl Panel - Add New
Pr
int
e
r89,ctrlaccs.zipControl Panel - Accessibility90,ctrlbrf.zipControl Panel - Create Briefcase91,ctrlcdsk.zipControl Panel - Copy Disk92,ctrlcns.zipControl Panel - Create New Shortcut93,ctrldun.zipControl Panel - Dial-Up Network
ing
94,ctrldisp.zipControl Panel - Display
Pr
operties95,RegControl.zipFree Registry ActiveX Control. Read/Write Str
ing
/Binary/DWord values, Check if key/value exists, CreateKey, Delete key/value and enumerate keys/values!96,MouseEvent.zipThis is a Mouse Event
pr
ocedure that is
pr
etty cool. It can be used for Web design
ing
. Check it out!97,ShellTrayIcon.zipThe CShellTrayIcon class allows your VB application to set, change and delete icons in the system's tray 98,Reboot2.zi
pR
eboot remote
ly
. I wrote this to reboot selected PC's dur
ing
off hours. It is a standalone application that will display a 10 second countdown. Any open data will try to be saved
pr
ior to the shutdown
pr
ocess.99,S-Secure.zipThis is S-Secure.....a security
pr
ogram I've coded for Windows. It has 4 modules each in a separate VB
pr
oject. 100,DriveSpace.zipThis
Pr
ogram finds and displays the Drive's Space.101,Disable_X.zipThis user control allows you to disable the windows close "X" button. Example
pr
ogram included.102,SetParnt.zipShows how to assign controls to different forms at run time. 103,phone.zipA Cellular Phone Application Uses MSCOMM, Modem and normal telephone lines to make calls. You can use this application to make local as well as
Int
e
rnational calls. 104,Timer01.zipSimple
pr
ogram demonstrat
ing
how to create a stop watch us
ing
the Timer control. 105,Bubblesort.zipA simple Bubble Sort code that shows how the
pr
ogram works within a VB
pr
ogram. 106,systray.zipJust another Systray Utility, but worse than the others !!! static, flash
ing
and animated Tray-Icons 107,FolderFiles.zipDemonstrates usage of
pr
ogress bar and list box controls. Its purpose is to get all the files from a specified folder while show
ing
the
pr
ogress completed. 108,MultipleDataSets.zipThis is a simple, (1) form VB 6.0
pr
ogram which demonstrates how to plot multiple sets of data on the same graph us
ing
the MSChart Control 6.0 (OLEDB). 109,MthVw
Pr
j.zipMonthView control. Lets users view and set date information via a calendar-like
int
e
rface. 110,calculator4.zipI know this is wierd but I made a calculator control. Just add it to your control bar, double click, and you can use the calculator when your
pr
oject is at run-time. Source included.111,GradientButton.zipThis button was created to be an enhanced replacement for Visual Basic's standard command button by add
ing
2 more Border appearance schemes, 2 more button styles, and hover effects. 112,MSChart.zipMSChart. You can view MSChart in Line graph,Pie , Area, etc.. also you can update data
pr
ovided in the Grid.. Very
int
e
rest
ing
must see it... 113,
pr
int
ing
_tut.zipI made this for a freind to help him out with some basic
Pr
int
ing
, i got the idea from a
pr
int
ing
tut i found on the net, so the code is not mine. 114,treeview.zipThis code can as many child nodes to a tree view control and can save the data and structure of the treeview control in a text file. Later the data and structure can be retrieved from the text file and filled in the tree view control by click
ing
the load button. 115,alarm_clock.zipIt simulates an alarm clock. 116,DesktopByAlexDrankus.zipThis
pr
ogram hides/shows desktop, hides/shows taskbar, hides it self from the ctrl+alt+delete, uses pictures to create the forms (
pr
etty cool forms) and many other functions just place this
pr
ogram and all components in a sub-folder 117,Label3D.zipLabel3D lets you change the Label Face Color Shadow Color ON/OFF Shadow. 118,HotLinks.zip Custom Control which acts like a text box, except the developer can specify hot links in the control which act like web page links allow
ing
users to click them, while allow
ing
the developer full control over the result of the click. 119,custbutt.zipThis application shows how to create non rectangular buttons. 120,grid.zipComplete grid coded in vb. supports : locked rows/columns , fg/bg colors , text alignment , cell-edge styles , different selectionstyles . texbox/dropdown cells , cell icons and lots more... 121,analogmeter.zipCreate your own analog meters us
ing
MSPa
int
. These .bmp or .gif files become your meter face. Use the (analogmeter) subroutine to automatical
ly
draw the meter needle over the meter face 122,wheel.zipSpinWheel control to be used in place of either the UpDown control or the ScrollBar control.123,ArielBrowseFolder.zipA browse folder control resembl
ing
a combobox. When the dropdown button is clicked, browse through a folder treeview to select a directory. Uses the SHBrowseForFolder function, amongst other APIs. A call back
pr
ocedure is implemented show
ing
the
current
ly
selected folder in the browse for folder dialog. 124,pp_
pr
j.zipThis
pr
ogram shows you how to create a sample
pr
oject that adds
pr
int
pr
eview capabilities to your Visual Basic
pr
ogram by us
ing
a generic object and the
Pr
int
e
r object. 125,popup.zipPopUp buttons with on
ly
4 lines of code. 126,adbevel.zipThe bevel control in Delphi is now available in VB. 127,rainbow.zipCool! Have a
Pr
ogressBar like in InstallShield!With free selectable fore- and backcolor and the percent value displayed in the middle!Check it out.128,gb12.zipWell folks. Another version of Gold Button is here. I've added a few th
ing
s. Here they are:
Pr
operty descriptions, MaskColor, UseMask, Base Address in OCX, picture will now automatical
ly
align with text and when you are in des
ing
mode and OnUp
pr
operty is bsNone, a Dash-Dot-Dot box is drawn over the button, so you can see th button's area. 129,gb11.zipA new version of Gold Button is here dudes.New version has Picture
Pr
operty and Skin Support. 130,BIGDOGMEDIA.zipMEDIA PLAYER THAT SUPPORTS FORMATS LIKE MP3,AVI,MPEG,WAV ECT.EXAMPLE OF US
ING
ANIMATION WHEN PLAYER IS LAUNCHED. 131,HTML.zipAn HTML editor with complete VB source code. 132,
Pr
int
Pr
eview1.zip
Pr
int
Setup, and
Pr
int
Pr
iview application. 133,RTFEditor.zi
pR
TF text editor, HTML text editor, web browser, and more...Try it. Note, make sure your
pr
int
e
r is turned on before runn
ing
the application. 134,VBExplorer-II.zipVBExplorer file utility application. This application uses the Visual Basic TreeView and ListView controls to create a file management application similar to Windows Explorer.135,resizepic.zipShows how to resize a picture box control on a form at run time.
stdafx.h代码
stdafx.h的代码// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is on
ly
int
e
nded as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation
pr
ovided with the library. // See these sources for detailed information regard
ing
the // Microsoft Foundation Classes
pr
oduct. #ifndef __AFXWIN_H__ #ifndef RC_INVOKED #define __AFXWIN_H__ ///////////////////////////////////////////////////////////////////////////// // Make sure 'afx.h' is included first #ifndef __AFX_H__ #include #endif // Note: WINDOWS.H already included from AFXV_W32.H #ifndef _INC_SHELLAPI #include #endif #ifndef __AFXRES_H__ #include // standard resource IDs #endif #ifndef __AFXCOLL_H__ #include // standard collections #endif #ifdef _AFX_MINREBUILD #
pr
agma component(minrebuild, off) #endif #ifndef _AFX_FULLTYPEINFO #
pr
agma component(m
int
ypeinfo, on) #endif #ifndef _AFX_NOFORCE_LIBS #
pr
agma comment(lib, "uuid.lib") #endif #ifdef _INC_WINDOWSX // The follow
ing
names from WINDOWSX.H collide with names in this header #undef SubclassWindow #undef CopyRgn #endif #ifdef _AFX_PACK
ING
#
pr
agma pack(push, _AFX_PACK
ING
) #endif ///////////////////////////////////////////////////////////////////////////// // Classes declared in this file class CSize; class CPo
int
; class CRect; //CObject //CException //CSimpleException class CResourceException;// Win resource failure exception class CUserException; // Message Box alert and stop operation class CGdiObject; // CDC draw
ing
tool class CPen; // a pen / HPEN wrapper class CBrush; // a brush / HBRUSH wrapper class CFont; // a font / HFONT wrapper class CBitmap; // a bitmap / HBITMAP wrapper class CPalette; // a palette / HPALLETE wrapper class CRgn; // a region / HRGN wrapper class CDC; // a Display Context / HDC wrapper class CClientDC; // CDC for client of window class CWindowDC; // CDC for entire window class CPa
int
DC; // embeddable BeginPa
int
struct helper class CMenu; // a menu / HMENU wrapper class CCmdTarget; // a target for user commands class CWnd; // a window / HWND wrapper class CDialog; // a dialog // standard windows controls class CStatic; // Static control class CButton; // Button control class CListBox; // ListBox control class CCheckListBox;// special listbox with checks class CComboBox; // ComboBox control class CEdit; // Edit control class CScrollBar; // ScrollBar control // frame windows class CFrameWnd; // standard SDI frame class CMDIFrameWnd; // standard MDI frame class CMDIChildWnd; // standard MDI child class CMiniFrameWnd;// half-height caption frame wnd // views on a document class CView; // a view on a document class CScrollView; // a scroll
ing
view class CW
inT
hread; // thread base class class CWinApp; // application base class class CDocTemplate; // template for document creation class CS
ing
leDocTemplate;// SDI support class CMultiDocTemplate; // MDI support class CDocument; // main document abstraction // Helper classes class CCmdUI; // Menu/button enabl
ing
class CDataExchange; // Data exchange and validation context class CCommandLineInfo; // CommandLine pars
ing
helper class CDocManager; // CDocTemplate manager object ///////////////////////////////////////////////////////////////////////////// // Type modifier for message handlers #ifndef afx_msg #define afx_msg //
int
e
ntional placeholder #endif #undef AFX_DATA #define AFX_DATA AFX_CORE_DATA ///////////////////////////////////////////////////////////////////////////// // CSize - An extent, similar to Windows SIZE structure. class CSize : public tagSIZE { public: // Constructors // construct an uninitialized size CSize(); // create from two
int
e
gers CSize(
int
initCX,
int
initCY); // create from another size CSize(SIZE initSize); // create from a po
int
CSize(PO
INT
initPt); // create from a DWORD: cx = LOWORD(dw) cy = HIWORD(dw) CSize(DWORD dwSize); // Operations BOOL operator==(SIZE size) const; BOOL operator!=(SIZE size) const; void operator+=(SIZE size); void operator-=(SIZE size); // Operators return
ing
CSize values CSize operator+(SIZE size) const; CSize operator-(SIZE size) const; CSize operator-() const; // Operators return
ing
CPo
int
values CPo
int
operator+(PO
INT
po
int
) const; CPo
int
operator-(PO
INT
po
int
) const; // Operators return
ing
CRect values CRect operator+(const RECT* l
pR
ect) const; CRect operator-(const RECT* l
pR
ect) const; }; ///////////////////////////////////////////////////////////////////////////// // CPo
int
- A 2-D po
int
, similar to Windows PO
INT
structure. class CPo
int
: public tagPO
INT
{ public: // Constructors // create an uninitialized po
int
CPo
int
(); // create from two
int
e
gers CPo
int
(
int
initX,
int
initY); // create from another po
int
CPo
int
(PO
INT
initPt); // create from a size CPo
int
(SIZE initSize); // create from a dword: x = LOWORD(dw) y = HIWORD(dw) CPo
int
(DWORD dwPo
int
); // Operations // translate the po
int
void Offset(
int
xOffset,
int
yOffset); void Offset(PO
INT
po
int
); void Offset(SIZE size); BOOL operator==(PO
INT
po
int
) const; BOOL operator!=(PO
INT
po
int
) const; void operator+=(SIZE size); void operator-=(SIZE size); void operator+=(PO
INT
po
int
); void operator-=(PO
INT
po
int
); // Operators return
ing
CPo
int
values CPo
int
operator+(SIZE size) const; CPo
int
operator-(SIZE size) const; CPo
int
operator-() const; CPo
int
operator+(PO
INT
po
int
) const; // Operators return
ing
CSize values CSize operator-(PO
INT
po
int
) const; // Operators return
ing
CRect values CRect operator+(const RECT* l
pR
ect) const; CRect operator-(const RECT* l
pR
ect) const; }; ///////////////////////////////////////////////////////////////////////////// // CRect - A 2-D rectangle, similar to Windows RECT structure. typedef const RECT* LPCRECT; // po
int
e
r to read/on
ly
RECT class CRect : public tagRECT { public: // Constructors // uninitialized rectangle CRect(); // from left, top, right, and bottom CRect(
int
l,
int
t,
int
r,
int
b); // copy constructor CRect(const RECT& srcRect); // from a po
int
e
r to another rect CRect(LPCRECT lpSrcRect); // from a po
int
and size CRect(PO
INT
po
int
, SIZE size); // from two po
int
s CRect(PO
INT
topLeft, PO
INT
bottomRight); // Attributes (in addition to RECT members) // retrieves the width
int
Width() const; // returns the height
int
Height() const; // returns the size CSize Size() const; // reference to the top-left po
int
CPo
int
& TopLeft(); // reference to the bottom-right po
int
CPo
int
& BottomRight(); // const reference to the top-left po
int
const CPo
int
& TopLeft() const; // const reference to the bottom-right po
int
const CPo
int
& BottomRight() const; // the geometric center po
int
of the rectangle CPo
int
CenterPo
int
() const; // swap the left and right void SwapLeftRight(); static void SwapLeftRight(L
PR
ECT l
pR
ect); // convert between CRect and L
PR
ECT/LPCRECT (no need for &) operator L
PR
ECT(); operator LPCRECT() const; // returns TRUE if rectangle has no area BOOL IsRectEmpty() const; // returns TRUE if rectangle is at (0,0) and has no area BOOL IsRectNull() const; // returns TRUE if po
int
is within rectangle BOOL PtInRect(PO
INT
po
int
) const; // Operations // set rectangle from left, top, right, and bottom void SetRect(
int
x1,
int
y1,
int
x2,
int
y2); void SetRect(PO
INT
topLeft, PO
INT
bottomRight); // empty the rectangle void SetRectEmpty(); // copy from another rectangle void CopyRect(LPCRECT lpSrcRect); // TRUE if exact
ly
the same as another rectangle BOOL EqualRect(LPCRECT l
pR
ect) const; // inflate rectangle's width and height without // mov
ing
its top or left void InflateRect(
int
x,
int
y); void InflateRect(SIZE size); void InflateRect(LPCRECT l
pR
ect); void InflateRect(
int
l,
int
t,
int
r,
int
b); // deflate the rectangle's width and height without // mov
ing
its top or left void DeflateRect(
int
x,
int
y); void DeflateRect(SIZE size); void DeflateRect(LPCRECT l
pR
ect); void DeflateRect(
int
l,
int
t,
int
r,
int
b); // translate the rectangle by mov
ing
its top and left void OffsetRect(
int
x,
int
y); void OffsetRect(SIZE size); void OffsetRect(PO
INT
po
int
); void NormalizeRect(); // set this rectangle to
int
e
rsection of two others BOOL
Int
e
rsectRect(LPCRECT l
pR
ect1, LPCRECT l
pR
ect2); // set this rectangle to bound
ing
union of two others BOOL UnionRect(LPCRECT l
pR
ect1, LPCRECT l
pR
ect2); // set this rectangle to minimum of two others BOOL SubtractRect(LPCRECT l
pR
ectSrc1, LPCRECT l
pR
ectSrc2); // Additional Operations void operator=(const RECT& srcRect); BOOL operator==(const RECT& rect) const; BOOL operator!=(const RECT& rect) const; void operator+=(PO
INT
po
int
); void operator+=(SIZE size); void operator+=(LPCRECT l
pR
ect); void operator-=(PO
INT
po
int
); void operator-=(SIZE size); void operator-=(LPCRECT l
pR
ect); void operator&=(const RECT& rect); void operator|=(const RECT& rect); // Operators return
ing
CRect values CRect operator+(PO
INT
po
int
) const; CRect operator-(PO
INT
po
int
) const; CRect operator+(LPCRECT l
pR
ect) const; CRect operator+(SIZE size) const; CRect operator-(SIZE size) const; CRect operator-(LPCRECT l
pR
ect) const; CRect operator&(const RECT& rect2) const; CRect operator|(const RECT& rect2) const; CRect MulDiv(
int
nMultiplier,
int
nDivisor) const; }; #ifdef _DEBUG // Diagnostic Output CDumpContext& AFXAPI operator<<(CDumpContext& dc, SIZE size); CDumpContext& AFXAPI operator<<(CDumpContext& dc, PO
INT
po
int
); CDumpContext& AFXAPI operator<<(CDumpContext& dc, const RECT& rect); #endif //_DEBUG // Serialization CArchive& AFXAPI operator<<(CArchive& ar, SIZE size); CArchive& AFXAPI operator<<(CArchive& ar, PO
INT
po
int
); CArchive& AFXAPI operator<>(CArchive& ar, SIZE& size); CArchive& AFXAPI operator>>(CArchive& ar, PO
INT
& po
int
); CArchive& AFXAPI operator>>(CArchive& ar, RECT& rect); ///////////////////////////////////////////////////////////////////////////// // Standard exceptions class CResourceException : public CSimpleException // resource failure { DECLARE_DYNAMIC(CResourceException) public: CResourceException(); // Implementation public: CResourceException(BOOL bAutoDelete); CResourceException(BOOL bAutoDelete, U
INT
nResourceID); virtual ~CResourceException(); }; class CUserException : public CSimpleException // general user visible alert { DECLARE_DYNAMIC(CUserException) public: CUserException(); // Implementation public: CUserException(BOOL bAutoDelete); CUserException(BOOL bAutoDelete, U
INT
nResourceID); virtual ~CUserException(); }; void AFXAPI AfxThrowResourceException(); void AFXAPI AfxThrowUserException(); ///////////////////////////////////////////////////////////////////////////// // CGdiObject abstract class for CDC SelectObject class CGdiObject : public CObject { DECLARE_DYNCREATE(CGdiObject) public: // Attributes HGDIOBJ m_hObject; // must be first data member operator HGDIOBJ() const; HGDIOBJ GetSafeHandle() const; static CGdiObject* PASCAL FromHandle(HGDIOBJ hObject); static void PASCAL DeleteTempMap(); BOOL Attach(HGDIOBJ hObject); HGDIOBJ Detach(); // Constructors CGdiObject(); // must Create a derived class object BOOL DeleteObject(); // Operations
int
GetObject(
int
nCount, LPVOID lpObject) const; U
INT
GetObjectType() const; BOOL CreateStockObject(
int
nIndex); BOOL UnrealizeObject(); BOOL operator==(const CGdiObject& obj) const; BOOL operator!=(const CGdiObject& obj) const; // Implementation public: virtual ~CGdiObject(); #ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; virtual void AssertValid() const; #endif }; ///////////////////////////////////////////////////////////////////////////// // CGdiObject subclasses (draw
ing
tools) class CPen : public CGdiObject { DECLARE_DYNAMIC(CPen) public: static CPen* PASCAL FromHandle(HPEN hPen); // Constructors CPen(); CPen(
int
nPenStyle,
int
nWidth, COLORREF crColor); CPen(
int
nPenStyle,
int
nWidth, const LOGBRUSH* pLogBrush,
int
nStyleCount = 0, const DWORD* lpStyle = NULL); BOOL CreatePen(
int
nPenStyle,
int
nWidth, COLORREF crColor); BOOL CreatePen(
int
nPenStyle,
int
nWidth, const LOGBRUSH* pLogBrush,
int
nStyleCount = 0, const DWORD* lpStyle = NULL); BOOL CreatePenIndirect(LPLOGPEN lpLogPen); // Attributes operator HPEN() const;
int
GetLogPen(LOGPEN* pLogPen);
int
GetExtLogPen(EXTLOGPEN* pLogPen); // Implementation public: virtual ~CPen(); #ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; #endif }; class CBrush : public CGdiObject { DECLARE_DYNAMIC(CBrush) public: static CBrush* PASCAL FromHandle(HBRUSH hBrush); // Constructors CBrush(); CBrush(COLORREF crColor); // CreateSolidBrush CBrush(
int
nIndex, COLORREF crColor); // CreateHatchBrush CBrush(CBitmap* pBitmap); // CreatePatternBrush BOOL CreateSolidBrush(COLORREF crColor); BOOL CreateHatchBrush(
int
nIndex, COLORREF crColor); BOOL CreateBrushIndirect(const LOGBRUSH* lpLogBrush); BOOL CreatePatternBrush(CBitmap* pBitmap); BOOL CreateDIBPatternBrush(HGLOBAL hPackedDIB, U
INT
nUsage); BOOL CreateDIBPatternBrush(const void* lpPackedDIB, U
INT
nUsage); BOOL CreateSysColorBrush(
int
nIndex); // Attributes operator HBRUSH() const;
int
GetLogBrush(LOGBRUSH* pLogBrush); // Implementation public: virtual ~CBrush(); #ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; #endif }; class CFont : public CGdiObject { DECLARE_DYNAMIC(CFont) public: static CFont* PASCAL FromHandle(HFONT hFont); // Constructors CFont(); BOOL CreateFontIndirect(const LOGFONT* lpLogFont); BOOL CreateFont(
int
nHeight,
int
nWidth,
int
nEscapement,
int
nOrientation,
int
nWeight, BYTE bItalic, BYTE bUnderline, BYTE cStrikeOut, BYTE nCharSet, BYTE nOut
Pr
ecision, BYTE nClip
Pr
ecision, BYTE nQuality, BYTE nPitchAndFami
ly
, LPCTSTR lpszFacename); BOOL CreatePo
int
Font(
int
nPo
int
Size, LPCTSTR lpszFaceName, CDC* pDC = NULL); BOOL CreatePo
int
FontIndirect(const LOGFONT* lpLogFont, CDC* pDC = NULL); // Attributes operator HFONT() const;
int
GetLogFont(LOGFONT* pLogFont); // Implementation public: virtual ~CFont(); #ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; #endif }; class CBitmap : public CGdiObject { DECLARE_DYNAMIC(CBitmap) public: static CBitmap* PASCAL FromHandle(HBITMAP hBitmap); // Constructors CBitmap(); BOOL LoadBitmap(LPCTSTR lpszResourceName); BOOL LoadBitmap(U
INT
nIDResource); BOOL LoadOEMBitmap(U
INT
nIDBitmap); // for OBM_/OCR_/OIC_ BOOL LoadMappedBitmap(U
INT
nIDBitmap, U
INT
nFlags = 0, LPCOLORMAP lpColorMap = NULL,
int
nMapSize = 0); BOOL CreateBitmap(
int
nWidth,
int
nHeight, U
INT
nPlanes, U
INT
nBitcount, const void* lpBits); BOOL CreateBitmapIndirect(LPBITMAP lpBitmap); BOOL CreateCompatibleBitmap(CDC* pDC,
int
nWidth,
int
nHeight); BOOL CreateDiscardableBitmap(CDC* pDC,
int
nWidth,
int
nHeight); // Attributes operator HBITMAP() const;
int
GetBitmap(BITMAP* pBitMap); // Operations DWORD SetBitmapBits(DWORD dwCount, const void* lpBits); DWORD GetBitmapBits(DWORD dwCount, LPVOID lpBits) const; CSize SetBitmapDimension(
int
nWidth,
int
nHeight); CSize GetBitmapDimension() const; // Implementation public: virtual ~CBitmap(); #ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; #endif }; class CPalette : public CGdiObject { DECLARE_DYNAMIC(CPalette) public: static CPalette* PASCAL FromHandle(HPALETTE hPalette); // Constructors CPalette(); BOOL CreatePalette(LPLOGPALETTE lpLogPalette); BOOL CreateHalftonePalette(CDC* pDC); // Attributes operator HPALETTE() const;
int
GetEntryCount(); U
INT
GetPaletteEntries(U
INT
nStartIndex, U
INT
nNumEntries, LPPALETTEENTRY lpPaletteColors) const; U
INT
SetPaletteEntries(U
INT
nStartIndex, U
INT
nNumEntries, LPPALETTEENTRY lpPaletteColors); // Operations void AnimatePalette(U
INT
nStartIndex, U
INT
nNumEntries, LPPALETTEENTRY lpPaletteColors); U
INT
GetNearestPaletteIndex(COLORREF crColor) const; BOOL ResizePalette(U
INT
nNumEntries); // Implementation virtual ~CPalette(); }; class CRgn : public CGdiObject { DECLARE_DYNAMIC(CRgn) public: static CRgn* PASCAL FromHandle(HRGN hRgn); operator HRGN() const; // Constructors CRgn(); BOOL CreateRectRgn(
int
x1,
int
y1,
int
x2,
int
y2); BOOL CreateRectRgnIndirect(LPCRECT l
pR
ect); BOOL CreateEllipticRgn(
int
x1,
int
y1,
int
x2,
int
y2); BOOL CreateEllipticRgnIndirect(LPCRECT l
pR
ect); BOOL CreatePo
ly
gonRgn(LPPO
INT
lpPo
int
s,
int
nCount,
int
nMode); BOOL CreatePo
ly
Po
ly
gonRgn(LPPO
INT
lpPo
int
s, LP
INT
lpPo
ly
Counts,
int
nCount,
int
nPo
ly
FillMode); BOOL CreateRoundRectRgn(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3); BOOL CreateFromPath(CDC* pDC); BOOL CreateFromData(const XFORM* lpXForm,
int
nCount, const RGNDATA*
pR
gnData); // Operations void SetRectRgn(
int
x1,
int
y1,
int
x2,
int
y2); void SetRectRgn(LPCRECT l
pR
ect);
int
CombineRgn(CRgn*
pR
gn1, CRgn*
pR
gn2,
int
nCombineMode);
int
CopyRgn(CRgn*
pR
gnSrc); BOOL EqualRgn(CRgn*
pR
gn) const;
int
OffsetRgn(
int
x,
int
y);
int
OffsetRgn(PO
INT
po
int
);
int
GetRgnBox(L
PR
ECT l
pR
ect) const; BOOL PtInRegion(
int
x,
int
y) const; BOOL PtInRegion(PO
INT
po
int
) const; BOOL RectInRegion(LPCRECT l
pR
ect) const;
int
GetRegionData(L
PR
GNDATA l
pR
gnData,
int
nCount) const; // Implementation virtual ~CRgn(); }; ///////////////////////////////////////////////////////////////////////////// // The device context class CDC : public CObject { DECLARE_DYNCREATE(CDC) public: // Attributes HDC m_hDC; // The output DC (must be first data member) HDC m_hAttribDC; // The Attribute DC operator HDC() const; HDC GetSafeHdc() const; // Always returns the Output DC CWnd* GetWindow() const; static CDC* PASCAL FromHandle(HDC hDC); static void PASCAL DeleteTempMap(); BOOL Attach(HDC hDC); // Attach/Detach affects on
ly
the Output DC HDC Detach(); virtual void SetAttribDC(HDC hDC); // Set the Attribute DC virtual void SetOutputDC(HDC hDC); // Set the Output DC virtual void ReleaseAttribDC(); // Release the Attribute DC virtual void ReleaseOutputDC(); // Release the Output DC BOOL Is
Pr
int
ing
() const; // TRUE if be
ing
used for
pr
int
ing
CPen* Get
Current
Pen() const; CBrush* Get
Current
Brush() const; CPalette* Get
Current
Palette() const; CFont* Get
Current
Font() const; CBitmap* Get
Current
Bitmap() const; // for bidi and mirrored localization DWORD GetLayout() const; DWORD SetLayout(DWORD dwLayout); // Constructors CDC(); BOOL CreateDC(LPCTSTR lpszDriverName, LPCTSTR lpszDeviceName, LPCTSTR lpszOutput, const void* lpInitData); BOOL CreateIC(LPCTSTR lpszDriverName, LPCTSTR lpszDeviceName, LPCTSTR lpszOutput, const void* lpInitData); BOOL CreateCompatibleDC(CDC* pDC); BOOL DeleteDC(); // Device-Context Functions virtual
int
SaveDC(); virtual BOOL RestoreDC(
int
nSavedDC);
int
GetDeviceCaps(
int
nIndex) const; U
INT
SetBoundsRect(LPCRECT l
pR
ectBounds, U
INT
flags); U
INT
GetBoundsRect(L
PR
ECT l
pR
ectBounds, U
INT
flags); BOOL ResetDC(const DEVMODE* lpDevMode); // Draw
ing
-Tool Functions CPo
int
GetBrushOrg() const; CPo
int
SetBrushOrg(
int
x,
int
y); CPo
int
SetBrushOrg(PO
INT
po
int
);
int
EnumObjects(
int
nObjectType,
int
(CALLBACK* lpfn)(LPVOID, LPARAM), LPARAM lpData); // Type-safe selection helpers public: virtual CGdiObject* SelectStockObject(
int
nIndex); CPen* SelectObject(CPen* pPen); CBrush* SelectObject(CBrush* pBrush); virtual CFont* SelectObject(CFont* pFont); CBitmap* SelectObject(CBitmap* pBitmap);
int
SelectObject(CRgn*
pR
gn); // special return for regions CGdiObject* SelectObject(CGdiObject* pObject); // CGdiObject*
pr
ovided so compiler doesn't use SelectObject(HGDIOBJ) // Color and Color Palette Functions COLORREF GetNearestColor(COLORREF crColor) const; CPalette* SelectPalette(CPalette* pPalette, BOOL bForceBackground); U
INT
RealizePalette(); void UpdateColors(); // Draw
ing
-Attribute Functions COLORREF GetBkColor() const;
int
GetBkMode() const;
int
GetPo
ly
FillMode() const;
int
GetROP2() const;
int
GetStretchBltMode() const; COLORREF GetTextColor() const; virtual COLORREF SetBkColor(COLORREF crColor);
int
SetBkMode(
int
nBkMode);
int
SetPo
ly
FillMode(
int
nPo
ly
FillMode);
int
SetROP2(
int
nDrawMode);
int
SetStretchBltMode(
int
nStretchMode); virtual COLORREF SetTextColor(COLORREF crColor); BOOL GetColorAdjustment(LPCOLORADJUSTMENT lpColorAdjust) const; BOOL SetColorAdjustment(const COLORADJUSTMENT* lpColorAdjust); // Mapp
ing
Functions
int
GetMapMode() const; CPo
int
GetViewportOrg() const; virtual
int
SetMapMode(
int
nMapMode); // Viewport Origin virtual CPo
int
SetViewportOrg(
int
x,
int
y); CPo
int
SetViewportOrg(PO
INT
po
int
); virtual CPo
int
OffsetViewportOrg(
int
nWidth,
int
nHeight); // Viewport Extent CSize GetViewportExt() const; virtual CSize SetViewportExt(
int
cx,
int
cy); CSize SetViewportExt(SIZE size); virtual CSize ScaleViewportExt(
int
xNum,
int
xDenom,
int
yNum,
int
yDenom); // Window Origin CPo
int
GetWindowOrg() const; CPo
int
SetWindowOrg(
int
x,
int
y); CPo
int
SetWindowOrg(PO
INT
po
int
); CPo
int
OffsetWindowOrg(
int
nWidth,
int
nHeight); // Window extent CSize GetWindowExt() const; virtual CSize SetWindowExt(
int
cx,
int
cy); CSize SetWindowExt(SIZE size); virtual CSize ScaleWindowExt(
int
xNum,
int
xDenom,
int
yNum,
int
yDenom); // Coordinate Functions void DPtoLP(LPPO
INT
lpPo
int
s,
int
nCount = 1) const; void DPtoLP(L
PR
ECT l
pR
ect) const; void DPtoLP(LPSIZE lpSize) const; void LPtoDP(LPPO
INT
lpPo
int
s,
int
nCount = 1) const; void LPtoDP(L
PR
ECT l
pR
ect) const; void LPtoDP(LPSIZE lpSize) const; // Special Coordinate Functions (useful for deal
ing
with metafiles and OLE) void DPtoHIMETRIC(LPSIZE lpSize) const; void LPtoHIMETRIC(LPSIZE lpSize) const; void HIMETRICtoDP(LPSIZE lpSize) const; void HIMETRICtoLP(LPSIZE lpSize) const; // Region Functions BOOL FillRgn(CRgn*
pR
gn, CBrush* pBrush); BOOL FrameRgn(CRgn*
pR
gn, CBrush* pBrush,
int
nWidth,
int
nHeight); BOOL InvertRgn(CRgn*
pR
gn); BOOL Pa
int
Rgn(CRgn*
pR
gn); // Clipp
ing
Functions virtual
int
GetClipBox(L
PR
ECT l
pR
ect) const; virtual BOOL PtVisible(
int
x,
int
y) const; BOOL PtVisible(PO
INT
po
int
) const; virtual BOOL RectVisible(LPCRECT l
pR
ect) const;
int
SelectCli
pR
gn(CRgn*
pR
gn);
int
ExcludeCli
pR
ect(
int
x1,
int
y1,
int
x2,
int
y2);
int
ExcludeCli
pR
ect(LPCRECT l
pR
ect);
int
ExcludeUpdateRgn(CWnd* pWnd);
int
Int
e
rsectCli
pR
ect(
int
x1,
int
y1,
int
x2,
int
y2);
int
Int
e
rsectCli
pR
ect(LPCRECT l
pR
ect);
int
OffsetCli
pR
gn(
int
x,
int
y);
int
OffsetCli
pR
gn(SIZE size);
int
SelectCli
pR
gn(CRgn*
pR
gn,
int
nMode); // Line-Output Functions CPo
int
Get
Current
Position() const; CPo
int
MoveTo(
int
x,
int
y); CPo
int
MoveTo(PO
INT
po
int
); BOOL LineTo(
int
x,
int
y); BOOL LineTo(PO
INT
po
int
); BOOL Arc(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3,
int
x4,
int
y4); BOOL Arc(LPCRECT l
pR
ect, PO
INT
ptStart, PO
INT
ptEnd); BOOL Po
ly
line(LPPO
INT
lpPo
int
s,
int
nCount); BOOL AngleArc(
int
x,
int
y,
int
nRadius, float fStartAngle, float fSweepAngle); BOOL ArcTo(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3,
int
x4,
int
y4); BOOL ArcTo(LPCRECT l
pR
ect, PO
INT
ptStart, PO
INT
ptEnd);
int
GetArcDirection() const;
int
SetArcDirection(
int
nArcDirection); BOOL Po
ly
Draw(const PO
INT
* lpPo
int
s, const BYTE* lpTypes,
int
nCount); BOOL Po
ly
lineTo(const PO
INT
* lpPo
int
s,
int
nCount); BOOL Po
ly
Po
ly
line(const PO
INT
* lpPo
int
s, const DWORD* lpPo
ly
Po
int
s,
int
nCount); BOOL Po
ly
Bezier(const PO
INT
* lpPo
int
s,
int
nCount); BOOL Po
ly
BezierTo(const PO
INT
* lpPo
int
s,
int
nCount); // Simple Draw
ing
Functions void FillRect(LPCRECT l
pR
ect, CBrush* pBrush); void FrameRect(LPCRECT l
pR
ect, CBrush* pBrush); void InvertRect(LPCRECT l
pR
ect); BOOL DrawIcon(
int
x,
int
y, HICON hIcon); BOOL DrawIcon(PO
INT
po
int
, HICON hIcon); #if (WINVER >= 0x400) BOOL DrawState(CPo
int
pt, CSize size, HBITMAP hBitmap, U
INT
nFlags, HBRUSH hBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, CBitmap* pBitmap, U
INT
nFlags, CBrush* pBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, HICON hIcon, U
INT
nFlags, HBRUSH hBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, HICON hIcon, U
INT
nFlags, CBrush* pBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, LPCTSTR lpszText, U
INT
nFlags, BOOL b
Pr
efixText = TRUE,
int
nTextLen = 0, HBRUSH hBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, LPCTSTR lpszText, U
INT
nFlags, BOOL b
Pr
efixText = TRUE,
int
nTextLen = 0, CBrush* pBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, DRAWSTATE
PR
OC lpDraw
Pr
oc, LPARAM lData, U
INT
nFlags, HBRUSH hBrush = NULL); BOOL DrawState(CPo
int
pt, CSize size, DRAWSTATE
PR
OC lpDraw
Pr
oc, LPARAM lData, U
INT
nFlags, CBrush* pBrush = NULL); #endif // Ellipse and Po
ly
gon Functions BOOL Chord(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3,
int
x4,
int
y4); BOOL Chord(LPCRECT l
pR
ect, PO
INT
ptStart, PO
INT
ptEnd); void DrawFocusRect(LPCRECT l
pR
ect); BOOL Ellipse(
int
x1,
int
y1,
int
x2,
int
y2); BOOL Ellipse(LPCRECT l
pR
ect); BOOL Pie(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3,
int
x4,
int
y4); BOOL Pie(LPCRECT l
pR
ect, PO
INT
ptStart, PO
INT
ptEnd); BOOL Po
ly
gon(LPPO
INT
lpPo
int
s,
int
nCount); BOOL Po
ly
Po
ly
gon(LPPO
INT
lpPo
int
s, LP
INT
lpPo
ly
Counts,
int
nCount); BOOL Rectangle(
int
x1,
int
y1,
int
x2,
int
y2); BOOL Rectangle(LPCRECT l
pR
ect); BOOL RoundRect(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3); BOOL RoundRect(LPCRECT l
pR
ect, PO
INT
po
int
); // Bitmap Functions BOOL PatBlt(
int
x,
int
y,
int
nWidth,
int
nHeight, DWORD dwRop); BOOL BitBlt(
int
x,
int
y,
int
nWidth,
int
nHeight, CDC* pSrcDC,
int
xSrc,
int
ySrc, DWORD dwRop); BOOL StretchBlt(
int
x,
int
y,
int
nWidth,
int
nHeight, CDC* pSrcDC,
int
xSrc,
int
ySrc,
int
nSrcWidth,
int
nSrcHeight, DWORD dwRop); COLORREF GetPixel(
int
x,
int
y) const; COLORREF GetPixel(PO
INT
po
int
) const; COLORREF SetPixel(
int
x,
int
y, COLORREF crColor); COLORREF SetPixel(PO
INT
po
int
, COLORREF crColor); BOOL FloodFill(
int
x,
int
y, COLORREF crColor); BOOL ExtFloodFill(
int
x,
int
y, COLORREF crColor, U
INT
nFillType); BOOL MaskBlt(
int
x,
int
y,
int
nWidth,
int
nHeight, CDC* pSrcDC,
int
xSrc,
int
ySrc, CBitmap& maskBitmap,
int
xMask,
int
yMask, DWORD dwRop); BOOL PlgBlt(LPPO
INT
lpPo
int
, CDC* pSrcDC,
int
xSrc,
int
ySrc,
int
nWidth,
int
nHeight, CBitmap& maskBitmap,
int
xMask,
int
yMask); BOOL SetPixelV(
int
x,
int
y, COLORREF crColor); BOOL SetPixelV(PO
INT
po
int
, COLORREF crColor); // Text Functions virtual BOOL TextOut(
int
x,
int
y, LPCTSTR lpszStr
ing
,
int
nCount); BOOL TextOut(
int
x,
int
y, const CStr
ing
& str); virtual BOOL ExtTextOut(
int
x,
int
y, U
INT
nOptions, LPCRECT l
pR
ect, LPCTSTR lpszStr
ing
, U
INT
nCount, LP
INT
lpDxWidths); BOOL ExtTextOut(
int
x,
int
y, U
INT
nOptions, LPCRECT l
pR
ect, const CStr
ing
& str, LP
INT
lpDxWidths); virtual CSize TabbedTextOut(
int
x,
int
y, LPCTSTR lpszStr
ing
,
int
nCount,
int
nTabPositions, LP
INT
lpnTabStopPositions,
int
nTabOrigin); CSize TabbedTextOut(
int
x,
int
y, const CStr
ing
& str,
int
nTabPositions, LP
INT
lpnTabStopPositions,
int
nTabOrigin); virtual
int
DrawText(LPCTSTR lpszStr
ing
,
int
nCount, L
PR
ECT l
pR
ect, U
INT
nFormat);
int
DrawText(const CStr
ing
& str, L
PR
ECT l
pR
ect, U
INT
nFormat); CSize GetTextExtent(LPCTSTR lpszStr
ing
,
int
nCount) const; CSize GetTextExtent(const CStr
ing
& str) const; CSize GetOutputTextExtent(LPCTSTR lpszStr
ing
,
int
nCount) const; CSize GetOutputTextExtent(const CStr
ing
& str) const; CSize GetTabbedTextExtent(LPCTSTR lpszStr
ing
,
int
nCount,
int
nTabPositions, LP
INT
lpnTabStopPositions) const; CSize GetTabbedTextExtent(const CStr
ing
& str,
int
nTabPositions, LP
INT
lpnTabStopPositions) const; CSize GetOutputTabbedTextExtent(LPCTSTR lpszStr
ing
,
int
nCount,
int
nTabPositions, LP
INT
lpnTabStopPositions) const; CSize GetOutputTabbedTextExtent(const CStr
ing
& str,
int
nTabPositions, LP
INT
lpnTabStopPositions) const; virtual BOOL GrayStr
ing
(CBrush* pBrush, BOOL (CALLBACK* lpfnOutput)(HDC, LPARAM,
int
), LPARAM lpData,
int
nCount,
int
x,
int
y,
int
nWidth,
int
nHeight); U
INT
GetTextAlign() const; U
INT
SetTextAlign(U
INT
nFlags);
int
GetTextFace(
int
nCount, LPTSTR lpszFacename) const;
int
GetTextFace(CStr
ing
& rStr
ing
) const; BOOL GetTextMetrics(LPTEXTMETRIC lpMetrics) const; BOOL GetOutputTextMetrics(LPTEXTMETRIC lpMetrics) const;
int
SetTextJustification(
int
nBreakExtra,
int
nBreakCount);
int
GetTextCharacterExtra() const;
int
SetTextCharacterExtra(
int
nCharExtra); // Advanced Draw
ing
#if (WINVER >= 0x400) BOOL DrawEdge(L
PR
ECT l
pR
ect, U
INT
nEdge, U
INT
nFlags); BOOL DrawFrameControl(L
PR
ECT l
pR
ect, U
INT
nType, U
INT
nState); #endif // Scroll
ing
Functions BOOL ScrollDC(
int
dx,
int
dy, LPCRECT l
pR
ectScroll, LPCRECT l
pR
ectClip, CRgn*
pR
gnUpdate, L
PR
ECT l
pR
ectUpdate); // Font Functions BOOL GetCharWidth(U
INT
nFirstChar, U
INT
nLastChar, LP
INT
lpBuffer) const; BOOL GetOutputCharWidth(U
INT
nFirstChar, U
INT
nLastChar, LP
INT
lpBuffer) const; DWORD SetMapperFlags(DWORD dwFlag); CSize GetAspectRatioFilter() const; BOOL GetCharABCWidths(U
INT
nFirstChar, U
INT
nLastChar, LPABC lpabc) const; DWORD GetFontData(DWORD dwTable, DWORD dwOffset, LPVOID lpData, DWORD cbData) const;
int
GetKern
ing
Pairs(
int
nPairs, LPKERN
ING
PAIR lpkrnpair) const; U
INT
GetOutlineTextMetrics(U
INT
cbData, LPOUTLINETEXTMETRIC lpotm) const; DWORD GetG
ly
phOutline(U
INT
nChar, U
INT
nFormat, LPG
LY
PHMETRICS lpgm, DWORD cbBuffer, LPVOID lpBuffer, const MAT2* lpmat2) const; BOOL GetCharABCWidths(U
INT
nFirstChar, U
INT
nLastChar, LPABCFLOAT lpABCF) const; BOOL GetCharWidth(U
INT
nFirstChar, U
INT
nLastChar, float* lpFloatBuffer) const; //
Pr
int
e
r/Device Escape Functions virtual
int
Escape(
int
nEscape,
int
nCount, LPCSTR lpszInData, LPVOID lpOutData);
int
Escape(
int
nEscape,
int
nInputSize, LPCSTR lpszInputData,
int
nOutputSize, LPSTR lpszOutputData);
int
DrawEscape(
int
nEscape,
int
nInputSize, LPCSTR lpszInputData); // Escape helpers
int
StartDoc(LPCTSTR lpszDocName); // old Win3.0 version
int
StartDoc(LPDOCINFO lpDocInfo);
int
StartPage();
int
EndPage();
int
SetAbort
Pr
oc(BOOL (CALLBACK* lpfn)(HDC,
int
));
int
AbortDoc();
int
EndDoc(); // MetaFile Functions BOOL PlayMetaFile(HMETAFILE hMF); BOOL PlayMetaFile(HENHMETAFILE hEnhMetaFile, LPCRECT lpBounds); BOOL AddMetaFileComment(U
INT
nDataSize, const BYTE* pCommentData); // can be used for enhanced metafiles on
ly
// Path Functions BOOL AbortPath(); BOOL BeginPath(); BOOL CloseFigure(); BOOL EndPath(); BOOL FillPath(); BOOL FlattenPath(); BOOL StrokeAndFillPath(); BOOL StrokePath(); BOOL WidenPath(); float GetMiterLimit() const; BOOL SetMiterLimit(float fMiterLimit);
int
GetPath(LPPO
INT
lpPo
int
s, LPBYTE lpTypes,
int
nCount) const; BOOL SelectClipPath(
int
nMode); // Misc Helper Functions static CBrush* PASCAL GetHalftoneBrush(); void DrawDragRect(LPCRECT l
pR
ect, SIZE size, LPCRECT l
pR
ectLast, SIZE sizeLast, CBrush* pBrush = NULL, CBrush* pBrushLast = NULL); void FillSolidRect(LPCRECT l
pR
ect, COLORREF clr); void FillSolidRect(
int
x,
int
y,
int
cx,
int
cy, COLORREF clr); void Draw3dRect(LPCRECT l
pR
ect, COLORREF clrTopLeft, COLORREF clrBottomRight); void Draw3dRect(
int
x,
int
y,
int
cx,
int
cy, COLORREF clrTopLeft, COLORREF clrBottomRight); // Implementation public: virtual ~CDC(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif // advanced use and implementation BOOL m_b
Pr
int
ing
; HGDIOBJ SelectObject(HGDIOBJ); // do not use for regions
pr
otected: // used for implementation of non-virtual SelectObject calls static CGdiObject* PASCAL SelectGdiObject(HDC hDC, HGDIOBJ h); }; ///////////////////////////////////////////////////////////////////////////// // CDC Helpers class CPa
int
DC : public CDC { DECLARE_DYNAMIC(CPa
int
DC) // Constructors public: CPa
int
DC(CWnd* pWnd); // BeginPa
int
// Attributes
pr
otected: HWND m_hWnd; public: PA
INT
STRUCT m_ps; // actual pa
int
struct! // Implementation public: virtual ~CPa
int
DC(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif }; class CClientDC : public CDC { DECLARE_DYNAMIC(CClientDC) // Constructors public: CClientDC(CWnd* pWnd); // Attributes
pr
otected: HWND m_hWnd; // Implementation public: virtual ~CClientDC(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif }; class CWindowDC : public CDC { DECLARE_DYNAMIC(CWindowDC) // Constructors public: CWindowDC(CWnd* pWnd); // Attributes
pr
otected: HWND m_hWnd; // Implementation public: virtual ~CWindowDC(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif }; ///////////////////////////////////////////////////////////////////////////// // CMenu class CMenu : public CObject { DECLARE_DYNCREATE(CMenu) public: // Constructors CMenu(); BOOL CreateMenu(); BOOL CreatePopupMenu(); BOOL LoadMenu(LPCTSTR lpszResourceName); BOOL LoadMenu(U
INT
nIDResource); BOOL LoadMenuIndirect(const void* lpMenuTemplate); BOOL DestroyMenu(); // Attributes HMENU m_hMenu; // must be first data member HMENU GetSafeHmenu() const; operator HMENU() const; static CMenu* PASCAL FromHandle(HMENU hMenu); static void PASCAL DeleteTempMap(); BOOL Attach(HMENU hMenu); HMENU Detach(); // CMenu Operations BOOL DeleteMenu(U
INT
nPosition, U
INT
nFlags); BOOL TrackPopupMenu(U
INT
nFlags,
int
x,
int
y, CWnd* pWnd, LPCRECT l
pR
ect = 0); BOOL operator==(const CMenu& menu) const; BOOL operator!=(const CMenu& menu) const; // CMenuItem Operations BOOL AppendMenu(U
INT
nFlags, U
INT
nIDNewItem = 0, LPCTSTR lpszNewItem = NULL); BOOL AppendMenu(U
INT
nFlags, U
INT
nIDNewItem, const CBitmap* pBmp); U
INT
CheckMenuItem(U
INT
nIDCheckItem, U
INT
nCheck); U
INT
EnableMenuItem(U
INT
nIDEnableItem, U
INT
nEnable); U
INT
GetMenuItemCount() const; U
INT
GetMenuItemID(
int
nPos) const; U
INT
GetMenuState(U
INT
nID, U
INT
nFlags) const;
int
GetMenuStr
ing
(U
INT
nIDItem, LPTSTR lpStr
ing
,
int
nMaxCount, U
INT
nFlags) const;
int
GetMenuStr
ing
(U
INT
nIDItem, CStr
ing
& rStr
ing
, U
INT
nFlags) const; BOOL GetMenuItemInfo(U
INT
nIDItem, LPMENUITEMINFO lpMenuItemInfo, BOOL fByPos = FALSE); CMenu* GetSubMenu(
int
nPos) const; BOOL InsertMenu(U
INT
nPosition, U
INT
nFlags, U
INT
nIDNewItem = 0, LPCTSTR lpszNewItem = NULL); BOOL InsertMenu(U
INT
nPosition, U
INT
nFlags, U
INT
nIDNewItem, const CBitmap* pBmp); BOOL ModifyMenu(U
INT
nPosition, U
INT
nFlags, U
INT
nIDNewItem = 0, LPCTSTR lpszNewItem = NULL); BOOL ModifyMenu(U
INT
nPosition, U
INT
nFlags, U
INT
nIDNewItem, const CBitmap* pBmp); BOOL RemoveMenu(U
INT
nPosition, U
INT
nFlags); BOOL SetMenuItemBitmaps(U
INT
nPosition, U
INT
nFlags, const CBitmap* pBmpUnchecked, const CBitmap* pBmpChecked); BOOL CheckMenuRadioItem(U
INT
nIDFirst, U
INT
nIDLast, U
INT
nIDItem, U
INT
nFlags); BOOL SetDefaultItem(U
INT
uItem, BOOL fByPos = FALSE); U
INT
GetDefaultItem(U
INT
gmdiFlags, BOOL fByPos = FALSE); // Context Help Functions BOOL SetMenuContextHelpId(DWORD dwContextHelpId); DWORD GetMenuContextHelpId() const; // Overridables (must override draw and measure for owner-draw menu items) virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); // Implementation public: virtual ~CMenu(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif static CMenu* PASCAL CMenu::FromHandlePermanent(HMENU hMenu); }; ///////////////////////////////////////////////////////////////////////////// // Window message map handl
ing
struct AFX_MSGMAP_ENTRY; // declared below after CWnd struct AFX_MSGMAP { #ifdef _AFXDLL const AFX_MSGMAP* (PASCAL* pfnGetBaseMap)(); #else const AFX_MSGMAP* pBaseMap; #endif const AFX_MSGMAP_ENTRY* lpEntries; }; #ifdef _AFXDLL #define DECLARE_MESSAGE_MAP() \
pr
ivate: \ static const AFX_MSGMAP_ENTRY _messageEntries[]; \
pr
otected: \ static AFX_DATA const AFX_MSGMAP messageMap; \ static const AFX_MSGMAP* PASCAL _GetBaseMessageMap(); \ virtual const AFX_MSGMAP* GetMessageMap() const; \ #else #define DECLARE_MESSAGE_MAP() \
pr
ivate: \ static const AFX_MSGMAP_ENTRY _messageEntries[]; \
pr
otected: \ static AFX_DATA const AFX_MSGMAP messageMap; \ virtual const AFX_MSGMAP* GetMessageMap() const; \ #endif #ifdef _AFXDLL #define BEGIN_MESSAGE_MAP(theClass, baseClass) \ const AFX_MSGMAP* PASCAL theClass::_GetBaseMessageMap() \ { return &baseClass;::messageMap; } \ const AFX_MSGMAP* theClass::GetMessageMap() const \ { return &theClass;::messageMap; } \ AFX_COMDAT AFX_DATADEF const AFX_MSGMAP theClass::messageMap = \ { &theClass;::_GetBaseMessageMap, &theClass;::_messageEntries[0] }; \ AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \ { \ #else #define BEGIN_MESSAGE_MAP(theClass, baseClass) \ const AFX_MSGMAP* theClass::GetMessageMap() const \ { return &theClass;::messageMap; } \ AFX_COMDAT AFX_DATADEF const AFX_MSGMAP theClass::messageMap = \ { &baseClass;::messageMap, &theClass;::_messageEntries[0] }; \ AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \ { \ #endif #define END_MESSAGE_MAP() \ {0, 0, 0, 0, AfxSig_end, (AFX_PMSG)0 } \ }; \ // Message map signature values and macros in separate header #include ///////////////////////////////////////////////////////////////////////////// // Dialog data exchange (DDX_) and validation (DDV_) // CDataExchange - for data exchange and validation class CDataExchange { // Attributes public: BOOL m_bSaveAndValidate; // TRUE => save and validate data CWnd* m_pDlgWnd; // container usual
ly
a dialog // Operations (for implementors of DDX and DDV
pr
ocs) HWND
Pr
epareCtrl(
int
nIDC); // return HWND of control HWND
Pr
epareEditCtrl(
int
nIDC); // return HWND of control void Fail(); // will throw exception #ifndef _AFX_NO_OCC_SUPPORT CWnd*
Pr
epareOleCtrl(
int
nIDC); // for OLE controls in dialog #endif // Implementation CDataExchange(CWnd* pDlgWnd, BOOL bSaveAndValidate); HWND m_hWndLastControl; // last control used (for validation) BOOL m_bEditLastControl; // last control was an edit item }; #include // standard DDX_ and DDV_ routines ///////////////////////////////////////////////////////////////////////////// // OLE types typedef LONG HRESULT; struct IUnknown; typedef IUnknown* LPUNKNOWN; struct IDispatch; typedef IDispatch* LPDISPATCH; struct IConnectionPo
int
; typedef IConnectionPo
int
* LPCONNECTIONPO
INT
; struct IEnumOLEVERB; typedef IEnumOLEVERB* LPENUMOLEVERB; typedef struct _GUID GUID; typedef GUID IID; typedef GUID CLSID; #ifndef _REFCLSID_DEFINED #define REFCLSID const CLSID & #endif typedef long DISPID; typedef unsigned short VARTYPE; typedef long SCODE; #if defined(WIN32) && !defined(OLE2ANSI) typedef WCHAR OLECHAR; #else typedef char OLECHAR; #endif typedef OLECHAR* BSTR; struct tagDISPPARAMS; typedef tagDISPPARAMS DISPPARAMS; struct tagVARIANT; typedef tagVARIANT VARIANT; struct ITypeInfo; typedef ITypeInfo* LPTYPEINFO; struct ITypeLib; typedef ITypeLib* LPTYPELIB; ///////////////////////////////////////////////////////////////////////////// // CCmdTarget //
pr
ivate structures struct AFX_CMDHANDLERINFO; // info about where the command is handled struct AFX_EVENT; // info about an event class CTypeLibCache; // cache for OLE type libraries ///////////////////////////////////////////////////////////////////////////// // OLE
int
e
rface map handl
ing
(more in AFXDISP.H) #ifndef _AFX_NO_OLE_SUPPORT struct AFX_
INT
E
RFACEMAP_ENTRY { const void* piid; // the
int
e
rface id (IID) (NULL for aggregate) size_t nOffset; // offset of the
int
e
rface vtable from m_unknown }; struct AFX_
INT
E
RFACEMAP { #ifdef _AFXDLL const AFX_
INT
E
RFACEMAP* (PASCAL* pfnGetBaseMap)(); // NULL is root class #else const AFX_
INT
E
RFACEMAP* pBaseMap; #endif const AFX_
INT
E
RFACEMAP_ENTRY* pEntry; // map for this class }; #ifdef _AFXDLL #define DECLARE_
INT
E
RFACE_MAP() \
pr
ivate: \ static const AFX_
INT
E
RFACEMAP_ENTRY _
int
e
rfaceEntries[]; \
pr
otected: \ static AFX_DATA const AFX_
INT
E
RFACEMAP
int
e
rfaceMap; \ static const AFX_
INT
E
RFACEMAP* PASCAL _GetBase
Int
e
rfaceMap(); \ virtual const AFX_
INT
E
RFACEMAP* Get
Int
e
rfaceMap() const; \ #else #define DECLARE_
INT
E
RFACE_MAP() \
pr
ivate: \ static const AFX_
INT
E
RFACEMAP_ENTRY _
int
e
rfaceEntries[]; \
pr
otected: \ static AFX_DATA const AFX_
INT
E
RFACEMAP
int
e
rfaceMap; \ virtual const AFX_
INT
E
RFACEMAP* Get
Int
e
rfaceMap() const; \ #endif #endif //!_AFX_NO_OLE_SUPPORT ///////////////////////////////////////////////////////////////////////////// // OLE dispatch map handl
ing
(more in AFXDISP.H) #ifndef _AFX_NO_OLE_SUPPORT struct AFX_DISPMAP_ENTRY; struct AFX_DISPMAP { #ifdef _AFXDLL const AFX_DISPMAP* (PASCAL* pfnGetBaseMap)(); #else const AFX_DISPMAP* pBaseMap; #endif const AFX_DISPMAP_ENTRY* lpEntries; U
INT
* lpEntryCount; DWORD* lpStock
Pr
opMask; }; #ifdef _AFXDLL #define DECLARE_DISPATCH_MAP() \
pr
ivate: \ static const AFX_DISPMAP_ENTRY _dispatchEntries[]; \ static U
INT
_dispatchEntryCount; \ static DWORD _dwStock
Pr
opMask; \
pr
otected: \ static AFX_DATA const AFX_DISPMAP dispatchMap; \ static const AFX_DISPMAP* PASCAL _GetBaseDispatchMap(); \ virtual const AFX_DISPMAP* GetDispatchMap() const; \ #else #define DECLARE_DISPATCH_MAP() \
pr
ivate: \ static const AFX_DISPMAP_ENTRY _dispatchEntries[]; \ static U
INT
_dispatchEntryCount; \ static DWORD _dwStock
Pr
opMask; \
pr
otected: \ static AFX_DATA const AFX_DISPMAP dispatchMap; \ virtual const AFX_DISPMAP* GetDispatchMap() const; \ #endif #endif //!_AFX_NO_OLE_SUPPORT ///////////////////////////////////////////////////////////////////////////// // OLE Document Object command target handl
ing
#ifndef _AFX_NO_DOCOBJECT_SUPPORT struct AFX_OLECMDMAP_ENTRY { const GUID* pguid; // id of the command group ULONG cmdID; // OLECMD ID U
INT
nID; // correspond
ing
WM_COMMAND message ID }; struct AFX_OLECMDMAP { #ifdef _AFXDLL const AFX_OLECMDMAP* (PASCAL* pfnGetBaseMap)(); #else const AFX_OLECMDMAP* pBaseMap; #endif const AFX_OLECMDMAP_ENTRY* lpEntries; }; #ifdef _AFXDLL #define DECLARE_OLECMD_MAP() \
pr
ivate: \ static const AFX_OLECMDMAP_ENTRY _commandEntries[]; \
pr
otected: \ static AFX_DATA const AFX_OLECMDMAP commandMap; \ static const AFX_OLECMDMAP* PASCAL _GetBaseCommandMap(); \ virtual const AFX_OLECMDMAP* GetCommandMap() const; \ #else #define DECLARE_OLECMD_MAP() \
pr
ivate: \ static const AFX_OLECMDMAP_ENTRY _commandEntries[]; \
pr
otected: \ static AFX_DATA const AFX_OLECMDMAP commandMap; \ virtual const AFX_OLECMDMAP* GetCommandMap() const; \ #endif #ifdef _AFXDLL #define BEGIN_OLECMD_MAP(theClass, baseClass) \ const AFX_OLECMDMAP* PASCAL theClass::_GetBaseCommandMap() \ { return &baseClass;::commandMap; } \ const AFX_OLECMDMAP* theClass::GetCommandMap() const \ { return &theClass;::commandMap; } \ AFX_COMDAT AFX_DATADEF const AFX_OLECMDMAP theClass::commandMap = \ { &theClass;::_GetBaseCommandMap, &theClass;::_commandEntries[0] }; \ AFX_COMDAT const AFX_OLECMDMAP_ENTRY theClass::_commandEntries[] = \ { \ #else #define BEGIN_OLECMD_MAP(theClass, baseClass) \ const AFX_OLECMDMAP* theClass::GetCommandMap() const \ { return &theClass;::commandMap; } \ AFX_COMDAT AFX_DATADEF const AFX_OLECMDMAP theClass::commandMap = \ { &baseClass;::commandMap, &theClass;::_commandEntries[0] }; \ AFX_COMDAT const AFX_OLECMDMAP_ENTRY theClass::_commandEntries[] = \ { \ #endif #define END_OLECMD_MAP() \ {NULL, 0, 0} \ }; \ class COleCmdUI; #endif //!_AFX_NO_DOCOBJECT_SUPPORT ///////////////////////////////////////////////////////////////////////////// // OLE event sink map handl
ing
(more in AFXDISP.H) #ifndef _AFX_NO_OCC_SUPPORT struct AFX_EVENTSINKMAP_ENTRY; struct AFX_EVENTSINKMAP { #ifdef _AFXDLL const AFX_EVENTSINKMAP* (PASCAL* pfnGetBaseMap)(); #else const AFX_EVENTSINKMAP* pBaseMap; #endif const AFX_EVENTSINKMAP_ENTRY* lpEntries; U
INT
* lpEntryCount; }; #ifdef _AFXDLL #define DECLARE_EVENTSINK_MAP() \
pr
ivate: \ static const AFX_EVENTSINKMAP_ENTRY _eventsinkEntries[]; \ static U
INT
_eventsinkEntryCount; \
pr
otected: \ static AFX_DATA const AFX_EVENTSINKMAP eventsinkMap; \ static const AFX_EVENTSINKMAP* PASCAL _GetBaseEventSinkMap(); \ virtual const AFX_EVENTSINKMAP* GetEventSinkMap() const; \ #else #define DECLARE_EVENTSINK_MAP() \
pr
ivate: \ static const AFX_EVENTSINKMAP_ENTRY _eventsinkEntries[]; \ static U
INT
_eventsinkEntryCount; \
pr
otected: \ static AFX_DATA const AFX_EVENTSINKMAP eventsinkMap; \ virtual const AFX_EVENTSINKMAP* GetEventSinkMap() const; \ #endif #endif //!_AFX_NO_OCC_SUPPORT ///////////////////////////////////////////////////////////////////////////// // OLE connection map handl
ing
(more in AFXDISP.H) #ifndef _AFX_NO_OLE_SUPPORT struct AFX_CONNECTIONMAP_ENTRY { const void* piid; // the
int
e
rface id (IID) size_t nOffset; // offset of the
int
e
rface vtable from m_unknown }; struct AFX_CONNECTIONMAP { #ifdef _AFXDLL const AFX_CONNECTIONMAP* (PASCAL* pfnGetBaseMap)(); // NULL is root class #else const AFX_CONNECTIONMAP* pBaseMap; #endif const AFX_CONNECTIONMAP_ENTRY* pEntry; // map for this class }; #ifdef _AFXDLL #define DECLARE_CONNECTION_MAP() \
pr
ivate: \ static const AFX_CONNECTIONMAP_ENTRY _connectionEntries[]; \
pr
otected: \ static AFX_DATA const AFX_CONNECTIONMAP connectionMap; \ static const AFX_CONNECTIONMAP* PASCAL _GetBaseConnectionMap(); \ virtual const AFX_CONNECTIONMAP* GetConnectionMap() const; \ #else #define DECLARE_CONNECTION_MAP() \
pr
ivate: \ static const AFX_CONNECTIONMAP_ENTRY _connectionEntries[]; \
pr
otected: \ static AFX_DATA const AFX_CONNECTIONMAP connectionMap; \ virtual const AFX_CONNECTIONMAP* GetConnectionMap() const; \ #endif #endif //!_AFX_NO_OLE_SUPPORT ///////////////////////////////////////////////////////////////////////////// // CCmdTarget
pr
oper #ifndef _AFX_NO_OCC_SUPPORT class COccManager; // forward reference (see ..\src\occimpl.h) #endif #ifdef _AFXDLL class CCmdTarget : public CObject #else class AFX_NOVTABLE CCmdTarget : public CObject #endif { DECLARE_DYNAMIC(CCmdTarget)
pr
otected: public: // Constructors CCmdTarget(); // Attributes LPDISPATCH GetIDispatch(BOOL bAddRef); // retrieve IDispatch part of CCmdTarget static CCmdTarget* PASCAL FromIDispatch(LPDISPATCH lpDispatch); // map LPDISPATCH back to CCmdTarget* (inverse of GetIDispatch) BOOL IsResultExpected(); // returns TRUE if automation function should return a value // Operations void EnableAutomation(); // call in constructor to wire up IDispatch void EnableConnections(); // call in constructor to wire up IConnectionPo
int
Container void BeginWaitCursor(); void EndWaitCursor(); void RestoreWaitCursor(); // call after messagebox #ifndef _AFX_NO_OLE_SUPPORT // dispatch OLE verbs through the message map BOOL EnumOleVerbs(LPENUMOLEVERB* ppenumOleVerb); BOOL DoOleVerb(LONG iVerb, LPMSG lpMsg, HWND hWndParent, LPCRECT l
pR
ect); #endif // Overridables // route and dispatch standard command message types // (more sophisticated than OnCommand) virtual BOOL OnCmdMsg(U
INT
nID,
int
nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); #ifndef _AFX_NO_OLE_SUPPORT // called when last OLE reference is released virtual void OnFinalRelease(); #endif #ifndef _AFX_NO_OLE_SUPPORT // called before dispatch
ing
to an automation handler function virtual BOOL IsInvokeAllowed(DISPID dispid); #endif #ifndef _AFX_NO_OLE_SUPPORT // support for OLE type libraries void EnableTypeLib(); HRESULT GetTypeInfoOfGuid(LCID lcid, const GUID& guid, LPTYPEINFO* ppTypeInfo); virtual BOOL GetDispatchIID(IID* pIID); virtual U
INT
GetTypeInfoCount(); virtual CTypeLibCache* GetTypeLibCache(); virtual HRESULT GetTypeLib(LCID lcid, LPTYPELIB* ppTypeLib); #endif // Implementation public: virtual ~CCmdTarget(); #ifdef _DEBUG virtual void Dump(CDumpContext& dc) const; virtual void AssertValid() const; #endif #ifndef _AFX_NO_OLE_SUPPORT void GetNotSupported(); void SetNotSupported(); #endif
pr
otected: friend class CView; CView* GetRout
ing
View(); CFrameWnd* GetRout
ing
Frame(); static CView* PASCAL GetRout
ing
View_(); static CFrameWnd* PASCAL GetRout
ing
Frame_(); DECLARE_MESSAGE_MAP() // base class - no {{ }} macros #ifndef _AFX_NO_DOCOBJECT_SUPPORT DECLARE_OLECMD_MAP() friend class COleCmdUI; #endif #ifndef _AFX_NO_OLE_SUPPORT DECLARE_DISPATCH_MAP() DECLARE_CONNECTION_MAP() DECLARE_
INT
E
RFACE_MAP() #ifndef _AFX_NO_OCC_SUPPORT DECLARE_EVENTSINK_MAP() #endif // !_AFX_NO_OCC_SUPPORT // OLE
int
e
rface map implementation public: // data used when CCmdTarget is made OLE aware long m_dwRef; LPUNKNOWN m_pOuterUnknown; // external controll
ing
unknown if != NULL DWORD m_xInnerUnknown; // place-holder for inner controll
ing
unknown public: // advanced operations void EnableAggregation(); // call to enable aggregation void ExternalDisconnect(); // forcib
ly
disconnect LPUNKNOWN GetControll
ing
Unknown(); // get controll
ing
IUnknown for aggregate creation // these versions do not delegate to m_pOuterUnknown DWORD
Int
e
rnalQuery
Int
e
rface(const void*, LPVOID* ppvObj); DWORD
Int
e
rnalAddRef(); DWORD
Int
e
rnalRelease(); // these versions delegate to m_pOuterUnknown DWORD ExternalQuery
Int
e
rface(const void*, LPVOID* ppvObj); DWORD ExternalAddRef(); DWORD ExternalRelease(); // implementation helpers LPUNKNOWN Get
Int
e
rface(const void*); LPUNKNOWN QueryAggregates(const void*); // advanced overrideables for implementation virtual BOOL OnCreateAggregates(); virtual LPUNKNOWN Get
Int
e
rfaceHook(const void*); // OLE automation implementation
pr
otected: struct XDispatch { DWORD m_vtbl; // place-holder for IDispatch vtable #ifndef _AFX_NO_NESTED_DERIVATION size_t m_nOffset; #endif } m_xDispatch; BOOL m_bResultExpected; // member variable-based
pr
operties void GetStandard
Pr
op(const AFX_DISPMAP_ENTRY* pEntry, VARIANT* pvarResult, U
INT
* puArgErr); SCODE SetStandard
Pr
op(const AFX_DISPMAP_ENTRY* pEntry, DISPPARAMS* pDispParams, U
INT
* puArgErr); // DISPID to dispatch map lookup static U
INT
PASCAL GetEntryCount(const AFX_DISPMAP* pDispMap); const AFX_DISPMAP_ENTRY* PASCAL GetDispEntry(LONG memid); static LONG PASCAL MemberIDFromName(const AFX_DISPMAP* pDispMap, LPCTSTR lpszName); // helpers for member function call
ing
implementation static U
INT
PASCAL GetStackSize(const BYTE* pbParams, VARTYPE vtResult); #ifdef _PPC_ SCODE PushStackArgs(BYTE* pStack, const BYTE* pbParams, void*
pR
esult, VARTYPE vtResult, DISPPARAMS* pDispParams, U
INT
* puArgErr, VARIANT* rgTempVars, U
INT
nSizeArgs); #else SCODE PushStackArgs(BYTE* pStack, const BYTE* pbParams, void*
pR
esult, VARTYPE vtResult, DISPPARAMS* pDispParams, U
INT
* puArgErr, VARIANT* rgTempVars); #endif SCODE CallMemberFunc(const AFX_DISPMAP_ENTRY* pEntry, WORD wFlags, VARIANT* pvarResult, DISPPARAMS* pDispParams, U
INT
* puArgErr); friend class COleDispatchImpl; #ifndef _AFX_NO_OCC_SUPPORT public: // OLE event sink implementation BOOL OnEvent(U
INT
idCtrl, AFX_EVENT* pEvent, AFX_CMDHANDLERINFO* pHandlerInfo);
pr
otected: const AFX_EVENTSINKMAP_ENTRY* PASCAL GetEventSinkEntry(U
INT
idCtrl, AFX_EVENT* pEvent); #endif // !_AFX_NO_OCC_SUPPORT // OLE connection implementation struct XConnPtContainer { DWORD m_vtbl; // place-holder for IConnectionPo
int
Container vtable #ifndef _AFX_NO_NESTED_DERIVATION size_t m_nOffset; #endif } m_xConnPtContainer; #ifdef _AFXDLL AFX_MODULE_STATE* m_pModuleState; friend class CInnerUnknown; friend U
INT
APIENTRY _AfxThreadEntry(void* pParam); #endif virtual BOOL GetExtraConnectionPo
int
s(CPtrArray* pConnPo
int
s); virtual LPCONNECTIONPO
INT
GetConnectionHook(const IID& iid); friend class COleConnPtContainer; #endif //!_AFX_NO_OLE_SUPPORT }; class CCmdUI // simple helper class { public: // Attributes U
INT
m_nID; U
INT
m_nIndex; // menu item or other index // if a menu item CMenu* m_pMenu; // NULL if not a menu CMenu* m_pSubMenu; // sub contain
ing
menu item // if a popup sub menu - ID is for first in popup // if from some other window CWnd* m_pOther; // NULL if a menu or not a CWnd // Operations to do in ON_UPDATE_COMMAND_UI virtual void Enable(BOOL bOn = TRUE); virtual void SetCheck(
int
nCheck = 1); // 0, 1 or 2 (indeterminate) virtual void SetRadio(BOOL bOn = TRUE); virtual void SetText(LPCTSTR lpszText); // Advanced operation void ContinueRout
ing
(); // Implementation CCmdUI(); BOOL m_bEnableChanged; BOOL m_bContinueRout
ing
; U
INT
m_nIndexMax; // last + 1 for iterat
ing
m_nIndex CMenu* m_pParentMenu; // NULL if parent menu not easi
ly
determined // (
pr
obab
ly
a secondary popup menu) BOOL DoUpdate(CCmdTarget* pTarget, BOOL bDisableIfNoHndler); }; // special CCmdUI derived classes are used for other UI paradigms // like toolbar buttons and status indicators // po
int
e
r to afx_msg member function #ifndef AFX_MSG_CALL #define AFX_MSG_CALL #endif typedef void (AFX_MSG_CALL CCmdTarget::*AFX_PMSG)(void); enum AFX_DISPMAP_FLAGS { afxDispCustom = 0, afxDispStock = 1 }; struct AFX_DISPMAP_ENTRY { LPCTSTR lpszName; // member/
pr
operty name long lDispID; // DISPID (may be DISPID_UNKNOWN) LPCSTR lpszParams; // member parameter description WORD vt; // return value type / or type of
pr
operty AFX_PMSG pfn; // normal member On or, OnGet AFX_PMSG pfnSet; // special member for OnSet size_t n
Pr
opOffset; //
pr
operty offset AFX_DISPMAP_FLAGS flags;// flags (e.g. stock/custom) }; struct AFX_EVENTSINKMAP_ENTRY { AFX_DISPMAP_ENTRY dispEntry; U
INT
nCtrlIDFirst; U
INT
nCtrlIDLast; }; // DSC Sink state/reason codes passed to MFC user event handlers enum DSCSTATE { dscNoState = 0, dscOKToDo, dscCancelled, dscSyncBefore, dscAboutToDo, dscFailedToDo, dscSyncAfter, dscDidEvent }; enum DSCREASON { dscNoReason = 0, dscClose, dscCommit, dscDelete, dscEdit, dscInsert, dscModify, dscMove }; ///////////////////////////////////////////////////////////////////////////// // CWnd implementation // structures (see afxext.h) struct CCreateContext; // context for creat
ing
th
ing
s struct C
Pr
int
Info; //
pr
int
pr
eview customization info struct AFX_MSGMAP_ENTRY { U
INT
nMessage; // windows message U
INT
nCode; // control code or WM_NOTIFY code U
INT
nID; // control ID (or 0 for windows messages) U
INT
nLastID; // used for entries specify
ing
a range of control id's U
INT
nSig; // signature type (action) or po
int
e
r to message # AFX_PMSG pfn; // routine to call (or special value) }; ///////////////////////////////////////////////////////////////////////////// // CWnd - a Microsoft Windows application window class COleDropTarget; // for more information see AFXOLE.H class COleControlContainer; class COleControlSite; // CWnd::m_nFlags (generic to CWnd) #define WF_TOOLTIPS 0x0001 // window is enabled for tooltips #define WF_TEMPHIDE 0x0002 // window is temporari
ly
hidden #define WF_STAYDISABLED 0x0004 // window should stay disabled #define WF_MODALLOOP 0x0008 //
current
ly
in modal loop #define WF_CONTINUEMODAL 0x0010 // modal loop should continue runn
ing
#define WF_OLECTLCONTAINER 0x0100 // some descendant is an OLE control #define WF_TRACK
ING
TOOLTIPS 0x0400 // window is enabled for track
ing
tooltips // CWnd::m_nFlags (specific to CFrameWnd) #define WF_STAYACTIVE 0x0020 // look active even though not active #define WF_NOPOPMSG 0x0040 // ignore WM_POPMESSAGESTR
ING
calls #define WF_MODALDISABLE 0x0080 // window is disabled #define WF_KEEPMINIACTIVE 0x0200 // stay activate even though you are deactivated // flags for CWnd::RunModalLoop #define ML
天理
相信自己怎么弄就是对的, 没人敢说你什么, 你就是天理明白没有.
Delphi
5,388
社区成员
262,730
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章