CB32 1.2 sources

This commit is contained in:
tengel 2024-03-20 09:28:18 -05:00
parent a742c26de0
commit 9305d313a9
100 changed files with 14543 additions and 0 deletions

BIN
CB32.APS Normal file

Binary file not shown.

47
CB32.PLG Normal file
View file

@ -0,0 +1,47 @@
--------------------Configuration: CB32 - Win32 Release--------------------
Begining build with project "D:\Code\Cb32\CB32.DSP", at root.
Active configuration is Win32 (x86) Application (based on Win32 (x86) Application)
Project's tools are:
"32-bit C/C++ Compiler for 80x86" with flags "/nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR"Release/" /Fp"Release/CB32.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c "
"OLE Type Library Maker" with flags "/nologo /D "NDEBUG" /mktyplib203 /win32 "
"Win32 Resource Compiler" with flags "/l 0x409 /fo"Release/CB32.res" /d "NDEBUG" "
"Browser Database Maker" with flags "/nologo /o"Release/CB32.bsc" "
"COFF Linker for 80x86" with flags "../cexpr/Release/cexpr.lib tapi32.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/CB32.pdb" /machine:I386 /out:"Release/CB32.exe" "
"Custom Build" with flags ""
"<Component 0xa>" with flags ""
Creating command line "rc.exe /l 0x409 /fo"Release/CB32.res" /d "NDEBUG" "D:\Code\Cb32\CB32.rc""
Creating temp file "E:\TEMP\RSP11.tmp" with contents <../cexpr/Release/cexpr.lib tapi32.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/CB32.pdb" /machine:I386 /out:"Release/CB32.exe"
.\Release\CB32.obj
.\Release\CB32Doc.obj
.\Release\CB32View.obj
.\Release\ColPage.obj
.\Release\ComboBar.obj
.\Release\ConvertDlg.obj
.\Release\FindDlg.obj
.\Release\GetNew.obj
.\Release\History.obj
.\Release\HyperLink.obj
.\Release\MainFrm.obj
.\Release\MyHeaderCtrl.obj
.\Release\OrdPage.obj
.\Release\Parser.obj
.\Release\PrefPage.obj
.\Release\PropAdd.obj
.\Release\PropComp.obj
.\Release\PropInfo.obj
.\Release\PropNote.obj
.\Release\PropOnline.obj
.\Release\PropPhone.obj
.\Release\SetPage.obj
.\Release\StdAfx.obj
.\Release\ToolBarEx.obj
.\Release\CB32.res>
Creating command line "link.exe @E:\TEMP\RSP11.tmp"
Compiling resources...
Linking...
CB32.exe - 0 error(s), 0 warning(s)

768
CB32.clw Normal file
View file

@ -0,0 +1,768 @@
; CLW file contains information for the MFC ClassWizard
[General Info]
Version=1
LastClass=CCB32View
LastTemplate=CPropertyPage
NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "cb32.h"
LastPage=0
ClassCount=25
Class1=CMainFrame
Class2=CPropAdd
Class3=CPropInfo
Class4=CPropNote
Class5=CPropOnline
Class6=CPropPhone
Class7=CCB32App
Class8=CAboutDlg
Class9=CCB32Doc
Class10=CCB32View
Class11=CConvertDlg
Class12=CPrefDlg
Class13=CFindDlg
Class14=CTBComboBox
Class15=CComboToolBar
ResourceCount=15
Resource1=IDD_PPAGE
Resource2=IDR_CONTEXTMENU
Resource3=IDD_ABOUTBOX
Resource4=IDD_COLPAGE
Resource5=IDD_CONVERT
Resource6=IDR_MAINFRAME
Resource7=IDD_SETPAGE
Resource8=IDR_TRAYMENU
Resource9=IDD_APAGE
Resource10=IDD_OPAGE
Class16=CProgDlg
Class17=CSetPage
Class18=CDefPage
Class19=CColPage
Class20=CPrefPage
Resource11=IDD_CPAGE
Resource12=IDD_GETNEW
Resource13=IDD_ORDPAGE
Class21=CGetNew
Class22=CPropComp
Class23=CMyHeaderCtrl
Class24=CHyperLink
Resource14=IDD_FIND
Class25=COrdPage
Resource15=IDD_NPAGE
[CLS:CMainFrame]
Type=0
BaseClass=CFrameWnd
HeaderFile=MainFrm.h
ImplementationFile=MainFrm.cpp
LastObject=ID_VIEW_FLATBAR
Filter=T
VirtualFilter=fWC
[CLS:CPropAdd]
Type=0
BaseClass=CPropertyPage
HeaderFile=PropAdd.h
ImplementationFile=PropAdd.cpp
LastObject=CPropAdd
[CLS:CPropInfo]
Type=0
BaseClass=CPropertySheet
HeaderFile=PropInfo.h
ImplementationFile=PropInfo.cpp
[CLS:CPropNote]
Type=0
BaseClass=CPropertyPage
HeaderFile=PropNote.h
ImplementationFile=PropNote.cpp
LastObject=CPropNote
[CLS:CPropOnline]
Type=0
BaseClass=CPropertyPage
HeaderFile=PropOnline.h
ImplementationFile=PropOnline.cpp
[CLS:CPropPhone]
Type=0
BaseClass=CPropertyPage
HeaderFile=PropPhone.h
ImplementationFile=PropPhone.cpp
[CLS:CCB32App]
Type=0
BaseClass=CWinApp
HeaderFile=CB32.h
ImplementationFile=CB32.cpp
LastObject=CCB32App
Filter=N
VirtualFilter=AC
[CLS:CAboutDlg]
Type=0
BaseClass=CDialog
HeaderFile=CB32.cpp
ImplementationFile=CB32.cpp
LastObject=CAboutDlg
Filter=D
VirtualFilter=dWC
[CLS:CCB32Doc]
Type=0
BaseClass=CDocument
HeaderFile=CB32Doc.h
ImplementationFile=CB32Doc.cpp
Filter=N
VirtualFilter=DC
LastObject=CCB32Doc
[CLS:CCB32View]
Type=0
BaseClass=CListView
HeaderFile=CB32View.h
ImplementationFile=CB32View.cpp
LastObject=CCB32View
Filter=C
VirtualFilter=VWC
[DLG:IDD_APAGE]
Type=1
Class=CPropAdd
ControlCount=20
Control1=IDC_FNAME,edit,1350631552
Control2=IDC_MI,edit,1350631552
Control3=IDC_LNAME,edit,1350631552
Control4=IDC_TITLE,edit,1350631552
Control5=IDC_ADD1,edit,1350631552
Control6=IDC_ADD2,edit,1350631552
Control7=IDC_CITY,edit,1350631552
Control8=IDC_STATE,edit,1350631552
Control9=IDC_ZIPCODE,edit,1350631552
Control10=IDC_COUNTRY,edit,1350631552
Control11=IDC_STATIC1,static,1342308352
Control12=IDC_STATIC,static,1342308352
Control13=IDC_STATIC,static,1342308352
Control14=IDC_STATIC,static,1342308352
Control15=IDC_STATIC,static,1342308352
Control16=IDC_STATIC,static,1342308352
Control17=IDC_STATIC,static,1342308352
Control18=IDC_STATIC,static,1342308352
Control19=IDC_STATIC,static,1342308352
Control20=IDC_STATIC,static,1342308352
[DLG:IDD_NPAGE]
Type=1
Class=CPropNote
ControlCount=1
Control1=IDC_NOTES,edit,1350635524
[DLG:IDD_OPAGE]
Type=1
Class=CPropOnline
ControlCount=8
Control1=IDC_STATIC,static,1342308352
Control2=IDC_STATIC,static,1342308352
Control3=IDC_STATIC,static,1342308352
Control4=IDC_STATIC,static,1342308352
Control5=IDC_EMAIL1,edit,1350631552
Control6=IDC_EMAIL2,edit,1350631552
Control7=IDC_WEB1,edit,1350631552
Control8=IDC_WEB2,edit,1350631552
[DLG:IDD_PPAGE]
Type=1
Class=CPropPhone
ControlCount=22
Control1=IDC_HPHONE,edit,1350631552
Control2=IDC_HPHONEX,edit,1350631552
Control3=IDC_WPHONE,edit,1350631552
Control4=IDC_WPHONEX,edit,1350631552
Control5=IDC_PAGER,edit,1350631552
Control6=IDC_PAGERX,edit,1350631552
Control7=IDC_PAGERC,edit,1350631552
Control8=IDC_FAX,edit,1350631552
Control9=IDC_FAXX,edit,1350631552
Control10=IDC_CELLULAR,edit,1350631552
Control11=IDC_CELLULARX,edit,1350631552
Control12=IDC_STATIC,static,1342308352
Control13=IDC_STATIC,static,1342308352
Control14=IDC_STATIC,static,1342308352
Control15=IDC_STATIC,static,1342308352
Control16=IDC_STATIC,static,1342308352
Control17=IDC_STATIC,static,1342308352
Control18=IDC_STATIC,static,1342308352
Control19=IDC_STATIC,static,1342308352
Control20=IDC_STATIC,static,1342308352
Control21=IDC_STATIC,static,1342308352
Control22=IDC_STATIC,static,1342308352
[DLG:IDD_ABOUTBOX]
Type=1
Class=CAboutDlg
ControlCount=8
Control1=IDC_STATIC,static,1342177283
Control2=IDC_STATIC,static,1342308480
Control3=IDC_MYEMAIL,static,1342177793
Control4=IDOK,button,1342373889
Control5=IDC_STATIC,static,1342308352
Control6=IDC_STATIC,static,1342308352
Control7=IDC_MYWEB,static,1342308865
Control8=IDC_STATIC,button,1342177287
[ACL:IDR_MAINFRAME]
Type=1
Class=?
Command1=ID_ENTRY_COPY
Command2=ID_EDIT_FIND
Command3=ID_FILE_NEW
Command4=ID_FILE_OPEN
Command5=ID_FILE_PRINT
Command6=ID_FILE_SAVE
Command7=ID_EDIT_PASTE
Command8=ID_EDIT_UNDO
Command9=ID_ENTRY_DELETE
Command10=ID_EDIT_CUT
Command11=ID_HELP_INDEX
Command12=ID_CONTEXT_HELP
Command13=ID_VIEW_FIND_NEXT
Command14=ID_EDIT_FIND_COMBO
Command15=ID_NEXT_PANE
Command16=ID_PREV_PANE
Command17=ID_ENTRY_ADD
Command18=ID_EDIT_COPY
Command19=ID_EDIT_PASTE
Command20=ID_ENTRY_EDIT
Command21=ID_EDIT_CUT
Command22=ID_EDIT_UNDO
CommandCount=22
[TB:IDR_MAINFRAME]
Type=1
Class=?
Command1=ID_FILE_NEW
Command2=ID_FILE_OPEN
Command3=ID_FILE_SAVE
Command4=ID_ENTRY_ADD
Command5=ID_ENTRY_EDIT
Command6=ID_ENTRY_DELETE
Command7=ID_ENTRY_COPY
Command8=ID_EDIT_FIND
Command9=ID_TBAR_DIAL
Command10=ID_TBAR_EMAIL
Command11=ID_TBAR_WEB
Command12=ID_APP_PREFS
Command13=ID_HELP_INDEX
CommandCount=13
[MNU:IDR_MAINFRAME]
Type=1
Class=?
Command1=ID_FILE_NEW
Command2=ID_FILE_OPEN
Command3=ID_FILE_SAVE
Command4=ID_FILE_SAVE_AS
Command5=ID_IMPORT_CSV
Command6=ID_IMPORT_TAB
Command7=ID_EXPORT_CSV
Command8=ID_EXPORT_TAB
Command9=ID_FILE_MRU_FILE1
Command10=ID_APP_EXIT
Command11=ID_EDIT_FIND
Command12=ID_VIEW_FIND_NEXT
Command13=ID_APP_PREFS
Command14=ID_ENTRY_ADD
Command15=ID_ENTRY_EDIT
Command16=ID_ENTRY_DELETE
Command17=ID_ENTRY_COPY
Command18=ID_DIAL_HOME
Command19=ID_DIAL_WORK
Command20=ID_DIAL_PAGER
Command21=ID_DIAL_FAX
Command22=ID_DIAL_CELL
Command23=ID_EMAIL_ADD1
Command24=ID_EMAIL_ADD2
Command25=ID_URL1
Command26=ID_URL2
Command27=ID_VIEW_TOOLBAR
Command28=ID_VIEW_STATUS_BAR
Command29=ID_VIEW_FLATBAR
Command30=ID_VIEW_WNDPOS
Command31=ID_VIEW_COLSET
Command32=ID_VIEW_COLPOS
Command33=ID_HELP_INDEX
Command34=ID_APP_ABOUT
CommandCount=34
[DLG:IDD_CONVERT]
Type=1
Class=CConvertDlg
ControlCount=100
Control1=IDOK,button,1342242817
Control2=IDCANCEL,button,1342242816
Control3=IDC_XLNAME,edit,1350631552
Control4=IDC_SPINXLNAME,msctls_updown32,1342177334
Control5=IDC_XFNAME,edit,1350631552
Control6=IDC_SPINXFNAME,msctls_updown32,1342177334
Control7=IDC_XMI,edit,1350631552
Control8=IDC_SPINXMI,msctls_updown32,1342177334
Control9=IDC_XTITLE,edit,1350631552
Control10=IDC_SPINXTITLE,msctls_updown32,1342177334
Control11=IDC_XADD1,edit,1350631552
Control12=IDC_SPINXADD1,msctls_updown32,1342177334
Control13=IDC_XADD2,edit,1350631552
Control14=IDC_SPINXADD2,msctls_updown32,1342177334
Control15=IDC_XCITY,edit,1350631552
Control16=IDC_SPINXCITY,msctls_updown32,1342177334
Control17=IDC_XCOUNTRY,edit,1350631552
Control18=IDC_SPINXCOUNTRY,msctls_updown32,1342177334
Control19=IDC_XSTATE,edit,1350631552
Control20=IDC_SPINXSTATE,msctls_updown32,1342177334
Control21=IDC_XZIP,edit,1350631552
Control22=IDC_SPINXZIP,msctls_updown32,1342177334
Control23=IDC_XCOMP,edit,1350631552
Control24=IDC_SPINXCOMP,msctls_updown32,1342177334
Control25=IDC_XDEPT,edit,1350631552
Control26=IDC_SPINXDEPT,msctls_updown32,1342177334
Control27=IDC_XPOSN,edit,1350631552
Control28=IDC_SPINXPOSN,msctls_updown32,1342177334
Control29=IDC_XMGR,edit,1350631552
Control30=IDC_SPINXMGR,msctls_updown32,1342177334
Control31=IDC_XCADD1,edit,1350631552
Control32=IDC_SPINXCADD1,msctls_updown32,1342177334
Control33=IDC_XCADD2,edit,1350631552
Control34=IDC_SPINXCADD2,msctls_updown32,1342177334
Control35=IDC_XHOMEP,edit,1350631552
Control36=IDC_SPINXHOMEP,msctls_updown32,1342177334
Control37=IDC_XHOMEPX,edit,1350631552
Control38=IDC_SPINXHOMEPX,msctls_updown32,1342177334
Control39=IDC_XWORKP,edit,1350631552
Control40=IDC_SPINXWORKP,msctls_updown32,1342177334
Control41=IDC_XWORKPX,edit,1350631552
Control42=IDC_SPINXWORKPX,msctls_updown32,1342177334
Control43=IDC_XCELL,edit,1350631552
Control44=IDC_SPINXCELL,msctls_updown32,1342177334
Control45=IDC_XCELLX,edit,1350631552
Control46=IDC_SPINXCELLX,msctls_updown32,1342177334
Control47=IDC_XPAGER,edit,1350631552
Control48=IDC_SPINXPAGER,msctls_updown32,1342177334
Control49=IDC_XPAGERC,edit,1350631552
Control50=IDC_SPINXPAGERC,msctls_updown32,1342177334
Control51=IDC_XPAGERX,edit,1350631552
Control52=IDC_SPINXPAGERX,msctls_updown32,1342177334
Control53=IDC_XFAX,edit,1350631552
Control54=IDC_SPINXFAX,msctls_updown32,1342177334
Control55=IDC_XFAXX,edit,1350631552
Control56=IDC_SPINXFAXX,msctls_updown32,1342177334
Control57=IDC_XEMAIL1,edit,1350631552
Control58=IDC_SPINXEMAIL1,msctls_updown32,1342177334
Control59=IDC_XEMAIL2,edit,1350631552
Control60=IDC_SPINXEMAIL2,msctls_updown32,1342177334
Control61=IDC_XWEB1,edit,1350631552
Control62=IDC_SPINXWEB1,msctls_updown32,1342177334
Control63=IDC_XWEB2,edit,1350631552
Control64=IDC_SPINXWEB2,msctls_updown32,1342177334
Control65=IDC_XNOTES,edit,1350631552
Control66=IDC_SPINXNOTES,msctls_updown32,1342177334
Control67=IDC_STATIC,static,1342308352
Control68=IDC_STATIC,static,1342308352
Control69=IDC_STATIC,static,1342308352
Control70=IDC_STATIC,static,1342308352
Control71=IDC_STATIC,static,1342308352
Control72=IDC_STATIC,static,1342308352
Control73=IDC_STATIC,static,1342308352
Control74=IDC_STATIC,static,1342308352
Control75=IDC_STATIC,static,1342308352
Control76=IDC_STATIC,static,1342308352
Control77=IDC_STATIC,static,1342308352
Control78=IDC_STATIC,static,1342308352
Control79=IDC_STATIC,static,1342308352
Control80=IDC_STATIC,static,1342308352
Control81=IDC_STATIC,static,1342308352
Control82=IDC_STATIC,static,1342308352
Control83=IDC_STATIC,static,1342308352
Control84=IDC_STATIC,static,1342308352
Control85=IDC_STATIC,static,1342308352
Control86=IDC_STATIC,static,1342308352
Control87=IDC_STATIC,static,1342308352
Control88=IDC_STATIC,static,1342308352
Control89=IDC_STATIC,static,1342308352
Control90=IDC_STATIC,static,1342308352
Control91=IDC_STATIC,static,1342308352
Control92=IDC_STATIC,static,1342308352
Control93=IDC_STATIC,static,1342308352
Control94=IDC_STATIC,static,1342308352
Control95=IDC_STATIC,static,1342308352
Control96=IDC_STATIC,static,1342308352
Control97=IDC_STATIC,static,1342308352
Control98=IDC_STATIC,static,1342308352
Control99=IDC_XLINE1,edit,1352730628
Control100=IDC_STATIC,static,1342177296
[CLS:CConvertDlg]
Type=0
HeaderFile=ConvertDlg.h
ImplementationFile=ConvertDlg.cpp
BaseClass=CDialog
Filter=D
LastObject=IDC_XTITLE
VirtualFilter=dWC
[CLS:CPrefDlg]
Type=0
HeaderFile=PrefDlg.h
ImplementationFile=PrefDlg.cpp
BaseClass=CDialog
Filter=D
VirtualFilter=dWC
LastObject=CPrefDlg
[DLG:IDD_FIND]
Type=1
Class=CFindDlg
ControlCount=11
Control1=IDC_COMBO1,combobox,1344339970
Control2=IDC_FCOMBO,combobox,1344339971
Control3=IDC_RADIO1,button,1342373897
Control4=IDC_RADIO2,button,1342242825
Control5=IDC_CHECK1,button,1342373891
Control6=IDC_CHECK2,button,1342373891
Control7=ID_EDIT_FIND_NEXT,button,1342242817
Control8=IDCANCEL,button,1342242816
Control9=IDC_STATIC,static,1342177280
Control10=IDC_STATIC,button,1342177287
Control11=IDC_STATIC,button,1342177287
[CLS:CFindDlg]
Type=0
HeaderFile=FindDlg.h
ImplementationFile=FindDlg.cpp
BaseClass=CDialog
Filter=D
LastObject=IDC_FCOMBO
VirtualFilter=dWC
[CLS:CTBComboBox]
Type=0
HeaderFile=ComboBar.h
ImplementationFile=ComboBar.cpp
BaseClass=CComboBox
Filter=W
LastObject=CTBComboBox
VirtualFilter=cWC
[CLS:CComboToolBar]
Type=0
HeaderFile=combobar.h
ImplementationFile=combobar.cpp
BaseClass=CToolBarEx
LastObject=CComboToolBar
[CLS:CProgDlg]
Type=0
HeaderFile=ProgDlg.h
ImplementationFile=ProgDlg.cpp
BaseClass=CDialog
Filter=D
VirtualFilter=dWC
LastObject=CProgDlg
[DLG:IDD_COLPAGE]
Type=1
Class=CColPage
ControlCount=99
Control1=IDC_CLNAME,edit,1350631552
Control2=IDC_SPINCLNAME,msctls_updown32,1342177334
Control3=IDC_CFNAME,edit,1350631552
Control4=IDC_SPINCFNAME,msctls_updown32,1342177334
Control5=IDC_CMI,edit,1350631552
Control6=IDC_SPINCMI,msctls_updown32,1342177334
Control7=IDC_CTITLE,edit,1350631552
Control8=IDC_SPINCTITLE,msctls_updown32,1342177334
Control9=IDC_CADD1,edit,1350631552
Control10=IDC_SPINCADD1,msctls_updown32,1342177334
Control11=IDC_CADD2,edit,1350631552
Control12=IDC_SPINCADD2,msctls_updown32,1342177334
Control13=IDC_CCITY,edit,1350631552
Control14=IDC_SPINCCITY,msctls_updown32,1342177334
Control15=IDC_CCOUNTRY,edit,1350631552
Control16=IDC_SPINCCOUNTRY,msctls_updown32,1342177334
Control17=IDC_CSTATE,edit,1350631552
Control18=IDC_SPINCSTATE,msctls_updown32,1342177334
Control19=IDC_CZIP,edit,1350631552
Control20=IDC_SPINCZIP,msctls_updown32,1342177334
Control21=IDC_CCOMP,edit,1350631552
Control22=IDC_SPINCCOMP,msctls_updown32,1342177334
Control23=IDC_CDEPT,edit,1350631552
Control24=IDC_SPINCDEPT,msctls_updown32,1342177334
Control25=IDC_CPOSN,edit,1350631552
Control26=IDC_SPINCPOSN,msctls_updown32,1342177334
Control27=IDC_CMGR,edit,1350631552
Control28=IDC_SPINCMGR,msctls_updown32,1342177334
Control29=IDC_CCADD1,edit,1350631552
Control30=IDC_SPINCCADD1,msctls_updown32,1342177334
Control31=IDC_CCADD2,edit,1350631552
Control32=IDC_SPINCCADD2,msctls_updown32,1342177334
Control33=IDC_CHOMEP,edit,1350631552
Control34=IDC_SPINCHOMEP,msctls_updown32,1342177334
Control35=IDC_CHOMEPX,edit,1350631552
Control36=IDC_SPINCHOMEPX,msctls_updown32,1342177334
Control37=IDC_CWORKP,edit,1350631552
Control38=IDC_SPINCWORKP,msctls_updown32,1342177334
Control39=IDC_CWORKPX,edit,1350631552
Control40=IDC_SPINCWORKPX,msctls_updown32,1342177334
Control41=IDC_CCELL,edit,1350631552
Control42=IDC_SPINCCELL,msctls_updown32,1342177334
Control43=IDC_CCELLX,edit,1350631552
Control44=IDC_SPINCCELLX,msctls_updown32,1342177334
Control45=IDC_CPAGER,edit,1350631552
Control46=IDC_SPINCPAGER,msctls_updown32,1342177334
Control47=IDC_CPAGERC,edit,1350631552
Control48=IDC_SPINCPAGERC,msctls_updown32,1342177334
Control49=IDC_CPAGERX,edit,1350631552
Control50=IDC_SPINCPAGERX,msctls_updown32,1342177334
Control51=IDC_CFAX,edit,1350631552
Control52=IDC_SPINCFAX,msctls_updown32,1342177334
Control53=IDC_CFAXX,edit,1350631552
Control54=IDC_SPINCFAXX,msctls_updown32,1342177334
Control55=IDC_CEMAIL1,edit,1350631552
Control56=IDC_SPINCEMAIL1,msctls_updown32,1342177334
Control57=IDC_CEMAIL2,edit,1350631552
Control58=IDC_SPINCEMAIL2,msctls_updown32,1342177334
Control59=IDC_CWEB1,edit,1350631552
Control60=IDC_SPINCWEB1,msctls_updown32,1342177334
Control61=IDC_CWEB2,edit,1350631552
Control62=IDC_SPINCWEB2,msctls_updown32,1342177334
Control63=IDC_STATIC,static,1342308352
Control64=IDC_STATIC,static,1342308352
Control65=IDC_STATIC,static,1342308352
Control66=IDC_STATIC,static,1342308352
Control67=IDC_STATIC,static,1342308352
Control68=IDC_STATIC,static,1342308352
Control69=IDC_STATIC,static,1342308352
Control70=IDC_STATIC,static,1342308352
Control71=IDC_STATIC,static,1342308352
Control72=IDC_STATIC,static,1342308352
Control73=IDC_STATIC,static,1342308352
Control74=IDC_STATIC,static,1342308352
Control75=IDC_STATIC,static,1342308352
Control76=IDC_STATIC,static,1342308352
Control77=IDC_STATIC,static,1342308352
Control78=IDC_STATIC,static,1342308352
Control79=IDC_STATIC,static,1342308352
Control80=IDC_STATIC,static,1342308352
Control81=IDC_STATIC,static,1342308352
Control82=IDC_STATIC,static,1342308352
Control83=IDC_STATIC,static,1342308352
Control84=IDC_STATIC,static,1342308352
Control85=IDC_STATIC,static,1342308352
Control86=IDC_STATIC,static,1342308352
Control87=IDC_STATIC,static,1342308352
Control88=IDC_STATIC,static,1342308352
Control89=IDC_STATIC,static,1342308352
Control90=IDC_STATIC,static,1342308352
Control91=IDC_STATIC,static,1342308352
Control92=IDC_STATIC,static,1342308352
Control93=IDC_STATIC,static,1342308352
Control94=IDC_STATIC,static,1342308353
Control95=IDC_CNOTES,edit,1350631552
Control96=IDC_SPINCNOTES,msctls_updown32,1342177334
Control97=IDC_STATIC,static,1342308352
Control98=IDC_RESETSIZE,button,1342242816
Control99=IDC_STATIC,button,1342177287
[DLG:IDD_SETPAGE]
Type=1
Class=CSetPage
ControlCount=34
Control1=IDC_SETLASTFILE,button,1342242819
Control2=IDC_SETSORT,button,1342242819
Control3=IDC_SETCOL,button,1342242819
Control4=IDC_SETPOS,button,1342242819
Control5=IDC_SETIMP,button,1342242819
Control6=IDC_SETEXP,button,1342242819
Control7=IDC_SETWIN,button,1342242819
Control8=IDC_SETDELETE,button,1342242819
Control9=IDC_SETUSEMRU,button,1342242819
Control10=IDC_SETMRU,edit,1350631552
Control11=IDC_SPINSETMRU,msctls_updown32,1342177334
Control12=IDC_SETTRAY,button,1342242819
Control13=IDC_SETSTART,button,1342242819
Control14=IDC_SETCITY,edit,1350631552
Control15=IDC_SETSTATE,edit,1350631552
Control16=IDC_SETCOUNTRY,edit,1350631552
Control17=IDC_SETZIP,edit,1350631552
Control18=IDC_SETPREFIX,edit,1350631552
Control19=IDC_SETCOMP,edit,1350631552
Control20=IDC_SETEMAIL,edit,1350631552
Control21=IDC_SETWEB,edit,1350631552
Control22=IDC_STATIC,button,1342177287
Control23=IDC_STATIC,button,1342177287
Control24=IDC_STATIC,static,1342177280
Control25=IDC_STATIC,button,1342177287
Control26=IDC_STATIC,static,1342308352
Control27=IDC_STATIC,static,1342308352
Control28=IDC_STATIC,static,1342308352
Control29=IDC_STATIC,static,1342308352
Control30=IDC_STATIC,static,1342308352
Control31=IDC_STATIC,static,1342308352
Control32=IDC_STATIC,static,1342308352
Control33=IDC_STATIC,static,1342308352
Control34=IDC_STATIC,button,1342177287
[CLS:CSetPage]
Type=0
HeaderFile=SetPage.h
ImplementationFile=SetPage.cpp
BaseClass=CPropertyPage
Filter=D
LastObject=IDC_SETDELETE
VirtualFilter=idWC
[CLS:CDefPage]
Type=0
HeaderFile=DefPage.h
ImplementationFile=DefPage.cpp
BaseClass=CPropertyPage
Filter=D
LastObject=CDefPage
VirtualFilter=idWC
[CLS:CColPage]
Type=0
HeaderFile=ColPage.h
ImplementationFile=ColPage.cpp
BaseClass=CPropertyPage
Filter=D
LastObject=CColPage
VirtualFilter=idWC
[CLS:CPrefPage]
Type=0
HeaderFile=PrefPage.h
ImplementationFile=PrefPage.cpp
BaseClass=CPropertySheet
Filter=W
LastObject=CPrefPage
[MNU:IDR_TRAYMENU]
Type=1
Class=?
Command1=ID_TRAY_SHOW
Command2=ID_APP_PREFS
Command3=ID_APP_ABOUT
Command4=ID_HELP_INDEX
Command5=ID_TRAY_EXIT
Command6=ID_DIAL_HOME
Command7=ID_DIAL_WORK
Command8=ID_DIAL_PAGER
Command9=ID_DIAL_FAX
Command10=ID_DIAL_CELL
Command11=ID_EMAIL_ADD1
Command12=ID_EMAIL_ADD2
Command13=ID_URL1
Command14=ID_URL2
CommandCount=14
[MNU:IDR_CONTEXTMENU]
Type=1
Class=?
Command1=ID_EDIT_FIND
Command2=ID_ENTRY_ADD
Command3=ID_ENTRY_EDIT
Command4=ID_ENTRY_DELETE
Command5=ID_ENTRY_COPY
Command6=ID_DIAL_HOME
Command7=ID_DIAL_WORK
Command8=ID_DIAL_PAGER
Command9=ID_DIAL_FAX
Command10=ID_DIAL_CELL
Command11=ID_EMAIL_ADD1
Command12=ID_EMAIL_ADD2
Command13=ID_URL1
Command14=ID_URL2
Command15=ID_APP_PREFS
CommandCount=15
[DLG:IDD_GETNEW]
Type=1
Class=CGetNew
ControlCount=5
Control1=IDC_NEWINFO,edit,1350631552
Control2=IDC_ADDINFO,button,1342242819
Control3=IDOK,button,1342242817
Control4=IDCANCEL,button,1342242816
Control5=IDC_STATIC,static,1342308352
[CLS:CGetNew]
Type=0
HeaderFile=GetNew.h
ImplementationFile=GetNew.cpp
BaseClass=CDialog
Filter=D
VirtualFilter=dWC
LastObject=CGetNew
[DLG:IDD_CPAGE]
Type=1
Class=CPropComp
ControlCount=12
Control1=IDC_COMP,edit,1350631552
Control2=IDC_DEPT,edit,1350631552
Control3=IDC_POSN,edit,1350631552
Control4=IDC_MGR,edit,1350631552
Control5=IDC_CADD1,edit,1350631552
Control6=IDC_CADD2,edit,1350631552
Control7=IDC_STATIC,static,1342177280
Control8=IDC_STATIC,static,1342308352
Control9=IDC_STATIC,static,1342308352
Control10=IDC_STATIC,static,1342308352
Control11=IDC_STATIC,static,1342308352
Control12=IDC_STATIC,static,1342308352
[CLS:CPropComp]
Type=0
HeaderFile=PropComp.h
ImplementationFile=PropComp.cpp
BaseClass=CPropertyPage
Filter=D
VirtualFilter=idWC
LastObject=CPropComp
[CLS:CMyHeaderCtrl]
Type=0
HeaderFile=MyHeaderCtrl.h
ImplementationFile=MyHeaderCtrl.cpp
BaseClass=CHeaderCtrl
Filter=W
LastObject=CMyHeaderCtrl
[CLS:CHyperLink]
Type=0
HeaderFile=HyperLink.h
ImplementationFile=HyperLink.cpp
BaseClass=CStatic
Filter=W
LastObject=CHyperLink
[DLG:IDD_ORDPAGE]
Type=1
Class=COrdPage
ControlCount=4
Control1=IDC_COLBOX,listbox,1352732673
Control2=IDC_COLUP,button,1342242816
Control3=IDC_COLDOWN,button,1342242816
Control4=IDC_RESETCOL,button,1342242816
[CLS:COrdPage]
Type=0
HeaderFile=OrdPage.h
ImplementationFile=OrdPage.cpp
BaseClass=CPropertyPage
Filter=D
VirtualFilter=idWC
LastObject=IDC_RESETCOL

276
CB32.cpp Normal file
View file

@ -0,0 +1,276 @@
// CB32.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "CB32.h"
#include "ComboBar.h"
#include "MainFrm.h"
#include "CB32Doc.h"
#include "CB32View.h"
#include "HyperLink.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCB32App
BEGIN_MESSAGE_MAP(CCB32App, CWinApp)
//{{AFX_MSG_MAP(CCB32App)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
ON_COMMAND(ID_HELP_INDEX, OnHelpIndex)
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCB32App construction
CCB32App::CCB32App()
{
m_inStart = TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CCB32App object
CCB32App theApp;
/////////////////////////////////////////////////////////////////////////////
// CCB32App initialization
BOOL CCB32App::InitInstance()
{
// find the location of the exe from Help File Path
CString sHelp, sIni;
sHelp = m_pszHelpFilePath;
sIni = sHelp.Left(sHelp.ReverseFind('.'));
sIni += ".INI";
free((void*)m_pszProfileName);
m_pszProfileName = _tcsdup((LPCSTR)sIni);
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Load standard INI file options (including MRU)
if (GetProfileInt(_T("Preferences"),_T("UseMRU"),1))
LoadStdProfileSettings(GetProfileInt(_T("Preferences"),
_T("NumMRU"),2));
else
LoadStdProfileSettings(0);
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CCB32Doc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CCB32View));
AddDocTemplate(pDocTemplate);
// Enable DDE Execute open
EnableShellOpen();
RegisterShellFileTypes(TRUE);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Are we starting minimized?
theApp.m_nCmdShow = !GetProfileInt(_T("Preferences"),_T("StartMinimized"),0);
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// set flag for status messages - AFTER ProcessShellCommand
m_inStart = FALSE;
// Enable drag/drop open
m_pMainWnd->DragAcceptFiles();
// Force immediate refresh
AfxGetMainWnd()->UpdateWindow();
// grab last document
if (m_lpCmdLine[0] == '\0')
{
// Open file name saved in private INI file.
if (GetProfileInt(_T("Preferences"),_T("UseLastBook"),0))
{
CString strDocPath = GetDocPathFromIniFile();
if (!strDocPath.IsEmpty())
{
SetStatusMsg(IDS_LOADING);
theApp.m_nCmdShow = !GetProfileInt(_T("Preferences"),_T("StartMinimized"),0);
OpenDocumentFile(strDocPath);
}
}
}
return TRUE;
}
int CCB32App::ExitInstance()
{
int nReturn = CWinApp::ExitInstance();
//free((void*)m_pszExeName);
//free((void*)m_pszAppName);
//free((void*)m_pszHelpFilePath);
//free((void*)m_pszProfileName);
return nReturn;
}
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
CHyperLink m_WebLink;
CHyperLink m_HyperLink;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
DDX_Control(pDX, IDC_MYWEB, m_WebLink);
DDX_Control(pDX, IDC_MYEMAIL, m_HyperLink);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
// App command to run the dialog
void CCB32App::OnAppAbout()
{
CAboutDlg aboutDlg;
aboutDlg.DoModal();
}
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_HyperLink.SetURL(_T("mailto:tengel@sonic.net"));
m_HyperLink.SetColours(m_HyperLink.GetLinkColour(), RGB(255,0,0));
m_HyperLink.SetUnderline(FALSE);
m_HyperLink.SetLinkCursor(AfxGetApp()->LoadCursor(IDC_HAND1));
m_WebLink.SetURL(_T("http://www.sonic.net/~tengel/ContactBook"));
m_WebLink.SetColours(m_HyperLink.GetLinkColour(), RGB(255,0,0));
m_WebLink.SetUnderline(FALSE);
m_WebLink.SetLinkCursor(AfxGetApp()->LoadCursor(IDC_HAND1));
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
/////////////////////////////////////////////////////////////////////////////
// CCB32App commands
/////////////////////////////////////////////////////////////////////////////
// INI file implementation
static TCHAR BASED_CODE szIniFileSection[] = _T("AddressBookInUse");
static TCHAR BASED_CODE szIniFileEntry[] = _T("File");
void CCB32App::UpdateIniFileWithDocPath(LPCTSTR lpszPathName)
{
WriteProfileString(szIniFileSection, szIniFileEntry,
lpszPathName);
}
CString CCB32App::GetDocPathFromIniFile()
{
return GetProfileString(szIniFileSection, szIniFileEntry, NULL);
}
void CCB32App::SetStatusMsg(UINT umsg)
{
CString strTemp;
if (!strTemp.LoadString(umsg))
return;
SetStatusMsg(strTemp);
}
void CCB32App::SetStatusMsg(CString msg)
{
if (!m_inStart)
{
CStatusBar& statusBar = ((CMainFrame *)m_pMainWnd)->GetStatusBar();
statusBar.SetPaneText(0, msg, TRUE);
AfxGetMainWnd()->UpdateWindow();
}
}
void CCB32App::OnHelpIndex()
{
CWinApp::OnHelpIndex();
}
BOOL CCB32App::OnIdle(LONG lCount)
{
// call the base class
BOOL bBaseIdle = CWinApp::OnIdle(lCount);
BOOL bMoreIdle = TRUE;
if (lCount == 0)
{
// more important idle time processing
}
else if (lCount == 100)
{
// less important idle time processing
}
else if (lCount == 1000)
{
// occasional tasks during idle
bMoreIdle = bBaseIdle;
}
// return FALSE when there is no more idle processing to do
return bMoreIdle;
}

69
CB32.h Normal file
View file

@ -0,0 +1,69 @@
// CB32.h : main header file for the CB32 application
//
#if !defined(AFX_CB32_H__20BFD1E7_4F52_11D1_AF86_000000000000__INCLUDED_)
#define AFX_CB32_H__20BFD1E7_4F52_11D1_AF86_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
// #include <Str.h> // why not...
// application defines
#define COMBO_HEIGHT 100 // width of edit control for combobox
#define COMBO_WIDTH 160 // drop down height
#define HISTORY_COUNT 10 // number of entries for the last search selections
#define TIMER_ID 2 // timer ID for clock on status bar
/////////////////////////////////////////////////////////////////////////////
// CCB32App:
// See CB32.cpp for the implementation of this class
//
class CCB32App : public CWinApp
{
public:
virtual BOOL OnIdle(LONG lCount);
CCB32App();
// Operations
public:
void UpdateIniFileWithDocPath(LPCTSTR lpszPathName);
void SetStatusMsg(UINT umsg);
void SetStatusMsg(CString msg);
protected:
BOOL m_inStart;
CString GetDocPathFromIniFile();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCB32App)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CCB32App)
afx_msg void OnAppAbout();
afx_msg void OnHelpIndex();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
extern CCB32App theApp;
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CB32_H__20BFD1E7_4F52_11D1_AF86_000000000000__INCLUDED_)

1229
CB32.rc Normal file

File diff suppressed because it is too large Load diff

14
CB32.reg Normal file
View file

@ -0,0 +1,14 @@
REGEDIT
; This .REG file may be used by your SETUP program.
; If a SETUP program is not available, the entries below will be
; registered in your InitInstance automatically with a call to
; CWinApp::RegisterShellFileTypes and COleObjectFactory::UpdateRegistryAll.
HKEY_CLASSES_ROOT\.cbd = CB32.Document
HKEY_CLASSES_ROOT\CB32.Document\shell\open\command = CB32.EXE %1
HKEY_CLASSES_ROOT\CB32.Document\shell\open\ddeexec = [open("%1")]
HKEY_CLASSES_ROOT\CB32.Document\shell\open\ddeexec\application = CB32
; note: the application is optional
; (it defaults to the app name in "command")
HKEY_CLASSES_ROOT\CB32.Document = CB32 Document

1063
CB32Doc.cpp Normal file

File diff suppressed because it is too large Load diff

69
CB32Doc.h Normal file
View file

@ -0,0 +1,69 @@
// CB32Doc.h : interface of the CCB32Doc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CB32DOC_H__20BFD1ED_4F52_11D1_AF86_000000000000__INCLUDED_)
#define AFX_CB32DOC_H__20BFD1ED_4F52_11D1_AF86_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "..\cexpr\cexpr.h"
class CCB32Doc : public CDocument
{
protected: // create from serialization only
CCB32Doc();
DECLARE_DYNCREATE(CCB32Doc)
// Attributes
public:
CExprDatabase db;
// Operations
public:
inline CExprDatabase& GetDB() { return db; }
protected:
void UpdateIniFileWithDocPath(LPCTSTR lpszPathName);
BOOL FileImport(CString, char*, char*);
BOOL FileExport(CString, char*);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCB32Doc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCB32Doc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CCB32Doc)
afx_msg void OnImportCsv();
afx_msg void OnImportTab();
afx_msg void OnExportCsv();
afx_msg void OnExportTab();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CB32DOC_H__20BFD1ED_4F52_11D1_AF86_000000000000__INCLUDED_)

2695
CB32View.cpp Normal file

File diff suppressed because it is too large Load diff

166
CB32View.h Normal file
View file

@ -0,0 +1,166 @@
// CB32View.h : interface of the CCB32View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CB32VIEW_H__20BFD1EF_4F52_11D1_AF86_000000000000__INCLUDED_)
#define AFX_CB32VIEW_H__20BFD1EF_4F52_11D1_AF86_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define COLS 32 // number of columns + 1
class CFindDlg; // forward declarations
#include "history.h"
#include "PropInfo.h"
#include "MyHeaderCtrl.h"
class CCB32View : public CListView
{
protected: // create from serialization only
CCB32View();
DECLARE_DYNCREATE(CCB32View)
// Attributes
public:
CCB32Doc* GetDocument();
CFindDlg* m_pFindDialog; // find dialog
CHistoryList m_searchHistory; // last used search history list
CMyHeaderCtrl m_headerctrl;
CStringArray arLabel;
protected:
int m_iFirst;
int nSortedCol;
BOOL bSortAscending;
int m_nCharWidth;
int m_nRowHeight;
int m_nRowsPerPage;
int m_nHighlight;
CFont m_PrinterFont;
// Operations
public:
void MakeDatabase();
void AddDatabase();
void SortDatabase();
void OnViewFindNext(CString &s1);
CString Sub(const CString& from, const CString& to, CString& str);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCB32View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCB32View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
void DrawItemText (CDC*, CString, CRect, int, int);
BOOL AddDocItemToListView (CExpr*);
BOOL AddItemToListView (CStringArray*);
BOOL UpdateItemInListView (CStringArray*, int);
void FreeItems ();
BOOL GetPropData (CStringArray*, CPropInfo&);
BOOL SetPropData (CPropInfo&, CStringArray*);
void TryToCall(CString&, CString);
void TryToLaunch(CString&, CString);
void LaunchShortcut(CString);
static int CALLBACK CompareFuncAsc (LPARAM, LPARAM, LPARAM);
static int CALLBACK CompareFuncDec (LPARAM, LPARAM, LPARAM);
BOOL MakeExpr (CExpr*, CStringArray*);
void FindNextItem(CString, int, int, BOOL, int);
void DragColumn(int source, int dest);
void SaveColPos();
void SetupColumns();
void PrintColumnHeadings(CDC *pDC, CPrintInfo *pInfo);
void PrintHeader(CDC *pDC, CPrintInfo *pInfo);
void PrintFooter(CDC *pDC, CPrintInfo *pInfo);
int DrawRow(CDC *pDC, int nItem);
// Generated message map functions
protected:
//{{AFX_MSG(CCB32View)
afx_msg void MeasureItem (LPMEASUREITEMSTRUCT);
afx_msg void DrawItem (LPDRAWITEMSTRUCT);
afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnEntryAdd();
afx_msg void OnEntryEdit();
afx_msg void OnEntryDelete();
afx_msg void OnUpdateEntryEdit(CCmdUI* pCmdUI);
afx_msg void OnUpdateEntryDelete(CCmdUI* pCmdUI);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnEditFind();
afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
afx_msg void OnViewFindNext();
afx_msg void OnUpdateViewFindNext(CCmdUI* pCmdUI);
afx_msg void OnViewColset();
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnDialHome();
afx_msg void OnDialWork();
afx_msg void OnUpdateDialHome(CCmdUI* pCmdUI);
afx_msg void OnUpdateDialWork(CCmdUI* pCmdUI);
afx_msg void OnDialCell();
afx_msg void OnUpdateDialCell(CCmdUI* pCmdUI);
afx_msg void OnDialPager();
afx_msg void OnUpdateDialPager(CCmdUI* pCmdUI);
afx_msg void OnDialFax();
afx_msg void OnUpdateDialFax(CCmdUI* pCmdUI);
afx_msg void OnEmailAdd1();
afx_msg void OnUpdateEmailAdd1(CCmdUI* pCmdUI);
afx_msg void OnEmailAdd2();
afx_msg void OnUpdateEmailAdd2(CCmdUI* pCmdUI);
afx_msg void OnUrl1();
afx_msg void OnUpdateUrl1(CCmdUI* pCmdUI);
afx_msg void OnUrl2();
afx_msg void OnUpdateUrl2(CCmdUI* pCmdUI);
afx_msg void OnAppPrefs();
afx_msg void OnTbarDial();
afx_msg void OnUpdateTbarDial(CCmdUI* pCmdUI);
afx_msg void OnTbarEmail();
afx_msg void OnUpdateTbarEmail(CCmdUI* pCmdUI);
afx_msg void OnTbarWeb();
afx_msg void OnUpdateTbarWeb(CCmdUI* pCmdUI);
afx_msg void OnViewColpos();
afx_msg void OnEntryCopy();
afx_msg void OnUpdateEntryCopy(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
void ChangeListCtrlStyle(long lStyle, BOOL bSetBit);
};
#ifndef _DEBUG // debug version in CB32View.cpp
inline CCB32Doc* CCB32View::GetDocument()
{ return (CCB32Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CB32VIEW_H__20BFD1EF_4F52_11D1_AF86_000000000000__INCLUDED_)

486
Cb32.dsp Normal file
View file

@ -0,0 +1,486 @@
# Microsoft Developer Studio Project File - Name="CB32" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=CB32 - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "CB32.MAK".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "CB32.MAK" CFG="CB32 - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "CB32 - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "CB32 - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "CB32 - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 ../cexpr/Release/cexpr.lib tapi32.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "CB32 - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 ../cexpr/Debug/cexpr.lib tapi32.lib /nologo /subsystem:windows /debug /machine:I386
!ENDIF
# Begin Target
# Name "CB32 - Win32 Release"
# Name "CB32 - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\CB32.cpp
# End Source File
# Begin Source File
SOURCE=.\hlp\CB32.hpj
USERDEP__CB32_="$(ProjDir)\hlp\AfxCore.rtf" "$(ProjDir)\hlp\AfxPrint.rtf"
!IF "$(CFG)" == "CB32 - Win32 Release"
# Begin Custom Build - Making help file...
OutDir=.\Release
ProjDir=.
TargetName=CB32
InputPath=.\hlp\CB32.hpj
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
call "$(ProjDir)\makehelp.bat"
# End Custom Build
!ELSEIF "$(CFG)" == "CB32 - Win32 Debug"
# Begin Custom Build - Making help file...
OutDir=.\Debug
ProjDir=.
TargetName=CB32
InputPath=.\hlp\CB32.hpj
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
call "$(ProjDir)\makehelp.bat"
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\CB32.rc
!IF "$(CFG)" == "CB32 - Win32 Release"
!ELSEIF "$(CFG)" == "CB32 - Win32 Debug"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\CB32Doc.cpp
# End Source File
# Begin Source File
SOURCE=.\CB32View.cpp
# End Source File
# Begin Source File
SOURCE=.\ColPage.cpp
# End Source File
# Begin Source File
SOURCE=.\ComboBar.cpp
# End Source File
# Begin Source File
SOURCE=.\ConvertDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\FindDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\GetNew.cpp
# End Source File
# Begin Source File
SOURCE=.\History.cpp
# End Source File
# Begin Source File
SOURCE=.\HyperLink.cpp
# End Source File
# Begin Source File
SOURCE=.\MainFrm.cpp
# End Source File
# Begin Source File
SOURCE=.\MyHeaderCtrl.cpp
# End Source File
# Begin Source File
SOURCE=.\OrdPage.cpp
# End Source File
# Begin Source File
SOURCE=.\Parser.cpp
# End Source File
# Begin Source File
SOURCE=.\PrefPage.cpp
# End Source File
# Begin Source File
SOURCE=.\PropAdd.cpp
# End Source File
# Begin Source File
SOURCE=.\PropComp.cpp
# End Source File
# Begin Source File
SOURCE=.\PropInfo.cpp
# End Source File
# Begin Source File
SOURCE=.\PropNote.cpp
# End Source File
# Begin Source File
SOURCE=.\PropOnline.cpp
# End Source File
# Begin Source File
SOURCE=.\PropPhone.cpp
# End Source File
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# Begin Source File
SOURCE=.\SetPage.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File
SOURCE=.\ToolBarEx.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\CB32.h
# End Source File
# Begin Source File
SOURCE=.\CB32Doc.h
# End Source File
# Begin Source File
SOURCE=.\CB32View.h
# End Source File
# Begin Source File
SOURCE=.\ColPage.h
# End Source File
# Begin Source File
SOURCE=.\ComboBar.h
# End Source File
# Begin Source File
SOURCE=.\ConvertDlg.h
# End Source File
# Begin Source File
SOURCE=.\FindDlg.h
# End Source File
# Begin Source File
SOURCE=.\GetNew.h
# End Source File
# Begin Source File
SOURCE=.\History.h
# End Source File
# Begin Source File
SOURCE=.\HyperLink.h
# End Source File
# Begin Source File
SOURCE=.\MainFrm.h
# End Source File
# Begin Source File
SOURCE=.\MyHeaderCtrl.h
# End Source File
# Begin Source File
SOURCE=.\OrdPage.h
# End Source File
# Begin Source File
SOURCE=.\Parser.h
# End Source File
# Begin Source File
SOURCE=.\PrefPage.h
# End Source File
# Begin Source File
SOURCE=.\PropAdd.h
# End Source File
# Begin Source File
SOURCE=.\PropComp.h
# End Source File
# Begin Source File
SOURCE=.\PropInfo.h
# End Source File
# Begin Source File
SOURCE=.\PropNote.h
# End Source File
# Begin Source File
SOURCE=.\PropOnline.h
# End Source File
# Begin Source File
SOURCE=.\PropPhone.h
# End Source File
# Begin Source File
SOURCE=.\SetPage.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# Begin Source File
SOURCE=.\ToolBarEx.h
# End Source File
# Begin Source File
SOURCE=.\TraceWin.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\res\CB32.ico
# End Source File
# Begin Source File
SOURCE=.\res\CB32.rc2
# End Source File
# Begin Source File
SOURCE=.\res\CB32Doc.ico
# End Source File
# Begin Source File
SOURCE=.\res\hand1.cur
# End Source File
# Begin Source File
SOURCE=.\res\Toolbar.bmp
# End Source File
# End Group
# Begin Group "Help Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\hlp\AfxCore.rtf
# End Source File
# Begin Source File
SOURCE=.\hlp\AfxPrint.rtf
# End Source File
# Begin Source File
SOURCE=.\hlp\AppExit.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\Bullet.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\CB32.cnt
# End Source File
# Begin Source File
SOURCE=.\hlp\CurArw2.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\CurArw4.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\CurHelp.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\EditCopy.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\EditCut.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\EditPast.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\EditUndo.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\FileNew.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\FileOpen.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\FilePrnt.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\FileSave.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\HlpSBar.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\HlpTBar.bmp
# End Source File
# Begin Source File
SOURCE=.\MakeHelp.bat
# End Source File
# Begin Source File
SOURCE=.\hlp\RecFirst.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\RecLast.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\RecNext.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\RecPrev.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\Scmax.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\ScMenu.bmp
# End Source File
# Begin Source File
SOURCE=.\hlp\Scmin.bmp
# End Source File
# End Group
# Begin Source File
SOURCE=.\CB32.reg
# End Source File
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project
# Section CB32 : {B6805000-A509-11CE-A5B0-00AA006BBF16}
# 1:12:IDR_POPUP_NL:102
# End Section

41
Cb32.dsw Normal file
View file

@ -0,0 +1,41 @@
Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "CB32"=.\CB32.DSP - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "cexpr"=..\cexpr\Cexpr.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

108
Cb32.ini Normal file
View file

@ -0,0 +1,108 @@
[AddressBookInUse]
File=C:\CB32\CONTACTS.TBD
[Preferences]
UseLastBook=1
DefaultCity=
DefaultCountry=
DefaultEmail=
DefaultPrefix=()
DefaultState=
DefaultWeb=http://
DefaultZip=
RememberSort=1
SortIndex=0
WindowPos=0,1,-1,-1,-1,-1,181,101,695,452
RememberCol=1
RememberExp=1
RememberImp=1
RememberWin=1
UseMRU=1
NumMRU=2
[Export]
ExportAddress1=5
ExportAddress2=6
ExportCellPhone=15
ExportCity=7
ExportCountry=8
ExportEmail1=22
ExportEmail2=23
ExportFaxPhone=20
ExportFaxExt=21
ExportFirstname=2
ExportHomePhone=11
ExportHomeExt=12
ExportLastname=1
ExportMI=3
ExportNotes=26
ExportPager=17
ExportPagerCard=18
ExportPagerExt=19
ExportState=9
ExportTitle=4
ExportWeb1=24
ExportWeb2=25
ExportWorkPhone=13
ExportWorkExt=14
ExportZip=10
ExportCellExt=16
[Import]
ImportAddress1=5
ImportAddress2=6
ImportCellPhone=15
ImportCity=7
ImportCountry=8
ImportEmail1=22
ImportEmail2=23
ImportFaxPhone=20
ImportFaxExt=21
ImportFirstname=2
ImportHomePhone=11
ImportHomeExt=12
ImportLastname=1
ImportMI=3
ImportNotes=26
ImportPager=17
ImportPagerCard=18
ImportPagerExt=19
ImportState=9
ImportTitle=4
ImportWeb1=24
ImportWeb2=25
ImportWorkPhone=13
ImportWorkExt=14
ImportZip=10
ImportCellExt=16
[Columns]
Col0=103
Col1=116
Col2=0
Col3=0
Col4=0
Col5=0
Col6=0
Col7=0
Col8=0
Col9=0
Col10=120
Col11=0
Col12=120
Col13=0
Col14=0
Col15=0
Col16=0
Col17=0
Col18=0
Col19=0
Col20=0
Col21=200
Col22=0
Col23=0
Col24=0
[Recent File List]
File1=C:\CB32\CONTACTS.TBD

BIN
Cb32.opt Normal file

Binary file not shown.

219
ColPage.cpp Normal file
View file

@ -0,0 +1,219 @@
// ColPage.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "ColPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CColPage property page
IMPLEMENT_DYNCREATE(CColPage, CPropertyPage)
CColPage::CColPage() : CPropertyPage(CColPage::IDD)
{
//{{AFX_DATA_INIT(CColPage)
m_cadd1 = 0;
m_cadd2 = 0;
m_ccell = 0;
m_ccellx = 0;
m_ccity = 0;
m_ccountry = 0;
m_cemail1 = 0;
m_cemail2 = 0;
m_cfax = 0;
m_cfaxx = 0;
m_cfname = 0;
m_chomep = 0;
m_chomepx = 0;
m_clname = 0;
m_cmi = 0;
m_cpager = 0;
m_cpagerc = 0;
m_cpagerx = 0;
m_cstate = 0;
m_ctitle = 0;
m_cweb1 = 0;
m_cweb2 = 0;
m_cworkp = 0;
m_cworkpx = 0;
m_czip = 0;
m_ccadd1 = 0;
m_ccadd2 = 0;
m_ccomp = 0;
m_cdept = 0;
m_cmgr = 0;
m_cposn = 0;
m_cnotes = 0;
//}}AFX_DATA_INIT
}
CColPage::~CColPage()
{
}
void CColPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CColPage)
DDX_Control(pDX, IDC_SPINCNOTES, m_spincnotes);
DDX_Control(pDX, IDC_SPINCPOSN, m_spincposn);
DDX_Control(pDX, IDC_SPINCMGR, m_spincmgr);
DDX_Control(pDX, IDC_SPINCDEPT, m_spincdept);
DDX_Control(pDX, IDC_SPINCCOMP, m_spinccomp);
DDX_Control(pDX, IDC_SPINCCADD2, m_spinccadd2);
DDX_Control(pDX, IDC_SPINCCADD1, m_spinccadd1);
DDX_Control(pDX, IDC_SPINCZIP, m_spinczip);
DDX_Control(pDX, IDC_SPINCWORKPX, m_spincworkpx);
DDX_Control(pDX, IDC_SPINCWORKP, m_spincworkp);
DDX_Control(pDX, IDC_SPINCWEB2, m_spincweb2);
DDX_Control(pDX, IDC_SPINCWEB1, m_spincweb1);
DDX_Control(pDX, IDC_SPINCTITLE, m_spinctitle);
DDX_Control(pDX, IDC_SPINCSTATE, m_spincstate);
DDX_Control(pDX, IDC_SPINCPAGERX, m_spincpagerx);
DDX_Control(pDX, IDC_SPINCPAGERC, m_spincpagerc);
DDX_Control(pDX, IDC_SPINCPAGER, m_spincpager);
DDX_Control(pDX, IDC_SPINCMI, m_spincmi);
DDX_Control(pDX, IDC_SPINCLNAME, m_spinclname);
DDX_Control(pDX, IDC_SPINCHOMEPX, m_spinchomepx);
DDX_Control(pDX, IDC_SPINCHOMEP, m_spinchomep);
DDX_Control(pDX, IDC_SPINCFNAME, m_spincfname);
DDX_Control(pDX, IDC_SPINCFAXX, m_spincfaxx);
DDX_Control(pDX, IDC_SPINCFAX, m_spincfax);
DDX_Control(pDX, IDC_SPINCEMAIL2, m_spincemail2);
DDX_Control(pDX, IDC_SPINCEMAIL1, m_spincemail1);
DDX_Control(pDX, IDC_SPINCCOUNTRY, m_spinccountry);
DDX_Control(pDX, IDC_SPINCCITY, m_spinccity);
DDX_Control(pDX, IDC_SPINCCELLX, m_spinccellx);
DDX_Control(pDX, IDC_SPINCCELL, m_spinccell);
DDX_Control(pDX, IDC_SPINCADD2, m_spincadd2);
DDX_Control(pDX, IDC_SPINCADD1, m_spincadd1);
DDX_Text(pDX, IDC_CADD1, m_cadd1);
DDX_Text(pDX, IDC_CADD2, m_cadd2);
DDX_Text(pDX, IDC_CCELL, m_ccell);
DDX_Text(pDX, IDC_CCELLX, m_ccellx);
DDX_Text(pDX, IDC_CCITY, m_ccity);
DDX_Text(pDX, IDC_CCOUNTRY, m_ccountry);
DDX_Text(pDX, IDC_CEMAIL1, m_cemail1);
DDX_Text(pDX, IDC_CEMAIL2, m_cemail2);
DDX_Text(pDX, IDC_CFAX, m_cfax);
DDX_Text(pDX, IDC_CFAXX, m_cfaxx);
DDX_Text(pDX, IDC_CFNAME, m_cfname);
DDX_Text(pDX, IDC_CHOMEP, m_chomep);
DDX_Text(pDX, IDC_CHOMEPX, m_chomepx);
DDX_Text(pDX, IDC_CLNAME, m_clname);
DDX_Text(pDX, IDC_CMI, m_cmi);
DDX_Text(pDX, IDC_CPAGER, m_cpager);
DDX_Text(pDX, IDC_CPAGERC, m_cpagerc);
DDX_Text(pDX, IDC_CPAGERX, m_cpagerx);
DDX_Text(pDX, IDC_CSTATE, m_cstate);
DDX_Text(pDX, IDC_CTITLE, m_ctitle);
DDX_Text(pDX, IDC_CWEB1, m_cweb1);
DDX_Text(pDX, IDC_CWEB2, m_cweb2);
DDX_Text(pDX, IDC_CWORKP, m_cworkp);
DDX_Text(pDX, IDC_CWORKPX, m_cworkpx);
DDX_Text(pDX, IDC_CZIP, m_czip);
DDX_Text(pDX, IDC_CCADD1, m_ccadd1);
DDX_Text(pDX, IDC_CCADD2, m_ccadd2);
DDX_Text(pDX, IDC_CCOMP, m_ccomp);
DDX_Text(pDX, IDC_CDEPT, m_cdept);
DDX_Text(pDX, IDC_CMGR, m_cmgr);
DDX_Text(pDX, IDC_CPOSN, m_cposn);
DDX_Text(pDX, IDC_CNOTES, m_cnotes);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CColPage, CPropertyPage)
//{{AFX_MSG_MAP(CColPage)
ON_BN_CLICKED(IDC_RESETSIZE, OnResetsize)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CColPage message handlers
BOOL CColPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
m_spinclname.SetRange(0,300);
m_spincfname.SetRange(0,300);
m_spincmi.SetRange(0,300);
m_spinctitle.SetRange(0,300);
m_spincadd1.SetRange(0,300);
m_spincadd2.SetRange(0,300);
m_spinccity.SetRange(0,300);
m_spincstate.SetRange(0,300);
m_spinczip.SetRange(0,300);
m_spinccountry.SetRange(0,300);
m_spinccomp.SetRange(0,300);
m_spincdept.SetRange(0,300);
m_spincposn.SetRange(0,300);
m_spincmgr.SetRange(0,300);
m_spinccadd1.SetRange(0,300);
m_spinccadd2.SetRange(0,300);
m_spinchomepx.SetRange(0,300);
m_spinchomep.SetRange(0,300);
m_spincworkpx.SetRange(0,300);
m_spincworkp.SetRange(0,300);
m_spincfaxx.SetRange(0,300);
m_spincfax.SetRange(0,300);
m_spincpagerx.SetRange(0,300);
m_spincpagerc.SetRange(0,300);
m_spincpager.SetRange(0,300);
m_spinccellx.SetRange(0,300);
m_spinccell.SetRange(0,300);
m_spincemail1.SetRange(0,300);
m_spincemail2.SetRange(0,300);
m_spincweb1.SetRange(0,300);
m_spincweb2.SetRange(0,300);
m_spincnotes.SetRange(0,300);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CColPage::OnResetsize()
{
SetDlgItemInt(IDC_CLNAME,100);
SetDlgItemInt(IDC_CFNAME,100);
SetDlgItemInt(IDC_CMI,40);
SetDlgItemInt(IDC_CTITLE,40);
SetDlgItemInt(IDC_CADD1,170);
SetDlgItemInt(IDC_CADD2,170);
SetDlgItemInt(IDC_CCOUNTRY,110);
SetDlgItemInt(IDC_CSTATE,90);
SetDlgItemInt(IDC_CZIP,60);
SetDlgItemInt(IDC_CCOMP,100);
SetDlgItemInt(IDC_DEPT,100);
SetDlgItemInt(IDC_CPOSN,100);
SetDlgItemInt(IDC_CMGR,100);
SetDlgItemInt(IDC_CCADD1,100);
SetDlgItemInt(IDC_CCADD2,100);
SetDlgItemInt(IDC_CHOMEP,120);
SetDlgItemInt(IDC_CHOMEPX,60);
SetDlgItemInt(IDC_CWORKP,120);
SetDlgItemInt(IDC_CWORKPX,60);
SetDlgItemInt(IDC_CCELL,120);
SetDlgItemInt(IDC_CCELLX,60);
SetDlgItemInt(IDC_CPAGER,120);
SetDlgItemInt(IDC_CPAGERC,120);
SetDlgItemInt(IDC_CPAGERX,60);
SetDlgItemInt(IDC_CFAX,120);
SetDlgItemInt(IDC_CFAXX,60);
SetDlgItemInt(IDC_CEMAIL1,200);
SetDlgItemInt(IDC_CEMAIL2,200);
SetDlgItemInt(IDC_CWEB1,280);
SetDlgItemInt(IDC_CWEB2,280);
SetDlgItemInt(IDC_CNOTES,280);
}

102
ColPage.h Normal file
View file

@ -0,0 +1,102 @@
// ColPage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CColPage dialog
class CColPage : public CPropertyPage
{
DECLARE_DYNCREATE(CColPage)
// Construction
public:
CColPage();
~CColPage();
// Dialog Data
//{{AFX_DATA(CColPage)
enum { IDD = IDD_COLPAGE };
CSpinButtonCtrl m_spincnotes;
CSpinButtonCtrl m_spincposn;
CSpinButtonCtrl m_spincmgr;
CSpinButtonCtrl m_spincdept;
CSpinButtonCtrl m_spinccomp;
CSpinButtonCtrl m_spinccadd2;
CSpinButtonCtrl m_spinccadd1;
CSpinButtonCtrl m_spinczip;
CSpinButtonCtrl m_spincworkpx;
CSpinButtonCtrl m_spincworkp;
CSpinButtonCtrl m_spincweb2;
CSpinButtonCtrl m_spincweb1;
CSpinButtonCtrl m_spinctitle;
CSpinButtonCtrl m_spincstate;
CSpinButtonCtrl m_spincpagerx;
CSpinButtonCtrl m_spincpagerc;
CSpinButtonCtrl m_spincpager;
CSpinButtonCtrl m_spincmi;
CSpinButtonCtrl m_spinclname;
CSpinButtonCtrl m_spinchomepx;
CSpinButtonCtrl m_spinchomep;
CSpinButtonCtrl m_spincfname;
CSpinButtonCtrl m_spincfaxx;
CSpinButtonCtrl m_spincfax;
CSpinButtonCtrl m_spincemail2;
CSpinButtonCtrl m_spincemail1;
CSpinButtonCtrl m_spinccountry;
CSpinButtonCtrl m_spinccity;
CSpinButtonCtrl m_spinccellx;
CSpinButtonCtrl m_spinccell;
CSpinButtonCtrl m_spincadd2;
CSpinButtonCtrl m_spincadd1;
int m_cadd1;
int m_cadd2;
int m_ccell;
int m_ccellx;
int m_ccity;
int m_ccountry;
int m_cemail1;
int m_cemail2;
int m_cfax;
int m_cfaxx;
int m_cfname;
int m_chomep;
int m_chomepx;
int m_clname;
int m_cmi;
int m_cpager;
int m_cpagerc;
int m_cpagerx;
int m_cstate;
int m_ctitle;
int m_cweb1;
int m_cweb2;
int m_cworkp;
int m_cworkpx;
int m_czip;
int m_ccadd1;
int m_ccadd2;
int m_ccomp;
int m_cdept;
int m_cmgr;
int m_cposn;
int m_cnotes;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CColPage)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CColPage)
virtual BOOL OnInitDialog();
afx_msg void OnResetsize();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

185
ComboBar.cpp Normal file
View file

@ -0,0 +1,185 @@
// combobar.cpp : implementation of the CComboToolBar and CTBComboBox class
//
#include "stdafx.h"
#include "CB32.h"
#include "ComboBar.h"
#include "MainFrm.h"
#include "CB32Doc.h"
#include "CB32View.h"
#include "FindDlg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(CComboToolBar, CToolBarEx)
//{{AFX_MSG_MAP(CComboToolBar)
ON_WM_LBUTTONUP()
//}}AFX_MSG_MAP
ON_CBN_SETFOCUS(IDW_COMBO, OnSetFocus)
END_MESSAGE_MAP()
void CComboToolBar::OnSetFocus()
{
// combobox is gaining focus, highlight text in edit control
m_toolBarCombo.SetEditSel(0,-1);
}
BOOL CComboToolBar::PreTranslateMessage(MSG* pMsg)
{
// Note: there is only one control in the toolbar that accepts keyboard input,
// this is the combobox.
// user hit ENTER
if (pMsg->wParam == VK_RETURN && GetKeyState(VK_RETURN) < 0)
{
// extract the text, update combobox lists, and do the search
CString s1;
m_toolBarCombo.GetWindowText(s1);
if(s1.GetLength())
{
CCB32View* pView = GetApplicationView();
m_toolBarCombo.SetEditSel(0, -1);
pView->m_searchHistory.AddString(s1); // update combobox history list
pView->m_pFindDialog->m_szText = s1; // update last string
pView->OnViewFindNext(s1); // find the string
return TRUE; // key processed
}
else
{
MessageBeep(MB_ICONEXCLAMATION);
return TRUE; // key processed
}
}
// user hit ESC
if (pMsg->wParam == VK_ESCAPE && GetKeyState(VK_ESCAPE) < 0)
{
GetApplicationView()->SetFocus();
return TRUE; // key processed
}
// user hit DELETE
if (pMsg->wParam == VK_DELETE && GetKeyState(VK_DELETE) < 0)
{
m_toolBarCombo.Clear();
return TRUE; // key processed
}
// user hit DOWN-ARROW
if (pMsg->wParam == VK_DOWN && GetKeyState(VK_DOWN) < 0 &&
m_toolBarCombo.GetDroppedState() == FALSE)
{
m_toolBarCombo.ShowDropDown();
return TRUE; // key processed
}
return CToolBarEx::PreTranslateMessage(pMsg);
}
BEGIN_MESSAGE_MAP(CTBComboBox, CComboBox)
//{{AFX_MSG_MAP(CTBComboBox)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
int CTBComboBox::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CComboBox::OnCreate(lpCreateStruct) == -1)
return -1;
LOGFONT logFont;
TEXTMETRIC tm;
CClientDC dc(this);
dc.GetTextMetrics(&tm);
::EnumFontFamilies(dc.m_hDC, _T("MS Sans Serif"),
CTBComboBox::FontEnumProc, (LPARAM)&logFont);
// change the weight and create the font
logFont.lfWeight = FW_BOLD;
if (m_font.CreateFontIndirect(&logFont))
SetFont(&m_font);
return 0;
}
int CALLBACK CTBComboBox::FontEnumProc(const LOGFONT *pLogFont, const TEXTMETRIC *pTextMetric, DWORD type, LPARAM pDestLogFont)
{
memcpy((BYTE*)pDestLogFont, pLogFont, sizeof(LOGFONT));
return FALSE; // return the first font in the family(i.e. smallest).
}
void CComboToolBar::OnLButtonUp(UINT nFlags, CPoint point)
{
CRect rect;
CMenu menu;
int nHit = -1;
TBBUTTON button;
CMenu* pSubMenu = NULL;
CToolBarCtrl& pBar = GetToolBarCtrl();
int nButtons = pBar.GetButtonCount();
for (int i = 0; i < nButtons; i++)
{
if (pBar.GetItemRect(i, &rect) && rect.PtInRect(point) &&
pBar.GetButton(i, &button) && !(button.fsStyle & TBSTYLE_SEP))
{
nHit = GetItemID(i);
break;
}
}
switch (nHit)
{
case ID_TBAR_DIAL:
if (menu.LoadMenu(IDR_TRAYMENU))
pSubMenu = menu.GetSubMenu(1);
if (pSubMenu)
ClientToScreen(&rect);
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN,
rect.left, rect.bottom, AfxGetMainWnd(), NULL);
break;
case ID_TBAR_EMAIL:
if (menu.LoadMenu(IDR_TRAYMENU))
pSubMenu = menu.GetSubMenu(2);
if (pSubMenu)
ClientToScreen(&rect);
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN,
rect.left, rect.bottom, AfxGetMainWnd(), NULL);
break;
case ID_TBAR_WEB:
if (menu.LoadMenu(IDR_TRAYMENU))
pSubMenu = menu.GetSubMenu(3);
if (pSubMenu)
ClientToScreen(&rect);
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN,
rect.left, rect.bottom, AfxGetMainWnd(), NULL);
break;
}
CToolBarEx::OnLButtonUp(nFlags, point);
}
int CComboToolBar::CheckIfHit(CPoint point)
{
CToolBarCtrl& pBar = GetToolBarCtrl();
int nButtons = pBar.GetButtonCount();
for (int i = 0; i < nButtons; i++)
{
CRect rect;
TBBUTTON button;
if (pBar.GetItemRect(i, &rect) && rect.PtInRect(point) &&
pBar.GetButton(i, &button) && !(button.fsStyle & TBSTYLE_SEP))
{
int nHit = GetItemID(i);
return nHit != 0 ? nHit : -1;
}
}
return -1;
}

49
ComboBar.h Normal file
View file

@ -0,0 +1,49 @@
// combobar.h : interface of the CTBComboBox and CComboToolBar class
//
/////////////////////////////////////////////////////////////////////////////
#include "ToolBarEx.h"
class CCB32View; // forward declaration
class CTBComboBox : public CComboBox
{
// Attributes
protected:
CFont m_font;
// Implementation
protected:
static int CALLBACK FontEnumProc(const LOGFONT *pLogFont,
const TEXTMETRIC *pTextMetric,
DWORD type, LPARAM pDestLogFont);
// Generated message map functions
//{{AFX_MSG(CTBComboBox)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
class CComboToolBar : public CToolBarEx
{
// Attributes
public:
CTBComboBox m_toolBarCombo;
// Implementation
public:
CCB32View* GetView();
virtual BOOL PreTranslateMessage(MSG* pMsg);
private:
int CheckIfHit(CPoint point);
protected:
// Generated message map functions
//{{AFX_MSG(CComboToolBar)
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg void OnSelectEndOk();
afx_msg void OnSetFocus();
DECLARE_MESSAGE_MAP()
};

179
ConvertDlg.cpp Normal file
View file

@ -0,0 +1,179 @@
// ConvertDlg.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "ConvertDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConvertDlg dialog
CConvertDlg::CConvertDlg(CWnd* pParent /*=NULL*/)
: CDialog(CConvertDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CConvertDlg)
m_xline1 = _T("");
m_xadd1 = 0;
m_xadd2 = 0;
m_xcell = 0;
m_xcity = 0;
m_xcountry = 0;
m_xemail1 = 0;
m_xemail2 = 0;
m_xfax = 0;
m_xfaxx = 0;
m_xfname = 0;
m_xhomep = 0;
m_xhomepx = 0;
m_xlname = 0;
m_xmi = 0;
m_xnotes = 0;
m_xpager = 0;
m_xpagerc = 0;
m_xpagerx = 0;
m_xstate = 0;
m_xtitle = 0;
m_xweb1 = 0;
m_xweb2 = 0;
m_xworkp = 0;
m_xworkpx = 0;
m_xzip = 0;
m_xcellx = 0;
m_xcadd1 = 0;
m_xcadd2 = 0;
m_xcomp = 0;
m_xdept = 0;
m_xmgr = 0;
m_xposn = 0;
//}}AFX_DATA_INIT
}
void CConvertDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConvertDlg)
DDX_Control(pDX, IDC_SPINXPOSN, m_spinxposn);
DDX_Control(pDX, IDC_SPINXMGR, m_spinxmgr);
DDX_Control(pDX, IDC_SPINXDEPT, m_spinxdept);
DDX_Control(pDX, IDC_SPINXCOMP, m_spinxcomp);
DDX_Control(pDX, IDC_SPINXCADD2, m_spinxcadd2);
DDX_Control(pDX, IDC_SPINXCADD1, m_spinxcadd1);
DDX_Control(pDX, IDC_SPINXZIP, m_spinxzip);
DDX_Control(pDX, IDC_SPINXWORKPX, m_spinxworkpx);
DDX_Control(pDX, IDC_SPINXWORKP, m_spinxworkp);
DDX_Control(pDX, IDC_SPINXWEB2, m_spinxweb2);
DDX_Control(pDX, IDC_SPINXWEB1, m_spinxweb1);
DDX_Control(pDX, IDC_SPINXTITLE, m_spinxtitle);
DDX_Control(pDX, IDC_SPINXSTATE, m_spinxstate);
DDX_Control(pDX, IDC_SPINXPAGERX, m_spinxpagerx);
DDX_Control(pDX, IDC_SPINXPAGERC, m_spinxpagerc);
DDX_Control(pDX, IDC_SPINXPAGER, m_spinxpager);
DDX_Control(pDX, IDC_SPINXNOTES, m_spinxnotes);
DDX_Control(pDX, IDC_SPINXMI, m_spinxmi);
DDX_Control(pDX, IDC_SPINXLNAME, m_spinxlname);
DDX_Control(pDX, IDC_SPINXHOMEPX, m_spinxhomepx);
DDX_Control(pDX, IDC_SPINXHOMEP, m_spinxhomep);
DDX_Control(pDX, IDC_SPINXFNAME, m_spinxfname);
DDX_Control(pDX, IDC_SPINXFAXX, m_spinxfaxx);
DDX_Control(pDX, IDC_SPINXFAX, m_spinxfax);
DDX_Control(pDX, IDC_SPINXEMAIL2, m_spinxemail2);
DDX_Control(pDX, IDC_SPINXEMAIL1, m_spinxemail1);
DDX_Control(pDX, IDC_SPINXCOUNTRY, m_spinxcountry);
DDX_Control(pDX, IDC_SPINXCITY, m_spinxcity);
DDX_Control(pDX, IDC_SPINXCELLX, m_spinxcellx);
DDX_Control(pDX, IDC_SPINXCELL, m_spinxcell);
DDX_Control(pDX, IDC_SPINXADD2, m_spinxadd2);
DDX_Control(pDX, IDC_SPINXADD1, m_spinxadd1);
DDX_Text(pDX, IDC_XLINE1, m_xline1);
DDX_Text(pDX, IDC_XADD1, m_xadd1);
DDX_Text(pDX, IDC_XADD2, m_xadd2);
DDX_Text(pDX, IDC_XCELL, m_xcell);
DDX_Text(pDX, IDC_XCITY, m_xcity);
DDX_Text(pDX, IDC_XCOUNTRY, m_xcountry);
DDX_Text(pDX, IDC_XEMAIL1, m_xemail1);
DDX_Text(pDX, IDC_XEMAIL2, m_xemail2);
DDX_Text(pDX, IDC_XFAX, m_xfax);
DDX_Text(pDX, IDC_XFAXX, m_xfaxx);
DDX_Text(pDX, IDC_XFNAME, m_xfname);
DDX_Text(pDX, IDC_XHOMEP, m_xhomep);
DDX_Text(pDX, IDC_XHOMEPX, m_xhomepx);
DDX_Text(pDX, IDC_XLNAME, m_xlname);
DDX_Text(pDX, IDC_XMI, m_xmi);
DDX_Text(pDX, IDC_XNOTES, m_xnotes);
DDX_Text(pDX, IDC_XPAGER, m_xpager);
DDX_Text(pDX, IDC_XPAGERC, m_xpagerc);
DDX_Text(pDX, IDC_XPAGERX, m_xpagerx);
DDX_Text(pDX, IDC_XSTATE, m_xstate);
DDX_Text(pDX, IDC_XTITLE, m_xtitle);
DDX_Text(pDX, IDC_XWEB1, m_xweb1);
DDX_Text(pDX, IDC_XWEB2, m_xweb2);
DDX_Text(pDX, IDC_XWORKP, m_xworkp);
DDX_Text(pDX, IDC_XWORKPX, m_xworkpx);
DDX_Text(pDX, IDC_XZIP, m_xzip);
DDX_Text(pDX, IDC_XCELLX, m_xcellx);
DDX_Text(pDX, IDC_XCADD1, m_xcadd1);
DDX_Text(pDX, IDC_XCADD2, m_xcadd2);
DDX_Text(pDX, IDC_XCOMP, m_xcomp);
DDX_Text(pDX, IDC_XDEPT, m_xdept);
DDX_Text(pDX, IDC_XMGR, m_xmgr);
DDX_Text(pDX, IDC_XPOSN, m_xposn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConvertDlg, CDialog)
//{{AFX_MSG_MAP(CConvertDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConvertDlg message handlers
BOOL CConvertDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_spinxzip.SetRange(0,100);
m_spinxworkpx.SetRange(0,100);
m_spinxworkp.SetRange(0,100);
m_spinxweb2.SetRange(0,100);
m_spinxweb1.SetRange(0,100);
m_spinxtitle.SetRange(0,100);
m_spinxstate.SetRange(0,100);
m_spinxpagerx.SetRange(0,100);
m_spinxpagerc.SetRange(0,100);
m_spinxpager.SetRange(0,100);
m_spinxnotes.SetRange(0,100);
m_spinxmi.SetRange(0,100);
m_spinxlname.SetRange(0,100);
m_spinxhomepx.SetRange(0,100);
m_spinxhomep.SetRange(0,100);
m_spinxfname.SetRange(0,100);
m_spinxfaxx.SetRange(0,100);
m_spinxfax.SetRange(0,100);
m_spinxemail2.SetRange(0,100);
m_spinxemail1.SetRange(0,100);
m_spinxcountry.SetRange(0,100);
m_spinxcity.SetRange(0,100);
m_spinxcellx.SetRange(0,100);
m_spinxcell.SetRange(0,100);
m_spinxadd2.SetRange(0,100);
m_spinxadd1.SetRange(0,100);
m_spinxcomp.SetRange(0,100);
m_spinxdept.SetRange(0,100);
m_spinxposn.SetRange(0,100);
m_spinxmgr.SetRange(0,100);
m_spinxcadd1.SetRange(0,100);
m_spinxcadd2.SetRange(0,100);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

99
ConvertDlg.h Normal file
View file

@ -0,0 +1,99 @@
// ConvertDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CConvertDlg dialog
class CConvertDlg : public CDialog
{
// Construction
public:
CConvertDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CConvertDlg)
enum { IDD = IDD_CONVERT };
CSpinButtonCtrl m_spinxposn;
CSpinButtonCtrl m_spinxmgr;
CSpinButtonCtrl m_spinxdept;
CSpinButtonCtrl m_spinxcomp;
CSpinButtonCtrl m_spinxcadd2;
CSpinButtonCtrl m_spinxcadd1;
CSpinButtonCtrl m_spinxzip;
CSpinButtonCtrl m_spinxworkpx;
CSpinButtonCtrl m_spinxworkp;
CSpinButtonCtrl m_spinxweb2;
CSpinButtonCtrl m_spinxweb1;
CSpinButtonCtrl m_spinxtitle;
CSpinButtonCtrl m_spinxstate;
CSpinButtonCtrl m_spinxpagerx;
CSpinButtonCtrl m_spinxpagerc;
CSpinButtonCtrl m_spinxpager;
CSpinButtonCtrl m_spinxnotes;
CSpinButtonCtrl m_spinxmi;
CSpinButtonCtrl m_spinxlname;
CSpinButtonCtrl m_spinxhomepx;
CSpinButtonCtrl m_spinxhomep;
CSpinButtonCtrl m_spinxfname;
CSpinButtonCtrl m_spinxfaxx;
CSpinButtonCtrl m_spinxfax;
CSpinButtonCtrl m_spinxemail2;
CSpinButtonCtrl m_spinxemail1;
CSpinButtonCtrl m_spinxcountry;
CSpinButtonCtrl m_spinxcity;
CSpinButtonCtrl m_spinxcellx;
CSpinButtonCtrl m_spinxcell;
CSpinButtonCtrl m_spinxadd2;
CSpinButtonCtrl m_spinxadd1;
CString m_xline1;
int m_xadd1;
int m_xadd2;
int m_xcell;
int m_xcity;
int m_xcountry;
int m_xemail1;
int m_xemail2;
int m_xfax;
int m_xfaxx;
int m_xfname;
int m_xhomep;
int m_xhomepx;
int m_xlname;
int m_xmi;
int m_xnotes;
int m_xpager;
int m_xpagerc;
int m_xpagerx;
int m_xstate;
int m_xtitle;
int m_xweb1;
int m_xweb2;
int m_xworkp;
int m_xworkpx;
int m_xzip;
int m_xcellx;
int m_xcadd1;
int m_xcadd2;
int m_xcomp;
int m_xdept;
int m_xmgr;
int m_xposn;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConvertDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CConvertDlg)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

0
Debug/empty.dir Normal file
View file

93
FindDlg.cpp Normal file
View file

@ -0,0 +1,93 @@
// finddlg.cpp : implementation file
//
#include "stdafx.h"
#include <stddef.h>
#include "CB32.h"
#include "ComboBar.h"
#include "MainFrm.h"
#include "CB32Doc.h"
#include "CB32View.h"
#include "FindDlg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFindDlg dialog
CFindDlg::CFindDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFindDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFindDlg)
m_bMatchCase = FALSE;
m_szText = _T("");
m_nDirection = 1; // down by default
m_bStartTop = FALSE;
m_nWhichName = 0;
//}}AFX_DATA_INIT
}
void CFindDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFindDlg)
DDX_Control(pDX, IDC_FCOMBO, m_strList);
DDX_Check(pDX, IDC_CHECK1, m_bMatchCase);
DDX_CBString(pDX, IDC_COMBO1, m_szText);
DDX_Radio(pDX, IDC_RADIO1, m_nDirection);
DDX_Check(pDX, IDC_CHECK2, m_bStartTop);
DDX_CBIndex(pDX, IDC_FCOMBO, m_nWhichName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFindDlg, CDialog)
//{{AFX_MSG_MAP(CFindDlg)
ON_BN_CLICKED(ID_EDIT_FIND_NEXT, OnEditFindNext)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFindDlg message handlers
void CFindDlg::OnEditFindNext()
{
// the user selected to search. see if there is a search pattern in the edit control
// using the default data exchange.
// if no search string is present, keep the dialog box up.
UpdateData(TRUE);
if (!m_szText.GetLength())
{
MessageBeep(MB_ICONEXCLAMATION);
GotoDlgCtrl(GetDlgItem(IDC_COMBO1));
return ;
}
EndDialog(TRUE);
GetApplicationView()->m_searchHistory.AddString(m_szText);
}
BOOL CFindDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CWnd* pWnd = GetDlgItem(IDC_COMBO1);
CCB32View* pView = GetApplicationView();
pView->m_searchHistory.FillCombobox();
for (int y=0; y < COLS; y++)
m_strList.AddString(pView->arLabel[y]);
m_strList.SetCurSel(m_nWhichName);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

40
FindDlg.h Normal file
View file

@ -0,0 +1,40 @@
// finddlg.h : interface of the CFindDlg class
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CFindDlg dialog
class CFindDlg : public CDialog
{
// Construction
public:
CFindDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CFindDlg)
enum { IDD = IDD_FIND };
CComboBox m_strList;
BOOL m_bMatchCase;
CString m_szText;
int m_nDirection; // search direction 0=down, 1=up
BOOL m_bStartTop;
int m_nWhichName;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFindDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CFindDlg)
afx_msg void OnEditFindNext();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

44
GetNew.cpp Normal file
View file

@ -0,0 +1,44 @@
// GetNew.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "GetNew.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGetNew dialog
CGetNew::CGetNew(CWnd* pParent /*=NULL*/)
: CDialog(CGetNew::IDD, pParent)
{
//{{AFX_DATA_INIT(CGetNew)
m_addinfo = FALSE;
m_newinfo = _T("");
//}}AFX_DATA_INIT
}
void CGetNew::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGetNew)
DDX_Check(pDX, IDC_ADDINFO, m_addinfo);
DDX_Text(pDX, IDC_NEWINFO, m_newinfo);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGetNew, CDialog)
//{{AFX_MSG_MAP(CGetNew)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGetNew message handlers

35
GetNew.h Normal file
View file

@ -0,0 +1,35 @@
// GetNew.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CGetNew dialog
class CGetNew : public CDialog
{
// Construction
public:
CGetNew(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CGetNew)
enum { IDD = IDD_GETNEW };
BOOL m_addinfo;
CString m_newinfo;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGetNew)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CGetNew)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

83
History.cpp Normal file
View file

@ -0,0 +1,83 @@
// history.cpp : implementation of the CHistoryList class
//
#include "stdafx.h"
#include "CB32.h"
#include "ComboBar.h"
#include "MainFrm.h"
#include "CB32Doc.h"
#include "CB32View.h"
#include "FindDlg.h"
#include <afxcoll.h>
void CHistoryList::FillCombobox()
{
CCB32View* pView = GetApplicationView();
CWnd* pWnd = pView->m_pFindDialog->GetDlgItem(IDC_COMBO1);
ASSERT_VALID(pWnd);
POSITION pos = GetHeadPosition();
while(pos)
pWnd->SendMessage(CB_ADDSTRING, 0, (LPARAM)((LPCTSTR)GetNext(pos)));
}
BOOL CHistoryList::AddString(CString &s1)
{
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
CWnd* pWnd = &pFrame->m_wndToolBar.m_toolBarCombo;
ASSERT_VALID(pWnd);
if (!s1.GetLength())
return FALSE;
POSITION pos = Find(s1);
int nCount = GetCount();
if (pos == NULL)
{
// if list is full, remove from the end
if (nCount == HISTORY_COUNT)
{
RemoveTail();
pWnd->SendMessage(CB_DELETESTRING, nCount-1);
}
AddHead(s1);
pWnd->SendMessage(CB_INSERTSTRING, 0, (LPARAM)((LPCTSTR)s1));
}
else
{
SwapStrings(pWnd, s1);
}
return TRUE;
}
void CHistoryList::SwapStrings(CWnd* pWnd, CString &s1)
{
// swap internal list items
POSITION pos = GetHeadPosition();
ASSERT(pos != NULL);
CString s2;
int nCount = GetCount();
int idx=0;
// Note: combo-box find is not case-sensitive
do
{
s2 = GetNext(pos);
} while(idx < nCount && s1 != s2 && ++idx);
// swap internal list
pos = FindIndex(idx);
ASSERT(pos != NULL);
RemoveAt(pos);
AddHead(s2);
// swap combo box item with combo's edit control
pWnd->SendMessage(CB_DELETESTRING, idx);
pWnd->SendMessage(CB_SETCURSEL, pWnd->SendMessage(CB_INSERTSTRING, 0, (LPARAM)((LPCTSTR)s1)));
}

16
History.h Normal file
View file

@ -0,0 +1,16 @@
// history.h : interface of the CHistoryList class
//
/////////////////////////////////////////////////////////////////////////////
class CHistoryList : public CStringList
{
// Operations
public:
void FillCombobox();
BOOL AddString(CString &s1);
// Implementation
protected:
void SwapStrings(CWnd* pWnd, CString &s1);
};

285
HyperLink.cpp Normal file
View file

@ -0,0 +1,285 @@
// HyperLink.cpp : implementation file
//
// HyperLink static control. Will open the default browser with the given URL
// when the user clicks on the link.
//
// Copyright Chris Maunder, 1997
// Feel free to use and distribute.
//
// "GotoURL" function by Stuart Patterson
// As seen in the August, 1997 Windows Developer's Journal.
// Copyright 1997 by Miller Freeman, Inc.
// All rights reserved.
// Modified by Chris Maunder to use TCHARs instead of chars,
#include "stdafx.h"
#include "HyperLink.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define TOOLTIP_ID 1
/////////////////////////////////////////////////////////////////////////////
// CHyperLink
CHyperLink::CHyperLink()
{
m_crLinkColour = RGB(0, 0, 238); // Blue
m_crVisitedColour = RGB(85, 26, 139); // Purple
m_bVisited = FALSE; // Hasn't been visited yet.
m_bUnderline = TRUE; // Underline the link?
m_strURL.Empty();
}
CHyperLink::~CHyperLink()
{
if ((HFONT)m_Font)
m_Font.DeleteObject();
}
BEGIN_MESSAGE_MAP(CHyperLink, CStatic)
//{{AFX_MSG_MAP(CHyperLink)
ON_CONTROL_REFLECT(STN_CLICKED, OnClicked)
ON_WM_CTLCOLOR_REFLECT()
ON_WM_SETCURSOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CHyperLink message handlers
BOOL CHyperLink::PreTranslateMessage(MSG* pMsg)
{
m_ToolTip.RelayEvent(pMsg);
return CStatic::PreTranslateMessage(pMsg);
}
HBRUSH CHyperLink::CtlColor(CDC* pDC, UINT nCtlColor)
{
ASSERT(nCtlColor == CTLCOLOR_STATIC);
// Set the approriate colour
if (m_bVisited)
pDC->SetTextColor(m_crVisitedColour);
else
pDC->SetTextColor(m_crLinkColour);
// Set underline font if required
if (m_bUnderline) {
if (!(HFONT)m_Font) { // Create font only once.
LOGFONT lf;
GetFont()->GetLogFont(&lf);
lf.lfUnderline = TRUE;
m_Font.CreateFontIndirect(&lf);
}
pDC->SelectObject(&m_Font);
}
// transparent text.
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH)GetStockObject(NULL_BRUSH);
}
BOOL CHyperLink::OnSetCursor(CWnd* /*pWnd*/, UINT /*nHitTest*/, UINT /*message*/)
{
::SetCursor(m_hLinkCursor);
return TRUE;
}
void CHyperLink::PreSubclassWindow()
{
// We want to get mouse clicks via STN_CLICKED
DWORD dwStyle = GetStyle();
::SetWindowLong(m_hWnd, GWL_STYLE, dwStyle | SS_NOTIFY);
// Set the URL as the window text
if (m_strURL.IsEmpty())
GetWindowText(m_strURL);
// Check that the window text isn't empty. If it is, set it as the URL.
CString strWndText;
GetWindowText(strWndText);
if (strWndText.IsEmpty()) {
ASSERT(!m_strURL.IsEmpty()); // Window and URL both NULL. DUH!
SetWindowText(m_strURL);
}
PositionWindow(); // Adjust size of window to fit URL if necessary
// Load up the hyperlink cursor
m_hLinkCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
// Create the tooltip
CRect rect;
GetClientRect(rect);
m_ToolTip.Create(this);
m_ToolTip.AddTool(this, m_strURL, rect, TOOLTIP_ID);
CStatic::PreSubclassWindow();
}
/////////////////////////////////////////////////////////////////////////////
// CHyperLink operations
void CHyperLink::SetURL(CString strURL)
{
m_strURL = strURL;
PositionWindow();
m_ToolTip.UpdateTipText(strURL, this, TOOLTIP_ID);
}
void CHyperLink::SetColours(COLORREF crLinkColour, COLORREF crVisitedColour)
{
m_crLinkColour = crLinkColour;
m_crVisitedColour = crVisitedColour;
Invalidate();
}
void CHyperLink::SetVisited(BOOL bVisited /* = TRUE */)
{
m_bVisited = bVisited;
Invalidate();
}
void CHyperLink::SetUnderline(BOOL bUnderline /* = TRUE */)
{
m_bUnderline = bUnderline;
Invalidate();
}
void CHyperLink::SetAutoSize(BOOL bAutoSize /* = TRUE */)
{
m_bAdjustToFit = bAutoSize;
PositionWindow();
}
void CHyperLink::PositionWindow()
{
if (!m_bAdjustToFit) return;
CRect rect;
GetWindowRect(rect);
CString strWndText;
GetWindowText(strWndText);
CWnd* pParent = GetParent();
if (pParent)
pParent->ScreenToClient(rect);
CDC* pDC = GetDC();
CSize Extent = pDC->GetTextExtent(strWndText);
ReleaseDC(pDC);
DWORD dwStyle = GetStyle();
if (dwStyle & SS_CENTERIMAGE)
rect.DeflateRect(0, (rect.Height() - Extent.cy)/2);
else
rect.bottom = rect.top + Extent.cy;
if (dwStyle & SS_CENTER)
rect.DeflateRect((rect.Width() - Extent.cx)/2, 0);
else if (dwStyle & SS_RIGHT)
rect.left = rect.right - Extent.cx;
else // SS_LEFT = 0, so we can't test for it explicitly
rect.right = rect.left + Extent.cx;
SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOZORDER);
}
/////////////////////////////////////////////////////////////////////////////
// CHyperLink implementation
void CHyperLink::OnClicked()
{
int result = (int)GotoURL(m_strURL, SW_SHOW);
m_bVisited = (result > HINSTANCE_ERROR);
if (!m_bVisited) {
MessageBeep(MB_ICONEXCLAMATION); // Unable to follow link
ReportError(result);
} else
SetVisited(); // Repaint to show visited colour
}
LONG CHyperLink::GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata)
{
HKEY hkey;
LONG retval = RegOpenKeyEx(key, subkey, 0, KEY_QUERY_VALUE, &hkey);
if (retval == ERROR_SUCCESS) {
long datasize = MAX_PATH;
TCHAR data[MAX_PATH];
RegQueryValue(hkey, NULL, data, &datasize);
lstrcpy(retdata,data);
RegCloseKey(hkey);
}
return retval;
}
void CHyperLink::ReportError(int nError)
{
CString str;
switch (nError) {
case 0: str = "The operating system is out\nof memory or resources."; break;
case SE_ERR_PNF: str = "The specified path was not found."; break;
case SE_ERR_FNF: str = "The specified file was not found."; break;
case ERROR_BAD_FORMAT: str = "The .EXE file is invalid\n(non-Win32 .EXE or error in .EXE image)."; break;
case SE_ERR_ACCESSDENIED: str = "The operating system denied\naccess to the specified file."; break;
case SE_ERR_ASSOCINCOMPLETE: str = "The filename association is\nincomplete or invalid."; break;
case SE_ERR_DDEBUSY: str = "The DDE transaction could not\nbe completed because other DDE transactions\nwere being processed."; break;
case SE_ERR_DDEFAIL: str = "The DDE transaction failed."; break;
case SE_ERR_DDETIMEOUT: str = "The DDE transaction could not\nbe completed because the request timed out."; break;
case SE_ERR_DLLNOTFOUND: str = "The specified dynamic-link library was not found."; break;
case SE_ERR_NOASSOC: str = "There is no application associated\nwith the given filename extension."; break;
case SE_ERR_OOM: str = "There was not enough memory to complete the operation."; break;
case SE_ERR_SHARE: str = "A sharing violation occurred. ";
default: str.Format("Unknown Error (%d) occurred.", nError); break;
}
str = "Unable to open hyperlink:\n\n" + str;
AfxMessageBox(str, MB_ICONEXCLAMATION | MB_OK);
}
HINSTANCE CHyperLink::GotoURL(LPCTSTR url, int showcmd)
{
TCHAR key[MAX_PATH + MAX_PATH];
// First try ShellExecute()
HINSTANCE result = ShellExecute(NULL, _T("open"), url, NULL,NULL, showcmd);
// If it failed, get the .htm regkey and lookup the program
if ((UINT)result <= HINSTANCE_ERROR) {
if (GetRegKey(HKEY_CLASSES_ROOT, _T(".htm"), key) == ERROR_SUCCESS) {
lstrcat(key, _T("\\shell\\open\\command"));
if (GetRegKey(HKEY_CLASSES_ROOT,key,key) == ERROR_SUCCESS) {
TCHAR *pos;
pos = _tcsstr(key, _T("\"%1\""));
if (pos == NULL) { // No quotes found
pos = strstr(key, _T("%1")); // Check for %1, without quotes
if (pos == NULL) // No parameter at all...
pos = key+lstrlen(key)-1;
else
*pos = '\0'; // Remove the parameter
}
else
*pos = '\0'; // Remove the parameter
lstrcat(pos, _T(" "));
lstrcat(pos, url);
result = (HINSTANCE) WinExec(key,showcmd);
}
}
}
return result;
}

93
HyperLink.h Normal file
View file

@ -0,0 +1,93 @@
// HyperLink.h : header file
//
//
// HyperLink static control. Will open the default browser with the given URL
// when the user clicks on the link.
//
// Copyright Chris Maunder, 1997
// Feel free to use and distribute.
#if !defined(AFX_HYPERLINK_H__D1625061_574B_11D1_ABBA_00A0243D1382__INCLUDED_)
#define AFX_HYPERLINK_H__D1625061_574B_11D1_ABBA_00A0243D1382__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////////
// CHyperLink window
class CHyperLink : public CStatic
{
// Construction/destruction
public:
CHyperLink();
virtual ~CHyperLink();
// Attributes
public:
// Operations
public:
void SetURL(CString strURL);
CString GetURL() { return m_strURL; }
void SetColours(COLORREF crLinkColour, COLORREF crVisitedColour);
COLORREF GetLinkColour() { return m_crLinkColour; }
COLORREF GetVisitedColour() { return m_crVisitedColour; }
void SetVisited(BOOL bVisited = TRUE);
BOOL GetVisited() { return m_bVisited; }
void SetLinkCursor(HCURSOR hCursor) { m_hLinkCursor = hCursor; }
void SetUnderline(BOOL bUnderline = TRUE);
BOOL GetUnderline() { return m_bUnderline; }
void SetAutoSize(BOOL bAutoSize = TRUE);
BOOL GetAutoSize() { return m_bAdjustToFit; }
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHyperLink)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
protected:
HINSTANCE GotoURL(LPCTSTR url, int showcmd);
void ReportError(int nError);
LONG GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata);
void PositionWindow();
// Protected attributes
protected:
COLORREF m_crLinkColour, m_crVisitedColour; // Hyperlink colours
BOOL m_bVisited; // Has it been visited?
BOOL m_bUnderline; // underline hyperlink?
BOOL m_bAdjustToFit; // Adjust window size to fit text?
CString m_strURL; // hyperlink URL
CFont m_Font; // Underline font if necessary
HCURSOR m_hLinkCursor; // Cursor for hyperlink
CToolTipCtrl m_ToolTip; // The tooltip
// Generated message map functions
protected:
//{{AFX_MSG(CHyperLink)
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
//}}AFX_MSG
afx_msg void OnClicked();
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HYPERLINK_H__D1625061_574B_11D1_ABBA_00A0243D1382__INCLUDED_)

0
Install/empty.dir Normal file
View file

360
MPL-1.0.txt Normal file
View file

@ -0,0 +1,360 @@
MOZILLA PUBLIC LICENSE
Version 1.0
----------------
1. Definitions.
1.1. ``Contributor'' means each entity that creates or contributes to
the creation of Modifications.
1.2. ``Contributor Version'' means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. ``Covered Code'' means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. ``Executable'' means Covered Code in any form other than Source
Code.
1.6. ``Initial Developer'' means the individual or entity identified as
the Initial Developer in the Source Code notice required by Exhibit A.
1.7. ``Larger Work'' means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. ``License'' means this document.
1.9. ``Modifications'' means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. ``Original Code'' means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this License
is not already Covered Code governed by this License.
1.11. ``Source Code'' means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus any
associated interface definition files, scripts used to control
compilation and installation of an Executable, or a list of source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. ``You'' means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License or a future
version of this License issued under Section 6.1. For legal entities,
``You'' includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this definition,
``control'' means (a) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (b) ownership of fifty percent (50%) or more of the
outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Original Code (or portions thereof) with or without
Modifications, or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by Initial
Developer, to make, have made, use and sell (``Utilize'') the
Original Code (or portions thereof), but solely to the extent that
any such patent is reasonably necessary to enable You to Utilize
the Original Code (or portions thereof) and not to any greater
extent that may be necessary to Utilize further Modifications or
combinations.
2.2. Contributor Grant.
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Modifications created by such Contributor (or
portions thereof) either on an unmodified basis, with other
Modifications, as Covered Code or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by
Contributor, to Utilize the Contributor Version (or portions
thereof), but solely to the extent that any such patent is
reasonably necessary to enable You to Utilize the Contributor
Version (or portions thereof), and not to any greater extent that
may be necessary to Utilize further Modifications or combinations.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be distributed
only under the terms of this License or a future version of this
License released under Section 6.1, and You must include a copy of this
License with every copy of the Source Code You distribute. You may not
offer or impose any terms on any Source Code version that alters or
restricts the applicable version of this License or the recipients'
rights hereunder. However, You may include an additional document
offering the additional rights described in Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which you contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that the
Modification is derived, directly or indirectly, from Original Code
provided by the Initial Developer and including the name of the Initial
Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If You have knowledge that a party claims an intellectual property
right in particular functionality or code (or its utilization
under this License), you must include a text file with the source
code distribution titled ``LEGAL'' which describes the claim and
the party making the claim in sufficient detail that a recipient
will know whom to contact. If you obtain such knowledge after You
make Your Modification available as described in Section 3.2, You
shall promptly modify the LEGAL file in all copies You make
available thereafter and shall take other steps (such as notifying
appropriate mailing lists or newsgroups) reasonably calculated to
inform those who received the Covered Code that new knowledge has
been obtained.
(b) Contributor APIs.
If Your Modification is an application programming interface and
You own or control patents which are reasonably necessary to
implement that API, you must also include this information in the
LEGAL file.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code, and this License in any documentation for the Source Code, where
You describe recipients' rights relating to Covered Code. If You
created one or more Modification(s), You may add your name as a
Contributor to the notice described in Exhibit A. If it is not possible
to put such notice in a particular Source Code file due to its
structure, then you must include such notice in a location (such as a
relevant directory file) where a user would be likely to look for such
a notice. You may choose to offer, and to charge a fee for, warranty,
support, indemnity or liability obligations to one or more recipients
of Covered Code. However, You may do so only on Your own behalf, and
not on behalf of the Initial Developer or any Contributor. You must
make it absolutely clear than any such warranty, support, indemnity or
liability obligation is offered by You alone, and You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of the
Covered Code is available under the terms of this License, including a
description of how and where You have fulfilled the obligations of
Section 3.2. The notice must be conspicuously included in any notice in
an Executable version, related documentation or collateral in which You
describe recipients' rights relating to the Covered Code. You may
distribute the Executable version of Covered Code under a license of
Your choice, which may contain terms different from this License,
provided that You are in compliance with the terms of this License and
that the license for the Executable version does not attempt to limit
or alter the recipient's rights in the Source Code version from the
rights set forth in this License. If You distribute the Executable
version under a different license You must make it absolutely clear
that any terms which differ from this License are offered by You alone,
not by the Initial Developer or any Contributor. You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
any such terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to statute
or regulation then You must: (a) comply with the terms of this License
to the maximum extent possible; and (b) describe the limitations and
the code they affect. Such description must be included in the LEGAL
file described in Section 3.4 and must be included with all
distributions of the Source Code. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed
for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A, and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (``Netscape'') may publish revised
and/or new versions of the License from time to time. Each version will
be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If you create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), you must (a) rename Your license so that the
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
any confusingly similar phrase do not appear anywhere in your license
and (b) otherwise make it clear that your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial Developer,
Original Code or Contributor in the notice described in Exhibit A shall
not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ``commercial item,'' as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
software'' and ``commercial computer software documentation,'' as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if any,
provides otherwise), excluding its conflict-of-law provisions. With
respect to disputes in which at least one party is a citizen of, or an
entity chartered or registered to do business in, the United States of
America: (a) unless otherwise agreed in writing, all disputes relating
to this License (excepting any dispute relating to intellectual
property rights) shall be subject to final and binding arbitration,
with the losing party paying all costs of arbitration; (b) any
arbitration relating to this Agreement shall be held in Santa Clara
County, California, under the auspices of JAMS/EndDispute; and (c) any
litigation relating to this Agreement shall be subject to the
jurisdiction of the Federal Courts of the Northern District of
California, with venue lying in Santa Clara County, California, with
the losing party responsible for costs, including without limitation,
court costs and reasonable attorneys fees and expenses. The application
of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any law or regulation which
provides that the language of a contract shall be construed against the
drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
Except in cases where another Contributor has failed to comply with
Section 3.4, You are responsible for damages arising, directly or
indirectly, out of Your utilization of rights under this License, based
on the number of copies of Covered Code you made available, the
revenues you received from utilizing such rights, and other relevant
factors. You agree to work with affected parties to distribute
responsibility on an equitable basis.
EXHIBIT A.
``The contents of this file are subject to the Mozilla Public License
Version 1.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.''

875
MainFrm.cpp Normal file
View file

@ -0,0 +1,875 @@
// MainFrm.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "CB32.h"
#include "ComboBar.h"
#include "MainFrm.h"
#include "CB32Doc.h"
#include "CB32View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_MESSAGE(MYWM_NOTIFYICON, On_MYWM_NOTIFYICON)
//{{AFX_MSG_MAP(CMainFrame)
ON_WM_CREATE()
ON_WM_CLOSE()
ON_COMMAND(ID_VIEW_STATUS_BAR, OnViewStatusBar)
ON_COMMAND(ID_EDIT_FIND_COMBO, OnEditFindCombo)
ON_WM_NCPAINT()
ON_WM_NCACTIVATE()
ON_WM_SYSCOLORCHANGE()
ON_MESSAGE(WM_SETTEXT, OnSetText)
ON_MESSAGE(WM_SETTINGCHANGE, OnSettingChange)
ON_COMMAND(ID_VIEW_WNDPOS, OnViewWndpos)
ON_WM_SYSCOMMAND()
ON_COMMAND(ID_TRAY_SHOW, OnTrayShow)
ON_COMMAND(ID_TRAY_EXIT, OnTrayExit)
ON_WM_DESTROY()
ON_COMMAND(ID_VIEW_FLATBAR, OnViewFlatbar)
ON_UPDATE_COMMAND_UI(ID_VIEW_FLATBAR, OnUpdateViewFlatbar)
//}}AFX_MSG_MAP
ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS_BAR, OnUpdateViewStatusBar)
ON_UPDATE_COMMAND_UI(ID_INDICATOR_CLOCK, OnUpdateClock)
END_MESSAGE_MAP()
// toolbar buttons - IDs are command buttons
static UINT BASED_CODE buttons[] =
{
// same order as in the bitmap 'toolbar.bmp'
ID_FILE_NEW,
ID_FILE_OPEN,
ID_FILE_SAVE,
ID_SEPARATOR,
ID_ENTRY_ADD,
ID_ENTRY_EDIT,
ID_ENTRY_DELETE,
ID_ENTRY_COPY,
ID_SEPARATOR,
ID_SEPARATOR, //(10) CComboBox location in the toolbar
ID_EDIT_FIND,
ID_SEPARATOR,
ID_TBAR_DIAL,
ID_TBAR_EMAIL,
ID_TBAR_WEB,
ID_APP_PREFS,
ID_SEPARATOR,
ID_HELP_INDEX,
};
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
ID_INDICATOR_CLOCK,
};
/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction
CMainFrame::CMainFrame()
{
m_bActive = -1; // invalid
// init tray icon tracker
m_inTray = FALSE;
}
CMainFrame::~CMainFrame()
{
}
/////////////////////////////////////////////////////////////////////////////
// Helpers for saving/restoring window state
BOOL CMainFrame::ReadWindowPlacement(LPWINDOWPLACEMENT pwp)
{
CString strBuffer = theApp.GetProfileString(_T("Preferences"),
_T("WindowPos"));
if (strBuffer.IsEmpty())
return FALSE;
WINDOWPLACEMENT wp;
int nRead = _stscanf(strBuffer, _T("%u,%u,%d,%d,%d,%d,%d,%d,%d,%d"),
&wp.flags, &wp.showCmd,
&wp.ptMinPosition.x, &wp.ptMinPosition.y,
&wp.ptMaxPosition.x, &wp.ptMaxPosition.y,
&wp.rcNormalPosition.left, &wp.rcNormalPosition.top,
&wp.rcNormalPosition.right, &wp.rcNormalPosition.bottom);
if (nRead != 10)
return FALSE;
if (m_inTray)
wp.showCmd = SW_HIDE;
wp.length = sizeof wp;
*pwp = wp;
return TRUE;
}
void CMainFrame::WriteWindowPlacement(LPWINDOWPLACEMENT pwp)
{
TCHAR szBuffer[sizeof("-32767")*8 + sizeof("65535")*2];
wsprintf(szBuffer, _T("%u,%u,%d,%d,%d,%d,%d,%d,%d,%d"),
pwp->flags, pwp->showCmd,
pwp->ptMinPosition.x, pwp->ptMinPosition.y,
pwp->ptMaxPosition.x, pwp->ptMaxPosition.y,
pwp->rcNormalPosition.left, pwp->rcNormalPosition.top,
pwp->rcNormalPosition.right, pwp->rcNormalPosition.bottom);
theApp.WriteProfileString(_T("Preferences"), _T("WindowPos"),
szBuffer);
}
void CMainFrame::SaveWndSize()
{
WINDOWPLACEMENT wp;
wp.length = sizeof wp;
if (GetWindowPlacement(&wp))
{
wp.flags = 0;
if (IsZoomed())
wp.flags |= WPF_RESTORETOMAXIMIZED;
if (!IsIconic())
WriteWindowPlacement(&wp);
}
}
/////////////////////////////////////////////////////////////////////////////
// Create main window with toolbar, etc
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (theApp.GetProfileInt(_T("Preferences"),_T("StartMinimized"),0))
{
TrayMessage(NIM_ADD,IDR_MAINFRAME,
AfxGetApp()->LoadIcon(IDR_MAINFRAME),
m_strTitle + " " + GetDocTitle());
m_inTray = TRUE;
}
if (theApp.GetProfileInt(_T("Preferences"),_T("RememberWin"),1))
{
WINDOWPLACEMENT wp;
if (ReadWindowPlacement(&wp))
SetWindowPlacement(&wp);
}
if (!m_wndToolBar.Create(this) ||
!m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||
!m_wndToolBar.SetButtons(buttons,
sizeof(buttons)/sizeof(UINT)))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if (!CreateComboBox())
{
TRACE0("Failed to create combobox in toolbar\n");
return -1; // fail to create
}
// TODO: Remove this if you don't want tool tips or a resizeable toolbar
m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.SetWindowText(_T("ContactBook ToolBar"));
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
m_wndToolBar.SetFlatLook(theApp.GetProfileInt(_T("Preferences"),_T("Flatbar"),1));
if (!m_wndStatusBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM , AFX_IDW_STATUS_BAR) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
// create the timer to update the status bar clock
if(!SetTimer(TIMER_ID, 2000, &CMainFrame::UpdateTime))
return -1;
CMainFrame::UpdateTime(m_hWnd, 0, 0, 0); // update the time now
return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFrameWnd::PreCreateWindow(cs);
}
void CMainFrame::OnClose()
{
KillTimer(TIMER_ID);
if (theApp.GetProfileInt(_T("Preferences"),_T("RememberWin"),1))
SaveWndSize();
DeleteTrayIcon();
CFrameWnd::OnClose();
}
/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
CFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
CFrameWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
// Private MFC function only sets the title if it's different
//
extern void AFXAPI AfxSetWindowText(HWND, LPCTSTR);
//////////////////
// Override to change title--app name first, then doc name
void CMainFrame::OnUpdateFrameTitle(BOOL bAddToTitle)
{
AfxSetWindowText(m_hWnd, m_strTitle + " " + GetDocTitle());
}
//////////////////
// Get doc title: I use full path name or "untitled"
CString CMainFrame::GetDocTitle()
{
CString s = "";
CDocument* pDoc = GetActiveDocument();
if (pDoc != NULL)
s = pDoc->GetPathName();
return s.IsEmpty() ? "- [Untitled]" : "- ["+s+"]";
}
////////////////
// Mini-class to get the caption rectangle of a window in window coords.
// This is the area of the title bar inside the window frame,
// including the icon but not the min/max/close buttons.
class CCaptionRect : public CRect {
public:
CCaptionRect(const CWnd& wnd); // use reference to deny NULL ptr
};
/////////////////
// Paint non-client area: First let Windows paint, then I'll paint over it.
//
// I use the relatively obscure and poorly documented update region feature
// to prevent Windows from painting the title text. This is to get totally
// flicker-free painting when the user sizes the window. Note that Windows
// sometimes uses WPARAM=1.
void CMainFrame::OnNcPaint()
{
MSG& msg = AfxGetThreadState()->m_lastSentMsg;
HRGN hRgn = (HRGN)msg.wParam;
CCaptionRect rc(*this); // caption rectangle in window coords
CRect rcWin; // window rect
GetWindowRect(&rcWin); // .. get window rect
rc += rcWin.TopLeft(); // convert caption rect to screen coords
// Don't bother painting if the caption doesn't lie within the region.
if (msg.wParam > 1 && !::RectInRegion((HRGN)msg.wParam, &rc)) {
CFrameWnd::OnNcPaint(); // just do default thing
return; // and quit
}
// Exclude caption from update region
HRGN hRgnCaption = ::CreateRectRgnIndirect(&rc);
HRGN hRgnNew = ::CreateRectRgnIndirect(&rc);
if (msg.wParam > 1) {
// wParam is a valid region: subtract caption from it
::CombineRgn(hRgnNew, hRgn, hRgnCaption, RGN_DIFF);
} else {
// wParam is not a valid region: create one that's the whole
// window minus the caption bar
HRGN hRgnAll = ::CreateRectRgnIndirect(&rcWin);
CombineRgn(hRgnNew, hRgnAll, hRgnCaption, RGN_DIFF);
DeleteObject(hRgnAll);
}
// Call Windows to do WM_NCPAINT with altered update region
WPARAM savewp = msg.wParam; // save original wParam
msg.wParam = (WPARAM)hRgnNew; // set new region for DefWindowProc
CFrameWnd::OnNcPaint(); // call it
DeleteObject(hRgnCaption); // clean up
DeleteObject(hRgnNew); // ...
msg.wParam = savewp; // restore original wParam
PaintCaption(); // Now paint my special caption
}
//////////////////
// Non-client area (de)activated: paint it
BOOL CMainFrame::OnNcActivate(BOOL bActive)
{
// Mimic MFC kludge to stay active if WF_STAYACTIVE bit is on
if (m_nFlags & WF_STAYACTIVE)
bActive = TRUE;
if (!IsWindowEnabled()) // but not if disabled
bActive = FALSE;
if (bActive==m_bActive)
return TRUE; // nothing to do
// Turn WS_VISIBLE off before callinf DefWindowProc,
// so DefWindowProc won't paint and thereby cause flicker.
DWORD dwStyle = GetStyle();
if (dwStyle & WS_VISIBLE)
SetWindowLong(m_hWnd, GWL_STYLE, (dwStyle & ~ WS_VISIBLE));
// do not call the base class because it will call Default()
// and we may have changed bActive.
DefWindowProc(WM_NCACTIVATE, bActive, 0L);
if (dwStyle & WS_VISIBLE)
SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
// At this point, nothing has happened (since WS_VISIBLE was off).
// Now it's time to paint.
m_bActive = bActive; // update state
SendMessage(WM_NCPAINT); // paint non-client area (frame too)
return TRUE; // done OK
}
//////////////////
// Someone called SetWindowText: paint new text.
LRESULT CMainFrame::OnSetText(WPARAM wParam, LPARAM lParam)
{
// Turn WS_VISIBLE style off before calling Windows to
// set the text, then turn it back on again after.
DWORD dwStyle = GetStyle();
if (dwStyle & WS_VISIBLE)
SetWindowLong(m_hWnd, GWL_STYLE, dwStyle & ~ WS_VISIBLE);
LRESULT lRet = DefWindowProc(WM_SETTEXT, wParam, lParam);
if (dwStyle & WS_VISIBLE)
SetWindowLong(m_hWnd, GWL_STYLE, dwStyle);
m_rcCaption.SetRectEmpty(); // invalidate caption
SendMessage(WM_NCPAINT); // paint non-client area (frame too)
PaintCaption(); // ..and paint it
return lRet;
}
//////////////////
// User changed system settings (possibly font) or colors.
// Invalidate everything to generate anew.
LRESULT CMainFrame::OnSettingChange(WPARAM, LPARAM)
{
OnSysColorChange();
return 0;
}
void CMainFrame::OnSysColorChange()
{
m_fontCaption.DeleteObject(); // generate new fonts
m_fontAcme.DeleteObject(); // ...
m_rcCaption.SetRectEmpty(); // will force new bitmap to be created
}
//////////////////
// Paint custom caption. Flag tells whether active or not.
// Just blast the bitmap to the title bar, but not iif minimized (iconic).
void CMainFrame::PaintCaption(BOOL bActive)
{
if (!IsIconic()) {
CWindowDC dcWin(this);
CDC dc;
dc.CreateCompatibleDC(&dcWin);
CBitmap* pOldBitmap = dc.SelectObject(GetCaptionBitmap(bActive));
const CRect& rc = m_rcCaption;
dcWin.BitBlt(rc.left,rc.top,rc.Width(),rc.Height(),&dc,0,0,SRCCOPY);
}
}
//////////////////
// Helper function to compute the luminosity for an RGB color.
// Measures how bright the color is. I use this so I can draw the caption
// text using the user's chosen color, unless it's too dark. See MSDN for
// definition of luminosity and how to compute it.
static int GetLuminosity(COLORREF color)
{
#define HLSMAX 240 // This is what Display Properties uses
#define RGBMAX 255 // max r/g/b value is 255
int r = GetRValue(color);
int g = GetGValue(color);
int b = GetBValue(color);
int rgbMax = max( max(r,g), b);
int rgbMin = min( min(r,g), b);
return (((rgbMax+rgbMin) * HLSMAX) + RGBMAX ) / (2*RGBMAX);
}
#define COLOR_WHITE RGB(255,255,255)
#define COLOR_BLACK RGB(0,0,0)
#define NCOLORSHADES 64 // this many shades in gradient
//////////////////
// Helper to paint rectangle with a color.
static void PaintRect(CDC& dc, int x, int y, int w, int h, COLORREF color)
{
CBrush brush(color);
CBrush* pOldBrush = dc.SelectObject(&brush);
dc.PatBlt(x, y, w, h, PATCOPY);
dc.SelectObject(pOldBrush);
}
//////////////////
// Get the appropriate bitmap whether active/inactive. If the size of
// the caption rect has changed since the last time it was generated,
// generate it again.
//
// This is the function that actually does the shading. It creates a
// bitmap that's used to paint the caption. It looks horrible, but it's
// just a lot of bit-twiddling GDI stuff.
CBitmap* CMainFrame::GetCaptionBitmap(BOOL bActive)
{
CBitmap& bm = m_bmCaption[bActive!=0]; // one of two bitmaps
CCaptionRect rcCap(*this); // caption rectangle in win coords
if (rcCap != m_rcCaption) { // if changed since last time:
m_bmCaption[0].DeleteObject(); // delete both bitmaps,
m_bmCaption[1].DeleteObject(); // ..they are bad
m_rcCaption = rcCap; // note for next time
}
if (bm.m_hObject)
return &bm; // already have bitmap; return it.
// Either the size changed or the bitmap was never created. Create it.
rcCap -= rcCap.TopLeft(); // convert caption rectangle origin to (0,0)
int w = rcCap.Width();
int h = rcCap.Height();
int cxIcon = GetSystemMetrics(SM_CXSIZE);
int cyIcon = GetSystemMetrics(SM_CYSIZE);
// Create bitmap same size as caption area and select into memory DC
CWindowDC dcWin(this);
CDC dc;
dc.CreateCompatibleDC(&dcWin);
bm.DeleteObject();
bm.CreateCompatibleBitmap(&dcWin, w, h);
CBitmap* pOldBitmap = dc.SelectObject(&bm);
// Paint shaded background. Note all painting is into memory DC,
// not window, so there's no flicker.
if (!bActive) {
// Inactive caption: don't do shading, just fill w/bg color
PaintRect(dc, 0, 0, w, h, GetSysColor(COLOR_INACTIVECAPTION));
} else {
// Active caption: do shading
COLORREF clrBG = GetSysColor(COLOR_ACTIVECAPTION); // background color
int r = GetRValue(clrBG); // red..
int g = GetGValue(clrBG); // ..green
int b = GetBValue(clrBG); // ..blue color vals
int x = 5*rcCap.right/6; // start 5/6 of the way right
int w = x - rcCap.left; // width of area to shade
int xDelta= max(w/NCOLORSHADES,1); // width of one shade band
// Paint far right 1/6 of caption the background color
PaintRect(dc, x, 0, rcCap.right-x, h, clrBG);
// Compute new color brush for each band from x to x + xDelta.
// Excel uses a linear algorithm from black to normal, i.e.
//
// color = CaptionColor * r
//
// where r is the ratio x/w, which ranges from 0 (x=0, left)
// to 1 (x=w, right). This results in a mostly black title bar,
// since we humans don't distinguish dark colors as well as light
// ones. So instead, I use the formula
//
// color = CaptionColor * [1-(1-r)^2]
//
// which still equals black when r=0 and CaptionColor when r=1,
// but spends more time near CaptionColor. For example, when r=.5,
// the multiplier is [1-(1-.5)^2] = .75, closer to 1 than .5.
// I leave the algebra to the reader to verify that the above formula
// is equivalent to
//
// color = CaptionColor - (CaptionColor*(w-x)*(w-x))/(w*w)
//
// The computation looks horrendous, but it's only done once each
// time the caption changes size; thereafter BitBlt'ed to the screen.
//
while (x > xDelta) { // paint bands right to left
x -= xDelta; // next band
int wmx2 = (w-x)*(w-x); // w minus x squared
int w2 = w*w; // w squared
PaintRect(dc, x, 0, xDelta, h,
RGB(r-(r*wmx2)/w2, g-(g*wmx2)/w2, b-(b*wmx2)/w2));
}
PaintRect(dc,0,0,x,h,COLOR_BLACK); // whatever's left ==> black
}
// Draw icon and caption buttons.
// These are all drawn inside a rectangle of dimensions SM_C[XY]SIZE.
CRect rcButn(0,0,cxIcon,cyIcon);
// Within the basic button rectangle, Windows 95 uses a 1 or 2 pixel border
// Icon has 2 pixel border on left, 1 pixel on top/bottom, 0 right
rcButn.DeflateRect(0,1);
rcButn.left += 2;
DrawIconEx(dc.m_hDC, rcButn.left, rcButn.top,
(HICON)GetClassLong(m_hWnd, GCL_HICONSM),
rcButn.Width(), rcButn.Height(), 0, NULL, DI_NORMAL);
// Close box has a 2 pixel border on all sides but left, which is zero
rcButn.DeflateRect(0,1); // shrink top/bottom 1 more
rcButn += CPoint(w-cxIcon-2,0); // move right
dc.DrawFrameControl(&rcButn, DFC_CAPTION, DFCS_CAPTIONCLOSE);
DWORD dwStyle = GetStyle();
// Max/restore button is like close box; just shift rectangle left
if (dwStyle & WS_MAXIMIZEBOX) {
rcButn -= CPoint(cxIcon,0);
dc.DrawFrameControl(&rcButn, DFC_CAPTION,
IsZoomed() ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX);
}
// Minimize button has 2 pixel border on all sides but right.
if (dwStyle & WS_MINIMIZEBOX) {
rcButn -= CPoint(cxIcon-2,0);
dc.DrawFrameControl(&rcButn, DFC_CAPTION, DFCS_CAPTIONMIN);
}
// Now draw text. First Create fonts if needed
if (!m_fontCaption.m_hObject)
CreateFonts();
// Paint "ACME TEXT" using ACME font, always white
//CString s = m_strTitle + " "; // app title
CRect rcText = rcCap; // caption rectangle
rcText.left += cxIcon+2; // start after icon
rcText.right = rcButn.left-2; // don't draw past buttons
dc.SetBkMode(TRANSPARENT); // draw on top of our shading
//dc.SetTextColor(COLOR_WHITE); // always white
CFont* pOldFont = dc.SelectObject(&m_fontAcme);
//dc.DrawText(s, &rcText, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS);
// Now paint window title (caption)
//rcText.left += dc.GetTextExtent(s).cx; // move past "ACME EDIT "
if (rcText.right > rcText.left) { // if still room:
COLORREF clrText; // text color
if (bActive) {
// Excel always uses white for title color, but I use the user's
// selected color--unless it's too dark, then I use white.
clrText = GetSysColor(COLOR_CAPTIONTEXT);
if (GetLuminosity(clrText) < 90) // good from trial & error
clrText = COLOR_WHITE;
} else
clrText = GetSysColor(COLOR_INACTIVECAPTIONTEXT);
// Paint the text. Use DT_END_ELLIPSIS to draw ellipsis if text
// won't fit. Win32 sure is friendly!
COLORREF clrColor;
clrColor = dc.SetTextColor(clrText);
dc.SelectObject(&m_fontCaption);
dc.DrawText(m_strTitle + " " + GetDocTitle(), &rcText,
DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS);
dc.SetTextColor(clrColor);
}
// Restore DC
dc.SelectObject(pOldFont);
dc.SelectObject(pOldBitmap);
return &bm; // return bitmap to caller--whew!
}
//////////////////
// Helper function to build the fonts I need.
//
void CMainFrame::CreateFonts()
{
// Get current system caption font, just to get its size
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof(ncm);
VERIFY(SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0));
m_fontCaption.CreateFontIndirect(&ncm.lfCaptionFont);
// Create "ACME" font same size as caption font, but use Book Antiqua
m_fontAcme.CreatePointFont(80, _T("MS Sans Serif")); // 12 pt for now
LOGFONT lf;
m_fontAcme.GetLogFont(&lf); // get font info
m_fontAcme.DeleteObject(); // I don't really want 12 pt
lf.lfWeight|=FW_BOLD; // make bold
lf.lfHeight = ncm.lfCaptionFont.lfHeight; // same height as caption font
m_fontAcme.CreateFontIndirect(&lf); // create font
}
//////////////////
// CCaptionRect: Constructor conputes caption rectangle in window coords.
CCaptionRect::CCaptionRect(const CWnd& wnd)
{
// Get size of frame around window
DWORD dwStyle = wnd.GetStyle();
CSize szFrame = (dwStyle & WS_THICKFRAME) ?
CSize(GetSystemMetrics(SM_CXSIZEFRAME),
GetSystemMetrics(SM_CYSIZEFRAME)) :
CSize(GetSystemMetrics(SM_CXFIXEDFRAME),
GetSystemMetrics(SM_CYFIXEDFRAME));
int cxIcon = GetSystemMetrics(SM_CXSIZE); // width of caption icon/button
// Compute rectangle
wnd.GetWindowRect(this); // window rect in screen coords
*this -= CPoint(left, top); // shift origin to (0,0)
left += szFrame.cx; // frame
right -= szFrame.cx; // frame
top += szFrame.cy; // top = end of frame
bottom = top + GetSystemMetrics(SM_CYCAPTION) // height of caption
- GetSystemMetrics(SM_CYBORDER); // minus gray shadow border
}
///////////////////////////////////////
// time/combobar
int CMainFrame::CreateComboBox()
{
CRect rect, comboRect;
m_wndToolBar.SetButtonInfo(9, IDW_COMBO, TBBS_SEPARATOR, COMBO_WIDTH);
m_wndToolBar.GetItemRect(9, &rect);
rect.bottom += COMBO_HEIGHT;
if (!m_wndToolBar.m_toolBarCombo.Create(CBS_DROPDOWN|WS_VISIBLE|WS_TABSTOP|CBS_AUTOHSCROLL,
rect, &m_wndToolBar, IDW_COMBO))
{
return FALSE;
}
// center combo box edit control vertically within tool bar
rect.bottom -= COMBO_HEIGHT;
m_wndToolBar.m_toolBarCombo.GetWindowRect(&comboRect);
m_wndToolBar.m_toolBarCombo.ScreenToClient(&comboRect);
m_wndToolBar.m_toolBarCombo.SetWindowPos(&m_wndToolBar.m_toolBarCombo, rect.left,
rect.top + (rect.Height() - comboRect.Height())/2+1, 0, 0,
SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE);
return TRUE;
}
void CMainFrame::OnViewStatusBar()
{
CWnd* pStatusBar;
if (pStatusBar = GetDescendantWindow(AFX_IDW_STATUS_BAR))
{
pStatusBar->ShowWindow(!(pStatusBar->GetStyle() & WS_VISIBLE));
RecalcLayout();
}
}
void CMainFrame::OnUpdateViewStatusBar(CCmdUI* pCmdUI)
{
CWnd* pStatusBar;
if (pStatusBar = GetDescendantWindow(AFX_IDW_STATUS_BAR))
pCmdUI->SetCheck((pStatusBar->GetStyle() & WS_VISIBLE));
}
void CMainFrame::OnViewWndpos()
{
SaveWndSize();
AfxMessageBox(IDS_WINDSAVE, MB_ICONINFORMATION);
}
void CMainFrame::OnUpdateClock(CCmdUI* pCmdUI)
{
pCmdUI->Enable(TRUE);
}
void CMainFrame::OnEditFindCombo()
{
m_wndToolBar.m_toolBarCombo.SetFocus();
}
void CALLBACK EXPORT CMainFrame::UpdateTime(HWND hWnd,UINT nMsg, UINT nIDEvent, DWORD dwTime)
{
CString time;
BOOL bPM = TRUE;
SYSTEMTIME tm;
CMainFrame* pFrame = (CMainFrame*)CWnd::FromHandle(hWnd);
CStatusBar* pStatusBar = (CStatusBar*) pFrame->GetDescendantWindow(AFX_IDW_STATUS_BAR);
if (pStatusBar == NULL)
return;
GetLocalTime(&tm);
if (tm.wHour >= 0 && tm.wHour < 12)
bPM = FALSE;
// convert 24 hour clock
if (tm.wHour > 12) // 13 - 23
tm.wHour -= 12;
else if (tm.wHour == 0) // midnight
tm.wHour = 12;
time.Format(_T(" %d:%02.2d %s "), tm.wHour, tm.wMinute, ((bPM) ? _T("PM"):_T("AM")));
// get current pane font information and update time
UINT nID, nStyle;
int nWidth, nIndex = pStatusBar->CommandToIndex(ID_INDICATOR_CLOCK);
CClientDC dc(pStatusBar);
CFont* pOldFont = dc.SelectObject(pStatusBar->GetFont());
CSize szExtent = dc.GetTextExtent(time, time.GetLength());
dc.SelectObject(pOldFont);
pStatusBar->GetPaneInfo(nIndex, nID, nStyle, nWidth);
pStatusBar->SetPaneInfo(nIndex, nID, nStyle, szExtent.cx);
pStatusBar->SetPaneText(nIndex, time);
}
void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID == SC_MINIMIZE) && theApp.GetProfileInt(_T("Preferences"),_T("RememberTray"),1))
{
TrayMessage(NIM_ADD,IDR_MAINFRAME,
AfxGetApp()->LoadIcon(IDR_MAINFRAME),
m_strTitle + " " + GetDocTitle());
m_inTray = TRUE;
ShowWindow(SW_HIDE);
}
else
CFrameWnd::OnSysCommand(nID, lParam);
}
BOOL CMainFrame::TrayMessage(DWORD dwMessage, UINT uID, HICON hIcon,
CString pszTip)
{
BOOL res;
tnd.cbSize = sizeof(NOTIFYICONDATA);
tnd.hWnd = m_hWnd;
tnd.uID = uID;
tnd.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
tnd.uCallbackMessage = MYWM_NOTIFYICON;
tnd.hIcon = hIcon;
if (!pszTip.IsEmpty())
{
lstrcpyn(tnd.szTip, pszTip, sizeof(tnd.szTip));
}
else
{
tnd.szTip[0] = '\0';
}
res = Shell_NotifyIcon(dwMessage, &tnd);
if (hIcon)
DestroyIcon(hIcon);
return res;
}
LONG CMainFrame::On_MYWM_NOTIFYICON(UINT wParam, LONG lParam)
{
UINT uMouseMsg;
uMouseMsg = (UINT) lParam;
switch (uMouseMsg)
{
case WM_LBUTTONUP:
{
ShowWindow(SW_SHOW);
DeleteTrayIcon();
break;
}
case WM_RBUTTONUP:
{
CMenu menu;
CMenu* pSubMenu = NULL;
if (menu.LoadMenu(IDR_TRAYMENU))
pSubMenu = menu.GetSubMenu(0);
if (pSubMenu)
{
::SetMenuDefaultItem(pSubMenu->m_hMenu, 0, TRUE);
CPoint ptCur;
::GetCursorPos(&ptCur);
::SetForegroundWindow(tnd.hWnd);
::TrackPopupMenu(pSubMenu->m_hMenu, 0, ptCur.x, ptCur.y, 0, tnd.hWnd, NULL);
}
}
}
return 0;
}
void CMainFrame::OnTrayShow()
{
ShowWindow(SW_SHOW);
DeleteTrayIcon();
}
void CMainFrame::OnTrayExit()
{
DeleteTrayIcon();
theApp.HideApplication();
CDocument* pDoc = GetActiveDocument();
if (pDoc != NULL)
pDoc->SaveModified();
theApp.CloseAllDocuments(FALSE);
PostQuitMessage(0);
}
void CMainFrame::DeleteTrayIcon()
{
if (m_inTray)
{
TrayMessage(NIM_DELETE,IDR_MAINFRAME,0,"");
m_inTray = FALSE;
}
}
void CMainFrame::OnDestroy()
{
CFrameWnd::OnDestroy();
DeleteTrayIcon();
}
void CMainFrame::OnViewFlatbar()
{
m_wndToolBar.SetFlatLook(!m_wndToolBar.IsFlatLook());
theApp.WriteProfileInt(_T("Preferences"),_T("Flatbar"),
m_wndToolBar.IsFlatLook());
}
void CMainFrame::OnUpdateViewFlatbar(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_wndToolBar.IsFlatLook());
}

107
MainFrm.h Normal file
View file

@ -0,0 +1,107 @@
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#define MYWM_NOTIFYICON (WM_APP + 100)
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
CComboToolBar m_wndToolBar;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
BOOL m_inTray;
NOTIFYICONDATA tnd;
BOOL CreateComboBox();
// Stuff for painting custom title bar:
CFont m_fontCaption; // normal system font for active caption
CFont m_fontAcme; // "ACME" company font (same active/inactive)
BOOL m_bActive; // whether active or not;
CRect m_rcCaption; // caption rectangle
CBitmap m_bmCaption[2]; // bitmap captions active/inactive
// Override
void OnUpdateFrameTitle(BOOL bAddToTitle);
// Helpers
BOOL ReadWindowPlacement(LPWINDOWPLACEMENT pwp);
void WriteWindowPlacement(LPWINDOWPLACEMENT pwp);
void SaveWndSize();
CString GetDocTitle();
void PaintCaption(BOOL bActive);
void PaintCaption() { PaintCaption(m_bActive); }
void CreateFonts();
CBitmap* GetCaptionBitmap(BOOL bActive);
BOOL TrayMessage(DWORD dwMessage, UINT uID, HICON hIcon,
CString pszTip);
LONG On_MYWM_NOTIFYICON(UINT wParam, LONG lParam);
void DeleteTrayIcon();
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnClose();
afx_msg void OnViewStatusBar();
afx_msg void OnEditFindCombo();
afx_msg void OnNcPaint();
afx_msg BOOL OnNcActivate(BOOL bActive);
afx_msg void OnSysColorChange();
afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnSettingChange(WPARAM, LPARAM);
afx_msg void OnViewWndpos();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnTrayShow();
afx_msg void OnTrayExit();
afx_msg void OnDestroy();
afx_msg void OnViewFlatbar();
afx_msg void OnUpdateViewFlatbar(CCmdUI* pCmdUI);
//}}AFX_MSG
afx_msg void OnUpdateViewStatusBar(CCmdUI* pCmdUI);
afx_msg void OnUpdateClock(CCmdUI* pCmdUI);
// timer call back function
static void CALLBACK EXPORT UpdateTime(HWND hWnd,UINT nMsg, UINT nIDEvent, DWORD dwTime);
DECLARE_MESSAGE_MAP()
public:
inline CStatusBar& GetStatusBar() { return m_wndStatusBar; }
};
inline CCB32View* GetApplicationView()
{
CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();
ASSERT(pFrame);
return (CCB32View*)(pFrame)->GetActiveView();
}
/////////////////////////////////////////////////////////////////////////////

39
MakeHelp.bat Normal file
View file

@ -0,0 +1,39 @@
@echo off
REM -- First make map file from Microsoft Visual C++ generated resource.h
echo // MAKEHELP.BAT generated Help Map file. Used by CB32.HPJ. >"hlp\CB32.hm"
echo. >>"hlp\CB32.hm"
echo // Commands (ID_* and IDM_*) >>"hlp\CB32.hm"
makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\CB32.hm"
echo. >>"hlp\CB32.hm"
echo // Prompts (IDP_*) >>"hlp\CB32.hm"
makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\CB32.hm"
echo. >>"hlp\CB32.hm"
echo // Resources (IDR_*) >>"hlp\CB32.hm"
makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\CB32.hm"
echo. >>"hlp\CB32.hm"
echo // Dialogs (IDD_*) >>"hlp\CB32.hm"
makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\CB32.hm"
echo. >>"hlp\CB32.hm"
echo // Frame Controls (IDW_*) >>"hlp\CB32.hm"
makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\CB32.hm"
REM -- Make help for Project CB32
echo Building Win32 Help files
start /wait hcw /C /E /M "hlp\CB32.hpj"
if errorlevel 1 goto :Error
if not exist "hlp\CB32.hlp" goto :Error
if not exist "hlp\CB32.cnt" goto :Error
echo.
if exist Debug\nul copy "hlp\CB32.hlp" Debug
if exist Debug\nul copy "hlp\CB32.cnt" Debug
if exist Release\nul copy "hlp\CB32.hlp" Release
if exist Release\nul copy "hlp\CB32.cnt" Release
echo.
goto :done
:Error
echo hlp\CB32.hpj(1) : error: Problem encountered creating help file
:done
echo.

298
MyHeaderCtrl.cpp Normal file
View file

@ -0,0 +1,298 @@
// MyHeaderCtrl.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "MyHeaderCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyHeaderCtrl
CMyHeaderCtrl::CMyHeaderCtrl()
: marker_rect(0,0,0,0), marker_rect2(0,0,0,0)
{
m_pWidth = NULL;
m_bDragging = FALSE;
m_bCheckForDrag = FALSE;
m_fpDragCol = NULL;
m_pOwnerWnd = NULL;
m_nSortCol = -1;
}
CMyHeaderCtrl::CMyHeaderCtrl(CWnd *pWnd, void (CWnd::*fpDragCol)(int, int))
: marker_rect(0,0,0,0), marker_rect2(0,0,0,0)
{
m_pWidth = NULL;
m_bDragging = FALSE;
m_bCheckForDrag = FALSE;
m_fpDragCol = fpDragCol;
m_pOwnerWnd = pWnd;
m_nSortCol = -1;
}
CMyHeaderCtrl::~CMyHeaderCtrl()
{
}
BEGIN_MESSAGE_MAP(CMyHeaderCtrl, CHeaderCtrl)
//{{AFX_MSG_MAP(CMyHeaderCtrl)
ON_WM_MOUSEMOVE()
ON_WM_LBUTTONUP()
ON_WM_LBUTTONDOWN()
ON_WM_DRAWITEM_REFLECT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyHeaderCtrl message handlers
void CMyHeaderCtrl::OnMouseMove(UINT nFlags, CPoint point)
{
if( (MK_LBUTTON & nFlags) == 0)
{
// The left mouse button is not pressed - so reset flags
m_bCheckForDrag = FALSE;
m_bDragging = FALSE;
}
else if( m_bDragging )
{
// Get column number that falls under the mouse
int i=0, cx = 0;
if( point.x > 0 )
for( i = 0; i < GetItemCount(); i++ )
{
if( point.x > cx && point.x < cx + m_pWidth[i] )
break;
cx += m_pWidth[i];
}
if( i != m_nDropPos )
{
m_nDropPos = i;
CRect rect;
GetWindowRect( &rect );
// Invalidate area occupied by previous marker
InvalidateRect( &marker_rect );
InvalidateRect( &marker_rect2 );
// Draw a new marker
CClientDC dc(this);
POINT pts[3];
POINT pts2[3];
pts[0].x = cx -3;
pts[0].y = rect.Height()/2;
pts[1].x = cx -8;
pts[1].y = rect.Height()-4;
pts[2].x = cx -8;
pts[2].y = 4;
pts2[0].x = cx +1;
pts2[0].y = rect.Height()/2;
pts2[1].x = cx +6;
pts2[1].y = rect.Height()-4;
pts2[2].x = cx +6;
pts2[2].y = 4;
// COLORREF clrBG = GetSysColor(COLOR_ACTIVECAPTION);
COLORREF clrBG = RGB(255,0,0);
CBrush brush(clrBG);
CBrush* pOldBrush = dc.SelectObject(&brush);
dc.Polygon( pts, 3 );
dc.Polygon( pts2, 3 );
dc.SelectObject(pOldBrush);
// save marker information
marker_rect.left = cx - 9;
marker_rect.top = rect.Height() -3;
marker_rect.right = cx + 9;
marker_rect.bottom = 3;
marker_rect2.left = cx + 7;
marker_rect2.top = rect.Height() -3;
marker_rect2.right = cx - 7;
marker_rect2.bottom = 3;
}
return;
}
else if( m_bCheckForDrag )
{
// The mouse button was pressed over a column header
// and now the mouse has moved - so start drag
m_bCheckForDrag = FALSE;
m_bDragging = TRUE;
m_nDropPos = m_nDragCol;
SetCapture();
// Store information for later use
int iCount = GetItemCount();
HD_ITEM hd_item;
m_pWidth = new int[iCount];
for( int i = 0; i < iCount; i++ )
{
hd_item.mask = HDI_WIDTH;
GetItem( i, &hd_item );
m_pWidth[i] = hd_item.cxy;
}
return;
}
CHeaderCtrl::OnMouseMove(nFlags, point);
}
void CMyHeaderCtrl::OnLButtonUp(UINT nFlags, CPoint point)
{
ASSERT( m_pOwnerWnd != NULL && m_fpDragCol != NULL );
if( m_bDragging )
{
m_bDragging = FALSE;
delete[] m_pWidth;
ReleaseCapture();
Invalidate();
// Call the callback function.
if( m_nDragCol != m_nDropPos && m_nDragCol != m_nDropPos -1 )
(m_pOwnerWnd->*m_fpDragCol)( m_nDragCol, m_nDropPos );
}
CHeaderCtrl::OnLButtonUp(nFlags, point);
}
void CMyHeaderCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
// Determine if mouse was pressed over a column header
HD_HITTESTINFO hd_hittestinfo;
hd_hittestinfo.pt = point;
SendMessage(HDM_HITTEST, 0, (LPARAM)(&hd_hittestinfo));
if( hd_hittestinfo.flags == HHT_ONHEADER )
{
m_nDragCol = hd_hittestinfo.iItem;
m_bCheckForDrag = TRUE;
}
CHeaderCtrl::OnLButtonDown(nFlags, point);
}
void CMyHeaderCtrl::SetCallback( CWnd* pWnd, void (CWnd::*fpDragCol)(int, int) )
{
m_fpDragCol = fpDragCol;
m_pOwnerWnd = pWnd;
}
int CMyHeaderCtrl::SetSortImage(int nCol, BOOL bAsc)
{
int nPrevCol = m_nSortCol;
m_nSortCol = nCol;
m_bSortAsc = bAsc;
// Change the item to ownder drawn
HD_ITEM hditem;
hditem.mask = HDI_FORMAT;
GetItem( nCol, &hditem );
hditem.fmt |= HDF_OWNERDRAW;
SetItem( nCol, &hditem );
// Invalidate header control so that it gets redrawn
Invalidate();
return nPrevCol;
}
void CMyHeaderCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CDC dc;
dc.Attach( lpDrawItemStruct->hDC );
// Get the column rect
CRect rcLabel( lpDrawItemStruct->rcItem );
// Save DC
int nSavedDC = dc.SaveDC();
// Set clipping region to limit drawing within column
CRgn rgn;
rgn.CreateRectRgnIndirect( &rcLabel );
dc.SelectObject( &rgn );
rgn.DeleteObject();
// Draw the background
dc.FillRect(rcLabel, &CBrush(::GetSysColor(COLOR_3DFACE)));
// Labels are offset by a certain amount
// This offset is related to the width of a space character
int offset = dc.GetTextExtent(_T(" "), 1 ).cx*2;
// Get the column text and format
TCHAR buf[256];
HD_ITEM hditem;
hditem.mask = HDI_TEXT | HDI_FORMAT;
hditem.pszText = buf;
hditem.cchTextMax = 255;
GetItem( lpDrawItemStruct->itemID, &hditem );
// Determine format for drawing column label
UINT uFormat = DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP
| DT_VCENTER | DT_END_ELLIPSIS ;
if( hditem.fmt & HDF_CENTER)
uFormat |= DT_CENTER;
else if( hditem.fmt & HDF_RIGHT)
uFormat |= DT_RIGHT;
else
uFormat |= DT_LEFT;
// Adjust the rect if the mouse button is pressed on it
if( lpDrawItemStruct->itemState == ODS_SELECTED )
{
rcLabel.left++;
rcLabel.top += 2;
rcLabel.right++;
}
// Adjust the rect further if Sort arrow is to be displayed
if( lpDrawItemStruct->itemID == (UINT)m_nSortCol )
{
rcLabel.right -= 3 * offset;
}
rcLabel.left += offset;
rcLabel.right -= offset;
// Draw column label
if( rcLabel.left < rcLabel.right )
dc.DrawText(buf,-1,rcLabel, uFormat);
// Draw the Sort arrow
if( lpDrawItemStruct->itemID == (UINT)m_nSortCol )
{
CRect rcIcon( lpDrawItemStruct->rcItem );
// Set up pens to use for drawing the triangle
CPen penLight(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
CPen penShadow(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW));
CPen *pOldPen = dc.SelectObject( &penLight );
if( m_bSortAsc )
{
// Draw triangle pointing upwards
dc.MoveTo( rcIcon.right - 2*offset, offset-1);
dc.LineTo( rcIcon.right - 3*offset/2, rcIcon.bottom - offset );
dc.LineTo( rcIcon.right - 5*offset/2-2, rcIcon.bottom - offset );
dc.MoveTo( rcIcon.right - 5*offset/2-1, rcIcon.bottom - offset-1 );
dc.SelectObject( &penShadow );
dc.LineTo( rcIcon.right - 2*offset, offset-2);
}
else
{
// Draw triangle pointing downwords
dc.MoveTo( rcIcon.right - 3*offset/2, offset-1);
dc.LineTo( rcIcon.right - 2*offset-1, rcIcon.bottom - offset + 1 );
dc.MoveTo( rcIcon.right - 2*offset-1, rcIcon.bottom - offset );
dc.SelectObject( &penShadow );
dc.LineTo( rcIcon.right - 5*offset/2-1, offset -1 );
dc.LineTo( rcIcon.right - 3*offset/2, offset -1);
}
// Restore the pen
dc.SelectObject( pOldPen );
}
// Restore dc
dc.RestoreDC( nSavedDC );
// Detach the dc before returning
dc.Detach();
}

67
MyHeaderCtrl.h Normal file
View file

@ -0,0 +1,67 @@
#if !defined(AFX_MYHEADERCTRL_H__51B74620_2173_11D1_AF55_000000000000__INCLUDED_)
#define AFX_MYHEADERCTRL_H__51B74620_2173_11D1_AF55_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// MyHeaderCtrl.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CMyHeaderCtrl window
class CMyHeaderCtrl : public CHeaderCtrl
{
// Construction
public:
CMyHeaderCtrl();
CMyHeaderCtrl(CWnd* pWnd, void (CWnd::*fpDragCol)(int, int));
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyHeaderCtrl)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyHeaderCtrl();
void SetCallback(CWnd* pWnd, void (CWnd::*fpDragCol)(int, int));
int SetSortImage(int nCol, BOOL bAsc);
// Generated message map functions
protected:
BOOL m_bCheckForDrag;
BOOL m_bDragging;
int *m_pWidth;
int m_nDragCol;
int m_nDropPos;
CRect marker_rect;
CRect marker_rect2;
void (CWnd::*m_fpDragCol)(int, int);
CWnd *m_pOwnerWnd;
int m_nSortCol;
BOOL m_bSortAsc;
//{{AFX_MSG(CMyHeaderCtrl)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void DrawItem (LPDRAWITEMSTRUCT);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYHEADERCTRL_H__51B74620_2173_11D1_AF55_000000000000__INCLUDED_)

174
OrdPage.cpp Normal file
View file

@ -0,0 +1,174 @@
// OrdPage.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "ComboBar.h"
#include "MainFrm.h"
#include "CB32Doc.h"
#include "CB32View.h"
#include "OrdPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COrdPage property page
IMPLEMENT_DYNCREATE(COrdPage, CPropertyPage)
COrdPage::COrdPage() : CPropertyPage(COrdPage::IDD)
{
//{{AFX_DATA_INIT(COrdPage)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
COrdPage::~COrdPage()
{
}
void COrdPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(COrdPage)
DDX_Control(pDX, IDC_COLUP, m_colup);
DDX_Control(pDX, IDC_COLDOWN, m_coldown);
DDX_Control(pDX, IDC_COLBOX, m_colbox);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(COrdPage, CPropertyPage)
//{{AFX_MSG_MAP(COrdPage)
ON_BN_CLICKED(IDC_COLUP, OnColup)
ON_BN_CLICKED(IDC_COLDOWN, OnColdown)
ON_WM_DESTROY()
ON_BN_CLICKED(IDC_RESETCOL, OnResetcol)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COrdPage message handlers
BOOL COrdPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
CCB32View* pView = GetApplicationView();
int colpos[COLS];
for (int p=0; p<COLS; p++)
colpos[p] = p;
CString strBuffer = theApp.GetProfileString(_T("Columns"),_T("Order"));
if (!strBuffer.IsEmpty())
{
int tempcol[COLS];
for (int i=0; i<COLS; i++)
tempcol[i] = 0;
int nRead = _stscanf(strBuffer, _T("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"),
&tempcol[0],&tempcol[1],&tempcol[2],&tempcol[3],&tempcol[4],
&tempcol[5],&tempcol[6],&tempcol[7],&tempcol[8],&tempcol[9],
&tempcol[10],&tempcol[11],&tempcol[12],&tempcol[13],&tempcol[14],
&tempcol[15],&tempcol[16],&tempcol[17],&tempcol[18],&tempcol[19],
&tempcol[20],&tempcol[21],&tempcol[22],&tempcol[23],&tempcol[24],
&tempcol[25],&tempcol[26],&tempcol[27],&tempcol[28],&tempcol[29],
&tempcol[30],&tempcol[31]);
if (nRead == COLS)
{
for (int z=0; z<COLS; z++)
colpos[z]=tempcol[z];
}
}
for (int y=0; y<COLS; y++)
m_colbox.AddString(pView->arLabel[colpos[y]]);
m_colbox.SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void COrdPage::OnColup()
{
int iIndex;
CString strItem;
iIndex = m_colbox.GetCurSel();
if (iIndex <= 0 || iIndex == LB_ERR)
return;
m_colbox.GetText(iIndex, strItem);
m_colbox.DeleteString(iIndex);
m_colbox.InsertString(iIndex-1, strItem);
m_colbox.SetCurSel(iIndex-1);
return;
}
void COrdPage::OnColdown()
{
int iIndex;
CString strItem;
iIndex = m_colbox.GetCurSel();
if ((iIndex >= m_colbox.GetCount()-1) || iIndex == LB_ERR)
return;
m_colbox.GetText(iIndex, strItem);
m_colbox.DeleteString(iIndex);
m_colbox.InsertString(iIndex+1, strItem);
m_colbox.SetCurSel(iIndex+1);
return;
}
void COrdPage::OnDestroy()
{
if (theApp.GetProfileInt(_T("Preferences"),_T("RememberPos"),1))
{
CCB32View* pView = GetApplicationView();
int colpos[COLS];
for (int p = 0; p<COLS; p++)
colpos[p] = p; //initialize
for (int y = 0; y<COLS; y++)
{
int item = m_colbox.FindStringExact(-1,pView->arLabel[y]);
if (item != LB_ERR)
colpos[item] = y;
}
CString strBuffer;
strBuffer.Format("%d",colpos[0]);
for (int z=1; z<COLS; z++)
{
CString temp;
temp.Format("%d",colpos[z]);
strBuffer += ','+temp;
}
theApp.WriteProfileString(_T("Columns"),_T("Order"),strBuffer);
}
CPropertyPage::OnDestroy();
return;
}
void COrdPage::OnResetcol()
{
CCB32View* pView = GetApplicationView();
m_colbox.ResetContent();
for (int y=0; y<COLS; y++)
m_colbox.AddString(pView->arLabel[y]);
m_colbox.SetCurSel(0);
}

55
OrdPage.h Normal file
View file

@ -0,0 +1,55 @@
#if !defined(AFX_ORDPAGE_H__EC09DB72_6EAA_11D1_AFAE_000000000000__INCLUDED_)
#define AFX_ORDPAGE_H__EC09DB72_6EAA_11D1_AFAE_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// OrdPage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// COrdPage dialog
class COrdPage : public CPropertyPage
{
DECLARE_DYNCREATE(COrdPage)
// Construction
public:
COrdPage();
~COrdPage();
// Dialog Data
//{{AFX_DATA(COrdPage)
enum { IDD = IDD_ORDPAGE };
CButton m_colup;
CButton m_coldown;
CListBox m_colbox;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(COrdPage)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(COrdPage)
virtual BOOL OnInitDialog();
afx_msg void OnColup();
afx_msg void OnColdown();
afx_msg void OnDestroy();
afx_msg void OnResetcol();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ORDPAGE_H__EC09DB72_6EAA_11D1_AFAE_000000000000__INCLUDED_)

445
Parser.cpp Normal file
View file

@ -0,0 +1,445 @@
#ifdef IGNORE_THIS
/*
PARSER.C Lloyd Zusman, Master Byte Software, Trump User Group
(408) 395-5693 (voice only)
This program is a generalized, finite state token parser. It's
it is the most powerful parser I've seen on any BBS (if I do say
so myself). It allows you extract tokens one at a time from a
string of characters. The characters used for white space, for
break characters, and for quotes can be specified. Also,
characters in the string can be preceded by a specifiable escape
character which removes any special meaning the character may have.
There are a lot of formal parameters in this subroutine call, but
once you get familiar with them, this routine is fairly easy to use.
"#define" macros can be used to generate simpler looking calls for
commonly used applications of this routine.
First, some terminology:
token used here, a single unit of information in
the form of a group of characters.
white space space that gets ignored (except within quotes
or when escaped), like blanks and tabs. in
addition, white space terminates a non-quoted
token.
break character a character that separates non-quoted tokens.
commas are a common break character. the
usage of break characters to signal the end
of a token is the same as that of white space,
except multiple break characters with nothing
or only white space between generate a null
token for each two break characters together.
for example, if blank is set to be the white
space and comma is set to be the break
character, the line ...
A, B, C , , DEF
... consists of 5 tokens:
1) "A"
2) "B"
3) "C"
4) "" (the null string)
5) "DEF"
quote character a character that, when surrounding a group
of other characters, causes the group of
characters to be treated as a single token,
no matter how many white spaces or break
characters exist in the group. also, a
token always terminates after the closing
quote. for example, if ' is the quote
character, blank is white space, and comma
is the break character, the following
string ...
A, ' B, CD'EF GHI
... consists of 4 tokens:
1) "A"
2) " B, CD" (note the blanks & comma)
3) "EF"
4) "GHI"
the quote characters themselves do
not appear in the resultant tokens. the
double quotes are delimiters i use here for
documentation purposes only.
escape character a character which itself is ignored but
which causes the next character to be
used as is. ^ and \ are often used as
escape characters. an escape in the last
position of the string gets treated as a
"normal" (i.e., non-quote, non-white,
non-break, and non-escape) character.
for example, assume white space, break
character, and quote are the same as in the
above examples, and further, assume that
^ is the escape character. then, in the
string ...
ABC, ' DEF ^' GH' I ^ J K^ L ^
... there are 7 tokens:
1) "ABC"
2) " DEF ' GH"
3) "I"
4) " " (a lone blank)
5) "J"
6) "K L"
7) "^" (passed as is at end of line)
OK, now that you have this background, here's how to call "parser":
result=parser(flag,token,maxtok,string,white,break,quote,escape,
brkused,next,quoted)
result: 0 if we haven't reached EOS (end of string), and
1 if we have (this is an "int").
flag: right now, only the low order 3 bits are used.
1 => convert non-quoted tokens to upper case
2 => convert non-quoted tokens to lower case
0 => do not convert non-quoted tokens
(this is a "char").
token: a character string containing the returned next token
(this is a "char[]").
maxtok: the maximum size of "token". characters beyond
"maxtok" are truncated (this is an "int").
string: the string to be parsed (this is a "char[]").
white: a string of the valid white spaces. example:
char whitesp[]={" \t"};
blank and tab will be valid white space (this is
a "char[]").
break: a string of the valid break characters. example:
char breakch[]={";,"};
semicolon and comma will be valid break characters
(this is a "char[]").
IMPORTANT: do not use the name "break" as a C
variable, as this is a reserved word in C.
quote: a string of the valid quote characters. an example
would be
char whitesp[]={"'\"");
(this causes single and double quotes to be valid)
note that a token starting with one of these characters
needs the same quote character to terminate it.
for example,
"ABC '
is unterminated, but
"DEF" and 'GHI'
are properly terminated. note that different quote
characters can appear on the same line; only for
a given token do the quote characters have to be
the same (this is a "char[]").
escape: the escape character (NOT a string ... only one
allowed). use zero if none is desired (this is
a "char").
brkused: the break character used to terminate the current
token. if the token was quoted, this will be the
quote used. if the token is the last one on the
line, this will be zero (this is a pointer to a
"char").
next: this variable points to the first character of the
next token. it gets reset by "parser" as it steps
through the string. set it to 0 upon initialization,
and leave it alone after that. you can change it
if you want to jump around in the string or re-parse
from the beginning, but be careful (this is a
pointer to an "int").
quoted: set to 1 (true) if the token was quoted and 0 (false)
if not. you may need this information (for example:
in C, a string with quotes around it is a character
string, while one without is an identifier).
(this is a pointer to a "char").
Example 1:
char *whitesp[]={" \t"); // blank and tab
char *breakch[]={",\r"); // comma and carriage return
char *quotech[]={"'\""}; // single and double quote
char escape='^'; // "uparrow" is escape
main()
{
char *fgets(),line[81],brkused,quoted,token[81];
int i,next;
while(fgets(line,80,stdin)!=NULL) // get line
{
printf("Line: %s",line); // already has <CR>
i=0;
next=0; // make sure you do this
while(parser(2,token,80,line,whitesp,breakch,quotech,escape,
&brkused,&next,&quoted)==0)
{
printf(" Token %d = (%s)\n",++i,token);
if(brkchar=='\r') // <CR> is a break so it won't be included
break; // in the token. treat as end-of-line here
}
}
}
In the above example, lines are read from stdin and broken up into
tokens. All non-quoted tokens are converted to lower case. Since
fgets() returns the final carriage return, we treat it as a break
character to keep it out of the returned token. Also, since the only
way "parser" will return a non-zero error code is at end of line,
we test "brkchar" to see if we've gotten to the final carriage
return, and we explicitly break out of the inner loop if we've
hit it. Note that since fgets() puts the final <CR> right before
the end-of-string, if we left out the "if(brkchar='\r')" test,
we'd get one extra null token (just as if the line ended with a
single comma). Run this example to see how it all works.
Example 2:
.
.
.
next=0;
result=parser(1, newstr, 80, str, "", "", "", 0, &brkused, &next,
&quoted);
.
.
.
this call takes whatever is in "str" and converts it to upper case,
putting the result in "newstr".
*** end of examples ***
in case you're interested, "parser.c" was inspired by a system
subroutine that comes as part of the PRIMOS operating system for
the Prime Computer: "gt$par.plp". i loosely patterned this routine
after the Prime routine.
Revisions:
09/30/84 Lloyd Zusman Initial coding
*/
#endif
#include "stdafx.h"
#include <ctype.h>
#include "parser.h"
////////////////////////////////////////////////////////////////
// routine to find character in string
int sindex(char ch,char *string)
{
char *cp;
for(cp=string;*cp;++cp)
if(ch==*cp)
return (int)(cp-string); // return postion of character
return -1; // eol ... no match found
}
///////////////////////////////////////////////////////////////
// routine to store a character in a string
void chstore(char *string,int max,char ch, int *pos, int state,
int flag)
{
char c;
if(*pos >= 0 && *pos < max-1)
{
if(state==IN_QUOTE)
c=ch;
else
switch(flag)
{
case 1: /* convert to upper */
c=toupper(ch);
break;
case 2: /* convert to lower */
c=tolower(ch);
break;
default: /* use as is */
c=ch;
break;
}
string[(*pos)++]=c;
}
return;
}
//////////////////////////////////////////////////////////////////
// parse a given string for a token
int parser(int inflag,char *token,int tokmax,char *line,char *white,
char *brkchar,char *quote,char eschar,char *brkused,int *next,
char *quoted)
{
int _p_tokpos; // current token pos
int _p_state; // current state
int _p_flag; // option flag
char _p_curquote; // current quote char
int qp;
char c,nc;
*brkused=0; /* initialize to null */
*quoted=0; /* assume not quoted */
if(!line[*next]) /* if we're at end of line, indicate such */
return 1;
_p_state=IN_WHITE; /* initialize state */
_p_curquote=0; /* initialize previous quote char */
_p_flag=inflag; /* set option flag */
for(_p_tokpos=0;c=line[*next];++(*next)) /* main loop */
{
if((qp=sindex(c,brkchar))>=0) /* break */
{
switch(_p_state)
{
case IN_WHITE: /* these are the same here ... */
case IN_TOKEN: /* ... just get out */
case IN_OZONE: /* ditto */
++(*next);
*brkused=brkchar[qp];
goto byebye;
case IN_QUOTE: /* just keep going */
chstore(token,tokmax,c,&_p_tokpos,_p_state,_p_flag);
break;
}
}
else if((qp=sindex(c,quote))>=0) /* quote */
{
switch(_p_state)
{
case IN_WHITE: /* these are identical, */
_p_state=IN_QUOTE; /* change states */
_p_curquote=quote[qp]; /* save quote char */
*quoted=1; /* set to true as long as something is in quotes */
break;
case IN_QUOTE:
if(quote[qp]==_p_curquote) /* same as the beginning quote? */
{
_p_state=IN_OZONE;
_p_curquote=0;
}
else
chstore(token,tokmax,c,&_p_tokpos,_p_state,_p_flag); /* treat as regular char */
break;
case IN_TOKEN:
case IN_OZONE:
*brkused=c; /* uses quote as break char */
goto byebye;
}
}
else if((qp=sindex(c,white))>=0) /* white */
{
switch(_p_state)
{
case IN_WHITE:
case IN_OZONE:
break; /* keep going */
case IN_TOKEN:
_p_state=IN_OZONE;
break;
case IN_QUOTE:
chstore(token,tokmax,c,&_p_tokpos,_p_state,_p_flag); /* it's valid here */
break;
}
}
else if(c==eschar) /* escape */
{
nc=line[(*next)+1];
if(nc==0) /* end of line */
{
*brkused=0;
chstore(token,tokmax,c,&_p_tokpos,_p_state,_p_flag);
++(*next);
goto byebye;
}
switch(_p_state)
{
case IN_WHITE:
--(*next);
_p_state=IN_TOKEN;
break;
case IN_TOKEN:
case IN_QUOTE:
++(*next);
chstore(token,tokmax,nc,&_p_tokpos,_p_state,_p_flag);
break;
case IN_OZONE:
goto byebye;
}
}
else /* anything else is just a real character */
{
switch(_p_state)
{
case IN_WHITE:
_p_state=IN_TOKEN; /* switch states */
case IN_TOKEN: /* these 2 are */
case IN_QUOTE: /* identical here */
chstore(token,tokmax,c,&_p_tokpos,_p_state,_p_flag);
break;
case IN_OZONE:
goto byebye;
}
}
} /* end of main loop */
byebye:
token[_p_tokpos]=0; /* make sure token ends with EOS */
return 0;
}

10
Parser.h Normal file
View file

@ -0,0 +1,10 @@
// parser.h - Parser implementation file
// states
#define IN_WHITE 0
#define IN_TOKEN 1
#define IN_QUOTE 2
#define IN_OZONE 3
int parser(int,char*,int,char*,char*,
char*,char*,char,char*,int*,char*);

52
PrefPage.cpp Normal file
View file

@ -0,0 +1,52 @@
// PrefPage.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PrefPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPrefPage
IMPLEMENT_DYNAMIC(CPrefPage, CPropertySheet)
CPrefPage::CPrefPage(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
CPrefPage::CPrefPage(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}
CPrefPage::~CPrefPage()
{
}
BEGIN_MESSAGE_MAP(CPrefPage, CPropertySheet)
//{{AFX_MSG_MAP(CPrefPage)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPrefPage message handlers
void CPrefPage::AddCtrlPages()
{
m_hIcn = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_psh.dwFlags |= PSP_USEHICON;
m_psh.hIcon = m_hIcn;
AddPage(&m_prefset);
AddPage(&m_prefcol);
AddPage(&m_preford);
}

47
PrefPage.h Normal file
View file

@ -0,0 +1,47 @@
// PrefPage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPrefPage
#include "SetPage.h"
#include "ColPage.h"
#include "OrdPage.h"
class CPrefPage : public CPropertySheet
{
DECLARE_DYNAMIC(CPrefPage)
// Construction
public:
CPrefPage(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
CPrefPage(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
// Attributes
public:
CSetPage m_prefset;
CColPage m_prefcol;
COrdPage m_preford;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPrefPage)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CPrefPage();
void AddCtrlPages(void);
// Generated message map functions
protected:
HICON m_hIcn;
//{{AFX_MSG(CPrefPage)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////

64
PropAdd.cpp Normal file
View file

@ -0,0 +1,64 @@
// PropAdd.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PropAdd.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropAdd property page
IMPLEMENT_DYNCREATE(CPropAdd, CPropertyPage)
CPropAdd::CPropAdd() : CPropertyPage(CPropAdd::IDD)
{
//{{AFX_DATA_INIT(CPropAdd)
m_fname = _T("");
m_lname = _T("");
m_mi = _T("");
m_title = _T("");
m_add1 = _T("");
m_add2 = _T("");
m_city = _T("");
m_country = _T("");
m_state = _T("");
m_zipcode = _T("");
//}}AFX_DATA_INIT
}
CPropAdd::~CPropAdd()
{
}
void CPropAdd::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropAdd)
DDX_Text(pDX, IDC_ADD1, m_add1);
DDX_Text(pDX, IDC_ADD2, m_add2);
DDX_Text(pDX, IDC_CITY, m_city);
DDX_Text(pDX, IDC_COUNTRY, m_country);
DDX_Text(pDX, IDC_FNAME, m_fname);
DDX_Text(pDX, IDC_LNAME, m_lname);
DDX_Text(pDX, IDC_MI, m_mi);
DDX_Text(pDX, IDC_STATE, m_state);
DDX_Text(pDX, IDC_TITLE, m_title);
DDX_Text(pDX, IDC_ZIPCODE, m_zipcode);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropAdd, CPropertyPage)
//{{AFX_MSG_MAP(CPropAdd)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropAdd message handlers

47
PropAdd.h Normal file
View file

@ -0,0 +1,47 @@
// PropAdd.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPropAdd dialog
class CPropAdd : public CPropertyPage
{
DECLARE_DYNCREATE(CPropAdd)
// Construction
public:
CPropAdd();
~CPropAdd();
// Dialog Data
//{{AFX_DATA(CPropAdd)
enum { IDD = IDD_APAGE };
CString m_add1;
CString m_add2;
CString m_city;
CString m_country;
CString m_fname;
CString m_lname;
CString m_mi;
CString m_state;
CString m_title;
CString m_zipcode;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CPropAdd)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPropAdd)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

56
PropComp.cpp Normal file
View file

@ -0,0 +1,56 @@
// PropComp.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PropComp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropComp property page
IMPLEMENT_DYNCREATE(CPropComp, CPropertyPage)
CPropComp::CPropComp() : CPropertyPage(CPropComp::IDD)
{
//{{AFX_DATA_INIT(CPropComp)
m_cadd1 = _T("");
m_cadd2 = _T("");
m_comp = _T("");
m_dept = _T("");
m_mgr = _T("");
m_posn = _T("");
//}}AFX_DATA_INIT
}
CPropComp::~CPropComp()
{
}
void CPropComp::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropComp)
DDX_Text(pDX, IDC_CADD1, m_cadd1);
DDX_Text(pDX, IDC_CADD2, m_cadd2);
DDX_Text(pDX, IDC_COMP, m_comp);
DDX_Text(pDX, IDC_DEPT, m_dept);
DDX_Text(pDX, IDC_MGR, m_mgr);
DDX_Text(pDX, IDC_POSN, m_posn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropComp, CPropertyPage)
//{{AFX_MSG_MAP(CPropComp)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropComp message handlers

54
PropComp.h Normal file
View file

@ -0,0 +1,54 @@
#if !defined(AFX_PROPCOMP_H__BF3C43C1_CF77_11D0_A30E_444553540000__INCLUDED_)
#define AFX_PROPCOMP_H__BF3C43C1_CF77_11D0_A30E_444553540000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// PropComp.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPropComp dialog
class CPropComp : public CPropertyPage
{
DECLARE_DYNCREATE(CPropComp)
// Construction
public:
CPropComp();
~CPropComp();
// Dialog Data
//{{AFX_DATA(CPropComp)
enum { IDD = IDD_CPAGE };
CString m_cadd1;
CString m_cadd2;
CString m_comp;
CString m_dept;
CString m_mgr;
CString m_posn;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CPropComp)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPropComp)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PROPCOMP_H__BF3C43C1_CF77_11D0_A30E_444553540000__INCLUDED_)

53
PropInfo.cpp Normal file
View file

@ -0,0 +1,53 @@
// PropInfo.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PropInfo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropInfo
IMPLEMENT_DYNAMIC(CPropInfo, CPropertySheet)
CPropInfo::CPropInfo(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
CPropInfo::CPropInfo(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}
CPropInfo::~CPropInfo()
{
}
BEGIN_MESSAGE_MAP(CPropInfo, CPropertySheet)
//{{AFX_MSG_MAP(CPropInfo)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropInfo message handlers
void CPropInfo::AddControlPages()
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_psh.dwFlags |= PSP_USEHICON;
m_psh.hIcon = m_hIcon;
AddPage(&m_propadd);
AddPage(&m_propcomp);
AddPage(&m_propphone);
AddPage(&m_proponline);
AddPage(&m_propnote);
}

53
PropInfo.h Normal file
View file

@ -0,0 +1,53 @@
// PropInfo.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPropInfo
#include "PropAdd.h"
#include "PropComp.h"
#include "PropPhone.h"
#include "PropOnline.h"
#include "PropNote.h"
class CPropInfo : public CPropertySheet
{
DECLARE_DYNAMIC(CPropInfo)
// Construction
public:
CPropInfo(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
CPropInfo(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
protected:
// Attributes
public:
CPropAdd m_propadd;
CPropComp m_propcomp;
CPropPhone m_propphone;
CPropOnline m_proponline;
CPropNote m_propnote;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPropInfo)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CPropInfo();
void AddControlPages(void);
// Generated message map functions
protected:
HICON m_hIcon;
//{{AFX_MSG(CPropInfo)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////

46
PropNote.cpp Normal file
View file

@ -0,0 +1,46 @@
// PropNote.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PropNote.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropNote property page
IMPLEMENT_DYNCREATE(CPropNote, CPropertyPage)
CPropNote::CPropNote() : CPropertyPage(CPropNote::IDD)
{
//{{AFX_DATA_INIT(CPropNote)
m_notes = _T("");
//}}AFX_DATA_INIT
}
CPropNote::~CPropNote()
{
}
void CPropNote::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropNote)
DDX_Text(pDX, IDC_NOTES, m_notes);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropNote, CPropertyPage)
//{{AFX_MSG_MAP(CPropNote)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropNote message handlers

38
PropNote.h Normal file
View file

@ -0,0 +1,38 @@
// PropNote.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPropNote dialog
class CPropNote : public CPropertyPage
{
DECLARE_DYNCREATE(CPropNote)
// Construction
public:
CPropNote();
~CPropNote();
// Dialog Data
//{{AFX_DATA(CPropNote)
enum { IDD = IDD_NPAGE };
CString m_notes;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CPropNote)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPropNote)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

52
PropOnline.cpp Normal file
View file

@ -0,0 +1,52 @@
// PropOnline.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PropOnline.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropOnline property page
IMPLEMENT_DYNCREATE(CPropOnline, CPropertyPage)
CPropOnline::CPropOnline() : CPropertyPage(CPropOnline::IDD)
{
//{{AFX_DATA_INIT(CPropOnline)
m_email1 = _T("");
m_email2 = _T("");
m_web1 = _T("");
m_web2 = _T("");
//}}AFX_DATA_INIT
}
CPropOnline::~CPropOnline()
{
}
void CPropOnline::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropOnline)
DDX_Text(pDX, IDC_EMAIL1, m_email1);
DDX_Text(pDX, IDC_EMAIL2, m_email2);
DDX_Text(pDX, IDC_WEB1, m_web1);
DDX_Text(pDX, IDC_WEB2, m_web2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropOnline, CPropertyPage)
//{{AFX_MSG_MAP(CPropOnline)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropOnline message handlers

41
PropOnline.h Normal file
View file

@ -0,0 +1,41 @@
// PropOnline.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPropOnline dialog
class CPropOnline : public CPropertyPage
{
DECLARE_DYNCREATE(CPropOnline)
// Construction
public:
CPropOnline();
~CPropOnline();
// Dialog Data
//{{AFX_DATA(CPropOnline)
enum { IDD = IDD_OPAGE };
CString m_email1;
CString m_email2;
CString m_web1;
CString m_web2;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CPropOnline)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPropOnline)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

66
PropPhone.cpp Normal file
View file

@ -0,0 +1,66 @@
// PropPhone.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "PropPhone.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropPhone property page
IMPLEMENT_DYNCREATE(CPropPhone, CPropertyPage)
CPropPhone::CPropPhone() : CPropertyPage(CPropPhone::IDD)
{
//{{AFX_DATA_INIT(CPropPhone)
m_hphone = _T("");
m_hphonex = _T("");
m_wphone = _T("");
m_wphonex = _T("");
m_cellular = _T("");
m_cellularx = _T("");
m_pager = _T("");
m_pagerc = _T("");
m_pagerx = _T("");
m_fax = _T("");
m_faxx = _T("");
//}}AFX_DATA_INIT
}
CPropPhone::~CPropPhone()
{
}
void CPropPhone::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropPhone)
DDX_Text(pDX, IDC_CELLULAR, m_cellular);
DDX_Text(pDX, IDC_CELLULARX, m_cellularx);
DDX_Text(pDX, IDC_FAX, m_fax);
DDX_Text(pDX, IDC_FAXX, m_faxx);
DDX_Text(pDX, IDC_HPHONE, m_hphone);
DDX_Text(pDX, IDC_HPHONEX, m_hphonex);
DDX_Text(pDX, IDC_PAGER, m_pager);
DDX_Text(pDX, IDC_PAGERC, m_pagerc);
DDX_Text(pDX, IDC_PAGERX, m_pagerx);
DDX_Text(pDX, IDC_WPHONE, m_wphone);
DDX_Text(pDX, IDC_WPHONEX, m_wphonex);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropPhone, CPropertyPage)
//{{AFX_MSG_MAP(CPropPhone)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropPhone message handlers

48
PropPhone.h Normal file
View file

@ -0,0 +1,48 @@
// PropPhone.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPropPhone dialog
class CPropPhone : public CPropertyPage
{
DECLARE_DYNCREATE(CPropPhone)
// Construction
public:
CPropPhone();
~CPropPhone();
// Dialog Data
//{{AFX_DATA(CPropPhone)
enum { IDD = IDD_PPAGE };
CString m_cellular;
CString m_cellularx;
CString m_fax;
CString m_faxx;
CString m_hphone;
CString m_hphonex;
CString m_pager;
CString m_pagerc;
CString m_pagerx;
CString m_wphone;
CString m_wphonex;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CPropPhone)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPropPhone)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

122
ReadMe.txt Normal file
View file

@ -0,0 +1,122 @@
========================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : CB32
========================================================================
AppWizard has created this CB32 application for you. This application
not only demonstrates the basics of using the Microsoft Foundation classes
but is also a starting point for writing your application.
This file contains a summary of what you will find in each of the files that
make up your CB32 application.
CB32.h
This is the main header file for the application. It includes other
project specific headers (including Resource.h) and declares the
CCB32App application class.
CB32.cpp
This is the main application source file that contains the application
class CCB32App.
CB32.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Developer Studio.
res\CB32.ico
This is an icon file, which is used as the application's icon. This
icon is included by the main resource file CB32.rc.
res\CB32.rc2
This file contains resources that are not edited by Microsoft
Developer Studio. You should place all resources not
editable by the resource editor in this file.
CB32.reg
This is an example .REG file that shows you the kind of registration
settings the framework will set for you. You can use this as a .REG
file to go along with your application or just delete it and rely
on the default RegisterShellFileTypes registration.
CB32.clw
This file contains information used by ClassWizard to edit existing
classes or add new classes. ClassWizard also uses this file to store
information needed to create and edit message maps and dialog data
maps and to create prototype member functions.
/////////////////////////////////////////////////////////////////////////////
For the main frame window:
MainFrm.h, MainFrm.cpp
These files contain the frame class CMainFrame, which is derived from
CFrameWnd and controls all SDI frame features.
res\Toolbar.bmp
This bitmap file is used to create tiled images for the toolbar.
The initial toolbar and status bar are constructed in the
CMainFrame class. Edit this toolbar bitmap along with the
array in MainFrm.cpp to add more toolbar buttons.
/////////////////////////////////////////////////////////////////////////////
AppWizard creates one document type and one view:
CB32Doc.h, CB32Doc.cpp - the document
These files contain your CCB32Doc class. Edit these files to
add your special document data and to implement file saving and loading
(via CCB32Doc::Serialize).
CB32View.h, CB32View.cpp - the view of the document
These files contain your CCB32View class.
CCB32View objects are used to view CCB32Doc objects.
/////////////////////////////////////////////////////////////////////////////
Help Support:
MakeHelp.bat
Use this batch file to create your application's Help file, hlp\CB32.hLP.
hlp\CB32.hpj
This file is the Help Project file used by the Help compiler to create
your application's Help file.
hlp\*.bmp
These are bitmap files required by the standard Help file topics for
Microsoft Foundation Class Library standard commands.
hlp\*.rtf
This file contains the standard help topics for standard MFC
commands and screen objects.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named CB32.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Developer Studio reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
If your application uses MFC in a shared DLL, and your application is
in a language other than the operating system's current language, you
will need to copy the corresponding localized resources MFC40XXX.DLL
from the Microsoft Visual C++ CD-ROM onto the system or system32 directory,
and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation.
For example, MFC40DEU.DLL contains resources translated to German.) If you
don't do this, some of the UI elements of your application will remain in the
language of the operating system.
/////////////////////////////////////////////////////////////////////////////

0
Release/empty.dir Normal file
View file

315
Resource.h Normal file
View file

@ -0,0 +1,315 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by CB32.rc
//
#define IDD_ABOUTBOX 100
#define IDR_MAINFRAME 128
#define IDR_CB32TYPE 129
#define IDW_COMBO 129
#define IDS_LNAME 130
#define IDC_HAND1 130
#define IDD_APAGE 131
#define IDS_FNAME 131
#define IDD_PPAGE 132
#define IDS_MI 132
#define IDD_OPAGE 133
#define IDS_TITLE 133
#define IDD_NPAGE 134
#define IDS_ADD1 134
#define IDD_CONVERT 135
#define IDS_ADD2 135
#define IDS_CITY 136
#define IDD_ORDPAGE 136
#define IDD_FIND 137
#define IDS_COUNTRY 137
#define IDS_STATE 138
#define IDD_COLPAGE 139
#define IDS_ZIPCODE 139
#define IDS_COMP 140
#define IDD_SETPAGE 141
#define IDS_DEPT 141
#define IDS_POSN 142
#define IDS_MGR 143
#define IDR_TRAYMENU 144
#define IDS_CADD1 144
#define IDR_CONTEXTMENU 145
#define IDS_CADD2 145
#define IDD_GETNEW 146
#define IDS_HPHONE 146
#define IDD_CPAGE 147
#define IDS_HPHONEX 147
#define IDS_WPHONE 148
#define IDS_WPHONEX 149
#define IDS_CELLULAR 150
#define IDS_CELLULARX 151
#define IDS_PAGER 152
#define IDS_PAGERC 153
#define IDS_PAGERX 154
#define IDS_FAX 155
#define IDS_FAXX 156
#define IDS_EMAIL1 157
#define IDS_EMAIL2 158
#define IDS_WEB1 159
#define IDS_WEB2 160
#define IDS_NOTES 161
#define IDS_COPY 162
#define IDS_CONFIRM 163
#define IDS_PRINT_PAGE_TITLE 164
#define IDS_LOADING 165
#define IDS_SAVING 166
#define IDS_IMPORTING 167
#define IDS_IMPCOUNT 168
#define IDS_NOIMPORT 169
#define IDS_NOREAD 170
#define IDS_EXPORTING 171
#define IDS_EXPCOUNT 172
#define IDS_WINDSAVE 173
#define IDS_ENTRYADD 174
#define IDS_ENTRYEDIT 175
#define IDS_ENTRYCOPY 176
#define IDS_NOTEXT 177
#define IDS_COLSAVE 178
#define IDS_POSSAVE 179
#define IDS_PREFS 180
#define IDC_FNAME 1000
#define IDC_SETPOS 1000
#define IDC_STATIC1 1001
#define IDC_XCOUNTRY 1001
#define ID_EDIT_FIND_NEXT 1001
#define IDC_SETSTART 1001
#define IDC_LNAME 1002
#define IDC_COMBO1 1002
#define IDC_ADD1 1003
#define IDC_RADIO1 1003
#define IDC_MYEMAIL 1003
#define IDC_ADD2 1004
#define IDC_RADIO2 1004
#define IDC_CITY 1005
#define IDC_CHECK1 1005
#define IDC_STATE 1006
#define IDC_XHOMEP 1006
#define IDC_SETDELETE 1006
#define IDC_COUNTRY 1007
#define IDC_XHOMEPX 1007
#define IDC_COLBOX 1007
#define IDC_XWORKP 1008
#define IDC_HPHONE 1008
#define IDC_COLUP 1008
#define IDC_ZIPCODE 1009
#define IDC_XWORKPX 1009
#define IDC_COLDOWN 1009
#define IDC_XPAGER 1010
#define IDC_WPHONE 1010
#define IDC_RESETCOL 1010
#define IDC_XPAGERC 1011
#define IDC_EMAIL1 1011
#define IDC_RESETSIZE 1011
#define IDC_XPAGERX 1012
#define IDC_PAGER 1012
#define IDC_MYWEB 1012
#define IDC_XFAX 1013
#define IDC_EMAIL2 1013
#define IDC_XEMAIL2 1014
#define IDC_PAGERC 1014
#define IDC_XWEB1 1015
#define IDC_WEB1 1015
#define IDC_XWEB2 1016
#define IDC_FAX 1016
#define IDC_MI 1017
#define IDC_XPOSN 1017
#define IDC_XSTATE 1018
#define IDC_WEB2 1018
#define IDC_XCELL 1019
#define IDC_CELLULAR 1019
#define IDC_TITLE 1020
#define IDC_XCOMP 1020
#define IDC_XZIP 1021
#define IDC_HPHONEX 1021
#define IDC_XCELLX 1022
#define IDC_NOTES 1022
#define IDC_XFAXX 1023
#define IDC_WPHONEX 1023
#define IDC_XEMAIL1 1024
#define IDC_PAGERX 1024
#define IDC_XNOTES 1025
#define IDC_FAXX 1025
#define IDC_XDEPT 1026
#define IDC_CELLULARX 1026
#define IDC_XMGR 1027
#define IDC_XCADD1 1028
#define IDC_XCADD2 1029
#define IDC_SPINXLNAME 1030
#define IDC_SPINXFNAME 1031
#define IDC_SPINXMI 1032
#define IDC_SPINXTITLE 1033
#define IDC_SPINXADD1 1034
#define IDC_SPINXADD2 1035
#define IDC_SPINXCITY 1036
#define IDC_SPINXCOUNTRY 1037
#define IDC_SPINXSTATE 1038
#define IDC_SPINXZIP 1039
#define IDC_SPINXHOMEP 1040
#define IDC_SPINXHOMEPX 1041
#define IDC_SPINXWORKP 1042
#define IDC_SPINXWORKPX 1043
#define IDC_SPINXCELL 1044
#define IDC_SPINXCELLX 1045
#define IDC_SPINXPAGER 1046
#define IDC_SPINXPAGERC 1047
#define IDC_SPINXPAGERX 1048
#define IDC_SPINXFAX 1049
#define IDC_SPINXFAXX 1050
#define IDC_SPINXEMAIL1 1051
#define IDC_SPINXEMAIL2 1052
#define IDC_SPINXWEB1 1053
#define IDC_SPINXWEB2 1054
#define IDC_SPINXNOTES 1055
#define IDC_XLNAME 1056
#define IDC_XFNAME 1057
#define IDC_XMI 1058
#define IDC_XTITLE 1059
#define IDC_XADD1 1060
#define IDC_XADD2 1061
#define IDC_XCITY 1062
#define IDC_SPINXCOMP 1063
#define IDC_XLINE1 1064
#define IDC_SPINXDEPT 1065
#define IDC_SPINXPOSN 1066
#define IDC_SPINXMGR 1067
#define IDC_SPINXCADD1 1068
#define IDC_SPINXCADD2 1069
#define IDC_CHECK2 1085
#define IDC_CLNAME 1086
#define IDC_SPINCLNAME 1087
#define IDC_CFNAME 1088
#define IDC_SPINCFNAME 1089
#define IDC_CMI 1090
#define IDC_SPINCMI 1091
#define IDC_CTITLE 1092
#define IDC_SPINCTITLE 1093
#define IDC_SPINCADD1 1094
#define IDC_CADD2 1095
#define IDC_SPINCADD2 1096
#define IDC_CCITY 1097
#define IDC_SPINCCITY 1098
#define IDC_CCOUNTRY 1099
#define IDC_SPINCCOUNTRY 1100
#define IDC_CSTATE 1101
#define IDC_SPINCSTATE 1102
#define IDC_CZIP 1103
#define IDC_SPINCZIP 1104
#define IDC_CHOMEP 1105
#define IDC_SPINCHOMEP 1106
#define IDC_CHOMEPX 1107
#define IDC_SPINCHOMEPX 1108
#define IDC_CWORKP 1109
#define IDC_SPINCWORKP 1110
#define IDC_CWORKPX 1111
#define IDC_SPINCWORKPX 1112
#define IDC_CCELL 1113
#define IDC_SPINCCELL 1114
#define IDC_CCELLX 1115
#define IDC_SPINCCELLX 1116
#define IDC_CPAGER 1117
#define IDC_SPINCPAGER 1118
#define IDC_CPAGERC 1119
#define IDC_SPINCPAGERC 1120
#define IDC_CPAGERX 1121
#define IDC_SPINCPAGERX 1122
#define IDC_CFAX 1123
#define IDC_SPINCFAX 1124
#define IDC_CFAXX 1125
#define IDC_SPINCFAXX 1126
#define IDC_CEMAIL1 1127
#define IDC_SPINCEMAIL1 1128
#define IDC_CEMAIL2 1129
#define IDC_SPINCEMAIL2 1130
#define IDC_CWEB1 1131
#define IDC_SPINCWEB1 1132
#define IDC_CWEB2 1133
#define IDC_SPINCWEB2 1134
#define IDC_CCOMP 1135
#define IDC_SPINCCOMP 1136
#define IDC_CDEPT 1137
#define IDC_SPINCDEPT 1138
#define IDC_CPOSN 1139
#define IDC_SPINCPOSN 1140
#define IDC_CMGR 1141
#define IDC_SPINCMGR 1142
#define IDC_SETLASTFILE 1142
#define IDC_CCADD1 1143
#define IDC_SETSORT 1143
#define IDC_CADD1 1144
#define IDC_SPINCCADD1 1145
#define IDC_SETCOL 1145
#define IDC_CCADD2 1146
#define IDC_SETEXP 1146
#define IDC_SPINCCADD2 1147
#define IDC_SETIMP 1147
#define IDC_SETWIN 1148
#define IDC_CNOTES 1148
#define IDC_SETMRU 1149
#define IDC_SPINCNOTES 1149
#define IDC_SPINSETMRU 1150
#define IDC_SETUSEMRU 1151
#define IDC_SETCITY 1152
#define IDC_SETSTATE 1153
#define IDC_SETCOUNTRY 1154
#define IDC_SETZIP 1155
#define IDC_SETEMAIL 1156
#define IDC_SETWEB 1157
#define IDC_SETPREFIX 1158
#define IDC_SETTRAY 1159
#define IDC_NEWINFO 1160
#define IDC_ADDINFO 1161
#define IDC_COMP 1162
#define IDC_DEPT 1163
#define IDC_SETCOMP 1163
#define IDC_POSN 1164
#define IDC_FCOMBO 1164
#define IDC_MGR 1165
#define ID_VIEW_FLATBAR 32771
#define ID_EDIT_SELECTALL 32772
#define ID_VIEW_COLPOS 32772
#define ID_ENTRY_ADD 32773
#define ID_ENTRY_EDIT 32774
#define ID_ENTRY_DELETE 32775
#define ID_ENTRY_COPY 32776
#define ID_FILE_IMPORT 32803
#define ID_IMPORT_CSV 32804
#define ID_IMPORT_TAB 32805
#define ID_EXPORT_CSV 32806
#define ID_EXPORT_TAB 32807
#define ID_ENTRY_PREF 32808
#define ID_APP_PREFS 32809
#define ID_VIEW_FIND_NEXT 32813
#define ID_EDIT_FIND_COMBO 32814
#define ID_VIEW_WNDPOS 32817
#define ID_VIEW_COLSET 32818
#define ID_TRAY_SHOW 32819
#define ID_TRAY_EXIT 32820
#define ID_DIAL_HOME 32822
#define ID_DIAL_WORK 32823
#define ID_DIAL_CELL 32824
#define ID_DIAL_PAGER 32825
#define ID_DIAL_FAX 32826
#define ID_EMAIL_ADD1 32827
#define ID_EMAIL_ADD2 32828
#define ID_URL1 32829
#define ID_URL2 32830
#define ID_TBAR_DIAL 32831
#define ID_TBAR_EMAIL 32832
#define ID_TBAR_WEB 32833
#define ID_INDICATOR_CLOCK 59142
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 137
#define _APS_NEXT_COMMAND_VALUE 32780
#define _APS_NEXT_CONTROL_VALUE 1013
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

95
SetPage.cpp Normal file
View file

@ -0,0 +1,95 @@
// SetPage.cpp : implementation file
//
#include "stdafx.h"
#include "CB32.h"
#include "SetPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetPage property page
IMPLEMENT_DYNCREATE(CSetPage, CPropertyPage)
CSetPage::CSetPage() : CPropertyPage(CSetPage::IDD)
{
//{{AFX_DATA_INIT(CSetPage)
m_setlastfile = FALSE;
m_setsort = FALSE;
m_setcol = FALSE;
m_setexp = FALSE;
m_setimp = FALSE;
m_setwin = FALSE;
m_setmru = 0;
m_setcity = _T("");
m_setcountry = _T("");
m_setemail = _T("");
m_setstate = _T("");
m_setweb = _T("");
m_setzip = _T("");
m_setusemru = FALSE;
m_setprefix = _T("");
m_settray = FALSE;
m_setcomp = _T("");
m_setpos = FALSE;
m_setstart = FALSE;
m_setdelete = FALSE;
//}}AFX_DATA_INIT
}
CSetPage::~CSetPage()
{
}
void CSetPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetPage)
DDX_Control(pDX, IDC_SPINSETMRU, m_spinsetmru);
DDX_Check(pDX, IDC_SETLASTFILE, m_setlastfile);
DDX_Check(pDX, IDC_SETSORT, m_setsort);
DDX_Check(pDX, IDC_SETCOL, m_setcol);
DDX_Check(pDX, IDC_SETEXP, m_setexp);
DDX_Check(pDX, IDC_SETIMP, m_setimp);
DDX_Check(pDX, IDC_SETWIN, m_setwin);
DDX_Text(pDX, IDC_SETMRU, m_setmru);
DDV_MinMaxInt(pDX, m_setmru, 1, 8);
DDX_Text(pDX, IDC_SETCITY, m_setcity);
DDX_Text(pDX, IDC_SETCOUNTRY, m_setcountry);
DDX_Text(pDX, IDC_SETEMAIL, m_setemail);
DDX_Text(pDX, IDC_SETSTATE, m_setstate);
DDX_Text(pDX, IDC_SETWEB, m_setweb);
DDX_Text(pDX, IDC_SETZIP, m_setzip);
DDX_Check(pDX, IDC_SETUSEMRU, m_setusemru);
DDX_Text(pDX, IDC_SETPREFIX, m_setprefix);
DDX_Check(pDX, IDC_SETTRAY, m_settray);
DDX_Text(pDX, IDC_SETCOMP, m_setcomp);
DDX_Check(pDX, IDC_SETPOS, m_setpos);
DDX_Check(pDX, IDC_SETSTART, m_setstart);
DDX_Check(pDX, IDC_SETDELETE, m_setdelete);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetPage, CPropertyPage)
//{{AFX_MSG_MAP(CSetPage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetPage message handlers
BOOL CSetPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
m_spinsetmru.SetRange(1,8);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

58
SetPage.h Normal file
View file

@ -0,0 +1,58 @@
// SetPage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CSetPage dialog
class CSetPage : public CPropertyPage
{
DECLARE_DYNCREATE(CSetPage)
// Construction
public:
CSetPage();
~CSetPage();
// Dialog Data
//{{AFX_DATA(CSetPage)
enum { IDD = IDD_SETPAGE };
CSpinButtonCtrl m_spinsetmru;
BOOL m_setlastfile;
BOOL m_setsort;
BOOL m_setcol;
BOOL m_setexp;
BOOL m_setimp;
BOOL m_setwin;
int m_setmru;
CString m_setcity;
CString m_setcountry;
CString m_setemail;
CString m_setstate;
CString m_setweb;
CString m_setzip;
BOOL m_setusemru;
CString m_setprefix;
BOOL m_settray;
CString m_setcomp;
BOOL m_setpos;
BOOL m_setstart;
BOOL m_setdelete;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CSetPage)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CSetPage)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

6
StdAfx.cpp Normal file
View file

@ -0,0 +1,6 @@
// stdafx.cpp : source file that includes just the standard includes
// CB32.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

27
StdAfx.h Normal file
View file

@ -0,0 +1,27 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__20BFD1E9_4F52_11D1_AF86_000000000000__INCLUDED_)
#define AFX_STDAFX_H__20BFD1E9_4F52_11D1_AF86_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxcview.h>
#include <afx.h>
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__20BFD1E9_4F52_11D1_AF86_000000000000__INCLUDED_)

750
ToolBarEx.cpp Normal file
View file

@ -0,0 +1,750 @@
/////////////////////////////////////////////////////////////////////////////
// Copyright (C) 1997 by Joerg Koenig
// All rights reserved
//
// Distribute freely, except: don't remove my name from the source or
// documentation (don't take credit for my work), mark your changes (don't
// get me blamed for your possible bugs), don't alter or remove this
// notice.
// No warrantee of any kind, express or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// J.Koenig@adg.de (company site)
// Joerg.Koenig@rhein-neckar.de (private site)
/////////////////////////////////////////////////////////////////////////////
// ToolBarEx.cpp : implementation file
//
// Description:
// CToolBarEx provides additional features to the standard toolbar
// "CToolBar". The main addition is the flat mode (last seen in
// Developer Studio 5.0).
// There are no special requirements for having the flat mode in your
// application (no special comctl32.dll or what ever)!
// If you need custom draw abilities, then you have to use VC++ >= 4.2
// However, the flat mode should work with older versions of VC++ too (let
// me know of your experiences!)
//
// Usage:
// The only task you have to perform, is to
// #include "ToolBarEx.h"
// in either StdAfx.h or MainFrm.h and to change the type of
// CMainFrame::m_wndToolBar from CToolBar to CToolBarEx.
// Don't forget to recompile :-)
//
// Acknowledgements:
// o The main idea of how to draw a separator and the gripper is stolen
// from Roger Onslow's MSIE flat toolbar.
// Thanks for saving my time, Roger ;-)
// o The embossed drawing of a disabled image came from
// Victor M. Vogelpoel (victorv@telic.nl)
// o Some hints for buttons with text came from
// David Bates (bates@econ.ubc.ca)
// (I'm still thinking, text on toolbar-buttons is broken.
// That has to be tooltip's work. However, texts on buttons
// now work)
//
//
// (known) bugs and limitations:
// o the CDRF_NEWFONT notification is still untested ...
// o Assigning texts to buttons may cause the buttons to
// resize horizontally without notified by CToolBar. This
// leads to a wrong calculation inside CalcDynamicLayout()
// and CalcFixedLayout(). One could override both these
// functions in derived classes to avoid that problem,
// but that would be a greater pain ...
//
// if you find others (and have a solution for them ?!), please let me know:
// Joerg.Koenig@rhein-neckar.de (private site) or
// J.Koenig@adg.de (company site)
//
// Changes:
// 11/07/97
// (2 minor bugs have been occured as a result of the last update :)
// o The WRAP state of a separator will be ignored now, if
// the bar is docked vertically
// o Draw an image transparently. This is needed only if one
// uses 256 color images.
//
// 10/30/97
// o texts on buttons now work
// o gripper improved for a closer look like Office97
// o disabled images now look embossed
// o a separator is drawn only if it has no WRAP state set
#include "stdafx.h"
#include "ToolBarEx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// local helper class CCustomDrawInfo
//
// The helper class CCustomDrawInfo handles the messaging to the docking
// frame of the toolbar in flat mode only. If flat-mode is disabled, then
// MFC's own messanger will be used.
//
// A few words about custom draw on toolbars:
// o custom draw is possible for MFC >= 4.2 only (older versions don't know
// anything about certain structures ...)
// o MFC does not set the "rc" member of NMCUSTOMDRAW to the rectangle of the
// button that will be drawn. However, we do, so watch out, wether the
// toolbar is flat or not (or ignore the "rc" member in both cases).
// If the current mode is not "flat", then MFC's art of message arrives ...
// o MFC does not send a message for separators, so we too don't do it.
// o It seems that MFC toolbars never send *ERASE notifications; instead they
// send TBN_QUERYDELETE for instance.
// o The CDRF_NEWFONT notification result is ignored (in flat mode. Never
// tried with original MFC, because it is broken on toolbars).
/////////////////////////////////////////////////////////////////////////////
class CCustomDrawInfo {
#if _MFC_VER >= 0x0420
NMCUSTOMDRAW m_CDRW; // custom draw information holder
LRESULT m_PrePaint; // result from prepaint notification
LRESULT m_ItemPrePaint; // dito for specific item
CToolBarEx * m_pToolBar; // the real sender of the notification
CWnd * m_pReceiver; // the receiver of the notification
LRESULT NotifyParent();
#endif // _MFC_VER
public: // construction
CCustomDrawInfo( CDC & dc, CToolBarEx * pToolBar );
public:
// NotifyItemPrePaint() returns TRUE,
// if the user wants to do the default
// (CDRF_DODEFAULT) or FALSE, if the
// user wants to skip (CDRF_SKIPDEFAULT)
// Note that CDRF_SKIPDEFAULT is not
// allowed for CDDS_PREPAINT, CDDS_POSTPAINT !
// and CDDS_ITEMPOSTPAINT
void NotifyPrePaint();
BOOL NotifyItemPrePaint(int item);
void NotifyItemPostPaint(int item);
void NotifyPostPaint();
};
#if _MFC_VER >= 0x420
LRESULT CCustomDrawInfo :: NotifyParent() {
LRESULT lRes = CDRF_DODEFAULT;
if( m_pReceiver )
lRes = m_pReceiver->SendMessage(WM_NOTIFY,
WPARAM(m_CDRW.hdr.idFrom),
LPARAM(&m_CDRW));
return lRes;
}
CCustomDrawInfo :: CCustomDrawInfo( CDC & dc, CToolBarEx * pBar )
: m_PrePaint(0)
, m_ItemPrePaint(0)
{
VERIFY((m_pToolBar = pBar) != 0);
VERIFY((m_CDRW.hdc = dc.GetSafeHdc()) != 0);
HWND hwnd = pBar->GetSafeHwnd();
VERIFY(::IsWindow(hwnd));
// initialise the NMHDR member of the customdraw structure
m_CDRW.hdr.hwndFrom = hwnd;
m_CDRW.hdr.idFrom = UINT(::GetWindowLong(hwnd, GWL_ID));
m_CDRW.hdr.code = NM_CUSTOMDRAW;
// Do not use CControlBar::GetDockingFrame() to receive
// the parent. CWnd::GetParent() is inacceptable too.
// Both these functions don't work, if the toolbar is
// floating in the air!
m_pReceiver = pBar->GetParentFrame();
if( m_pReceiver )
VERIFY(::IsWindow(m_pReceiver->GetSafeHwnd()));
}
void CCustomDrawInfo :: NotifyPrePaint() {
// fill the customdraw structure with values for CDDS_PREPAINT
m_CDRW.dwDrawStage = CDDS_PREPAINT;
// the rest of the structure stays undefined in this stage
// of drawing.
m_PrePaint = NotifyParent();
}
BOOL CCustomDrawInfo :: NotifyItemPrePaint( int nItem ) {
BOOL bRet = TRUE; // we assume to do the default
if( m_PrePaint & CDRF_NOTIFYITEMDRAW ) {
m_CDRW.dwDrawStage = CDDS_ITEMPREPAINT;
m_pToolBar->GetItemRect(nItem, &m_CDRW.rc);
m_CDRW.dwItemSpec = DWORD(m_pToolBar->GetItemID(nItem));
UINT uStyle = m_pToolBar->GetButtonStyle(nItem);
BOOL bEnable = m_pToolBar->GetToolBarCtrl()
.IsButtonEnabled(m_CDRW.dwItemSpec);
m_CDRW.uItemState = (bEnable ? 0 : CDIS_DISABLED) |
(((uStyle & TBBS_PRESSED) || (uStyle & TBBS_CHECKED)) ?
CDIS_CHECKED : 0);
m_CDRW.lItemlParam = 0;
m_ItemPrePaint = NotifyParent();
if( m_ItemPrePaint & CDRF_SKIPDEFAULT )
bRet = FALSE;
}
return bRet;
}
void CCustomDrawInfo :: NotifyItemPostPaint( int nItem ) {
if( m_ItemPrePaint & CDRF_NOTIFYPOSTPAINT ) {
m_CDRW.dwDrawStage = CDDS_ITEMPOSTPAINT;
// the rest of the data has not been changed since ITEMPREPAINT
// make sure it is so:
ASSERT(m_pToolBar->GetItemID(nItem) == m_CDRW.dwItemSpec);
NotifyParent();
}
}
void CCustomDrawInfo :: NotifyPostPaint() {
if( m_PrePaint & CDRF_NOTIFYPOSTPAINT ) {
m_CDRW.dwDrawStage = CDDS_POSTPAINT;
NotifyParent();
}
}
#else // _MFC_VER < 4.2
CCustomDrawInfo :: CCustomDrawInfo( CDC & dc, CWnd * pParent ) {
}
void CCustomDrawInfo :: NotifyPrePaint() {
}
void CCustomDrawInfo :: NotifyPostPaint() {
}
BOOL CCustomDrawInfo :: NotifyItemPrePaint( int ) {
return TRUE; // we always make the drawing by ourself
}
void CCustomDrawInfo :: NotifyItemPostPaint( int ) {
}
#endif // _MFC_VER
/////////////////////////////////////////////////////////////////////////////
// CToolBarEx
CToolBarEx::CToolBarEx()
: m_bFlatLook(TRUE)
, m_clrBtnFace(::GetSysColor(COLOR_BTNFACE))
, m_clrBtnHilight(::GetSysColor(COLOR_BTNHILIGHT))
, m_clrBtnShadow(::GetSysColor(COLOR_BTNSHADOW))
, m_nLastBtn(-1)
, m_uTimerEvent(0)
{
CalculateOffset();
// create the default font, used for buttons with text
CFont Font;
BOOL bOldSys = FALSE;
if( ! Font.CreateStockObject( DEFAULT_GUI_FONT ) ) {
// older versions of Windows* (NT 3.51 for instance)
// fail with DEFAULT_GUI_FONT
VERIFY( Font.CreateStockObject( SYSTEM_FONT ) );
bOldSys = TRUE;
}
LOGFONT logfont ;
Font.GetLogFont( &logfont ) ;
if( bOldSys ) {
logfont.lfWeight = 400;
strcpy(logfont.lfFaceName,_T("MS Sans Serif"));
}
logfont.lfHeight = 6 ;
logfont.lfWidth = 0 ; // let windows compute this.
VERIFY( m_GuiFont.CreateFontIndirect( &logfont ) ) ;
}
CToolBarEx::~CToolBarEx()
{
}
IMPLEMENT_DYNAMIC(CToolBarEx, CToolBar)
BEGIN_MESSAGE_MAP(CToolBarEx, CToolBar)
//{{AFX_MSG_MAP(CToolBarEx)
ON_WM_PAINT()
ON_WM_SYSCOLORCHANGE()
ON_WM_NCCALCSIZE()
ON_WM_MOUSEMOVE()
ON_WM_NCPAINT()
ON_WM_TIMER()
ON_WM_CREATE()
//}}AFX_MSG_MAP
ON_MESSAGE(TB_SETBUTTONSIZE, OnSetButtonSize)
ON_MESSAGE(TB_SETBITMAPSIZE, OnSetBitmapSize)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CToolBarEx message handlers
LRESULT CToolBarEx :: OnSetButtonSize(WPARAM wParam, LPARAM lParam) {
LRESULT lResult = CToolBar::OnSetButtonSize(wParam, lParam);
if( lResult )
CalculateOffset();
return lResult;
}
LRESULT CToolBarEx :: OnSetBitmapSize(WPARAM wParam, LPARAM lParam) {
LRESULT lResult = CToolBar::OnSetBitmapSize(wParam, lParam);
if( lResult )
CalculateOffset();
return lResult;
}
void CToolBarEx::OnPaint()
{
HIMAGELIST hImg = GetImageList();
#ifdef _DEBUG
if( hImg == 0 ) {
TRACE0("CToolBarEx::OnPaint(): could not get image list\n");
}
#endif
if( m_bFlatLook && hImg ) {
CRect rcUpdate;
if( ! GetUpdateRect(rcUpdate) )
return;
if( m_pStringMap && !m_pStringMap->IsEmpty() )
CalculateOffset(); // strings may have been added
// attach image-list for even more MFC feeling :)
CImageList imglist;
imglist.Attach(hImg);
POINT cursor;
::GetCursorPos(&cursor);
ScreenToClient(&cursor);
CPaintDC dc(this); // device context for painting
CFont * pOldFont = dc.SelectObject(&m_GuiFont);
// Now it's time for the first custom-draw-notification...
CCustomDrawInfo cdrw(dc, this);
cdrw.NotifyPrePaint();
register const int nBtn = GetToolBarCtrl().GetButtonCount();
for( register int i = 0; i < nBtn; ++i ) {
CRect rc;
GetItemRect(i, rc);
int nBitmap; UINT uID, uStyleState;
GetButtonInfo(i, uID, uStyleState, nBitmap);
WORD wStyle = LOWORD(uStyleState);
WORD wState = HIWORD(uStyleState);
if( wState & TBSTATE_HIDDEN )
continue;
if( wStyle == TBSTYLE_SEP ) {
if( !(wState & TBSTATE_WRAP) || ! IsFloating() )
DrawSeparator(dc, rc);
} else {
if( ! CRect().IntersectRect(rcUpdate, rc) )
continue; // this button needs no repaint
// maybe the button has text
dc.SetTextColor(RGB(0,0,0));
dc.SetBkColor(m_clrBtnFace);
// There is a bug in CToolBar: If there are texts assigned
// to buttons, then the button-widths may change transparently
// (without notified by CToolBar), so we recalculate the
// horizontal offset here:
m_sizeOffset.cx = (rc.Width() - m_sizeImage.cx) / 2;
if( ! cdrw.NotifyItemPrePaint(i) )
continue; // parent has already drawn the button
BOOL bBtnDown = (wState & TBSTATE_CHECKED) || (wState & TBSTATE_PRESSED);
BOOL bBtnEnabled = GetToolBarCtrl().IsButtonEnabled(int(uID));
dc.FillSolidRect(rc,m_clrBtnFace);
// it seems, that CDC::Draw3dRect() changes the background color
COLORREF clrBk = dc.GetBkColor();
if( bBtnDown )
// draw a pressed button
dc.Draw3dRect(rc, m_clrBtnShadow, m_clrBtnHilight);
else if( rc.PtInRect(cursor) && ! bBtnDown && bBtnEnabled )
// draw a normal button
dc.Draw3dRect(rc, m_clrBtnHilight, m_clrBtnShadow);
else if( ! bBtnDown && bBtnEnabled )
// Draw an invisible rect around the button.
// This prevents us from erasing the background
// if the button was formed before
// (that would cause the button to flicker ...)
dc.Draw3dRect(rc, m_clrBtnFace, m_clrBtnFace);
dc.SetBkColor(clrBk);
// the point where to start with the image
CPoint pt(rc.left + m_sizeOffset.cx + bBtnDown,
rc.top + m_sizeOffset.cy + bBtnDown);
imglist.Draw(&dc, nBitmap, pt, ILD_TRANSPARENT);
CString strText = GetButtonText(i);
if( strText.GetLength() ) {
CRect rectText(
rc.left+3+bBtnDown,
rc.top+m_sizeOffset.cy+m_sizeImage.cy+1+bBtnDown,
rc.right-3+bBtnDown,
rc.bottom-3+bBtnDown
);
dc.DrawText(strText, rectText, DT_CENTER|DT_VCENTER|DT_NOCLIP);
}
if( ! bBtnEnabled )
// gray out that button
DrawDisabledButton(dc, rc);
cdrw.NotifyItemPostPaint(i);
}
}
dc.SelectObject(pOldFont);
if( ! m_bDeleteImgList )
imglist.Detach();
// last but not least: inform the parent for end of painting
cdrw.NotifyPostPaint();
} else
// classic mode (or couldn't receive imagelist)
CToolBar::OnPaint();
}
void CToolBarEx :: DrawDisabledButton( CDC & dc, const CRect & rc ) const {
// create a monochrome memory DC
CDC ddc;
ddc.CreateCompatibleDC(0);
CBitmap bmp;
bmp.CreateCompatibleBitmap(&ddc, rc.Width(), rc.Height());
CBitmap * pOldBmp = ddc.SelectObject(&bmp);
// build a mask
ddc.PatBlt(0, 0, rc.Width(), rc.Height(), WHITENESS);
dc.SetBkColor(m_clrBtnFace);
ddc.BitBlt(0, 0, rc.Width(), rc.Height(), &dc, rc.left, rc.top, SRCCOPY);
dc.SetBkColor(m_clrBtnHilight);
ddc.BitBlt(0, 0, rc.Width(), rc.Height(), &dc, rc.left, rc.top, SRCPAINT);
// Copy the image from the toolbar into the memory DC
// and draw it (grayed) back into the toolbar.
dc.FillSolidRect(rc.left, rc.top, rc.Width(), rc.Height(), m_clrBtnFace);
dc.SetBkColor(RGB(0, 0, 0));
dc.SetTextColor(RGB(255, 255, 255));
CBrush brShadow, brHilight;
brHilight.CreateSolidBrush(m_clrBtnHilight);
brShadow.CreateSolidBrush(m_clrBtnShadow);
CBrush * pOldBrush = dc.SelectObject(&brHilight);
dc.BitBlt(rc.left+1, rc.top+1, rc.Width(), rc.Height(), &ddc, 0, 0, 0x00E20746L);
dc.SelectObject(&brShadow);
dc.BitBlt(rc.left, rc.top, rc.Width(), rc.Height(), &ddc, 0, 0, 0x00E20746L);
// reset DCs
dc.SelectObject(pOldBrush);
ddc.SelectObject(pOldBmp);
ddc.DeleteDC();
bmp.DeleteObject();
}
void CToolBarEx :: DrawSeparator( CDC & dc, CRect & rc ) const {
BOOL bHorz = ((m_dwStyle & CBRS_ORIENT_HORZ) != 0) ? TRUE : FALSE;
// make sure, this separator is not a placeholder for
// another control.
if( rc.Width() <= 8 ) {
if( bHorz ) {
// draw the separator bar in the middle
int x = (rc.left + rc.right) / 2;
rc.left = x-1; rc.right = x+1;
dc.Draw3dRect(
rc,
m_clrBtnShadow,
m_clrBtnHilight
);
} else {
// draw the separator bar in the middle
rc.left = rc.left - m_sizeButton.cx;
rc.right = rc.left + m_sizeButton.cx;
rc.top = rc.bottom+1;
rc.bottom = rc.top+3;
int y = (rc.top+rc.bottom)/2;
rc.top = y-1; rc.bottom = y+1;
dc.Draw3dRect(
rc,
m_clrBtnShadow,
m_clrBtnHilight
);
}
}
}
void CToolBarEx :: DrawGripper( CDC & dc ) const {
if( m_dwStyle & CBRS_FLOATING )
return; // no gripper if floating
CRect gripper;
GetWindowRect(gripper);
ScreenToClient(gripper);
gripper.OffsetRect(-gripper.left, -gripper.top);
if( m_dwStyle & CBRS_ORIENT_HORZ ) {
// gripper at left
gripper.DeflateRect(4, 4);
gripper.right = gripper.left+3;
dc.Draw3dRect(
gripper,
m_clrBtnHilight,
m_clrBtnShadow
);
gripper.OffsetRect(3, 0);
dc.Draw3dRect(
gripper,
m_clrBtnHilight,
m_clrBtnShadow
);
} else {
// gripper at top
gripper.DeflateRect(4, 4);
gripper.bottom = gripper.top+3;
dc.Draw3dRect(
gripper,
m_clrBtnHilight,
m_clrBtnShadow
);
gripper.OffsetRect(0, 3);
dc.Draw3dRect(
gripper,
m_clrBtnHilight,
m_clrBtnShadow
);
}
}
void CToolBarEx :: OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler ) {
if( m_bFlatLook ) {
// save current styles
register const int nBtn = GetToolBarCtrl().GetButtonCount();
register int nIdx;
for( nIdx = 0; nIdx < nBtn; ++nIdx )
m_Styles.SetAtGrow(nIdx, GetButtonStyle(nIdx));
// do base class processing
CToolBar::OnUpdateCmdUI(pTarget,bDisableIfNoHndler);
//check wether styles have been changed
for( nIdx = 0; nIdx < nBtn; ++nIdx ) {
if( m_Styles[nIdx] != GetButtonStyle(nIdx) ) {
// invalidate that button
CRect rc;
GetItemRect(nIdx, rc);
InvalidateRect(rc);
}
}
} else
// simply delegate
CToolBar::OnUpdateCmdUI(pTarget,bDisableIfNoHndler);
}
void CToolBarEx::OnSysColorChange()
{
CToolBar::OnSysColorChange();
m_clrBtnFace = ::GetSysColor(COLOR_BTNFACE);
m_clrBtnHilight = ::GetSysColor(COLOR_BTNHILIGHT);
m_clrBtnShadow = ::GetSysColor(COLOR_BTNSHADOW);
}
void CToolBarEx::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
{
CToolBar::OnNcCalcSize(bCalcValidRects, lpncsp);
// adjust non-client area for gripper at left or top
if( m_dwStyle & CBRS_ORIENT_HORZ ) {
lpncsp->rgrc[0].left += 4;
lpncsp->rgrc[0].right += 4;
} else {
lpncsp->rgrc[0].top += 6;
lpncsp->rgrc[0].bottom += 6;
}
}
void CToolBarEx::OnMouseMove(UINT nFlags, CPoint point)
{
if( m_bFlatLook ) {
register const int nBtn = GetToolBarCtrl().GetButtonCount();
const int nLastBtn = m_nLastBtn;
m_nLastBtn = -1;
for( register int i = 0 ; i < nBtn ; ++i ) {
CRect rc;
GetItemRect(i, rc);
const BOOL bBtnEnabled = GetToolBarCtrl().IsButtonEnabled(int(GetItemID(i)));
const BOOL bSep = GetButtonStyle(i) & TBBS_SEPARATOR;
if( bSep || ! bBtnEnabled )
continue;
const BOOL bHasCursor = rc.PtInRect(point);
if( bHasCursor && bBtnEnabled ) {
if( nLastBtn != i ) {
// force a repaint of the button with the cursor on it
InvalidateRect(rc, FALSE);
}
m_nLastBtn = i;
} else if( !bHasCursor && i == nLastBtn ) {
// force a repaint of the last formed button
InvalidateRect(rc, FALSE);
}
}
// One problem occures with WM_MOUSEMOVE: we cannot detect
// that the mouse leaves the window. If the mouse moves quick
// enough, then the last formed button stays visible. To
// resolve this problem, we set a timer and check, wether
// the mouse is outside the window ...
KillTimer(m_uTimerEvent);
m_uTimerEvent = SetTimer(1, 250, 0);
}
CToolBar::OnMouseMove(nFlags, point);
}
void CToolBarEx::OnNcPaint()
{
if( m_bFlatLook ) {
CToolBar::EraseNonClient();
CWindowDC dc(this);
DrawGripper(dc);
} else
CToolBar::OnNcPaint();
}
void CToolBarEx::OnTimer(UINT nIDEvent)
{
if( nIDEvent == m_uTimerEvent && m_nLastBtn >= 0 ) {
POINT pt;
::GetCursorPos(&pt);
CRect rc;
GetWindowRect(rc);
if( ! rc.PtInRect(pt) ) {
GetItemRect(m_nLastBtn, rc);
InvalidateRect(rc, FALSE);
m_nLastBtn = -1;
KillTimer(nIDEvent);
}
} else
CToolBar::OnTimer(nIDEvent);
}
int CToolBarEx::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CToolBar::OnCreate(lpCreateStruct) == -1)
return -1;
// Save the parent at creation time. It may change, if
// the toolbar is floating; but we want to know of the
// "real" parent (for notification messages)!
m_hwndParent = lpCreateStruct->hwndParent;
return 0;
}
#define PADWIDTH(x) (((x)*8+31)&~31)/8
HIMAGELIST CToolBarEx :: GetImageList() {
m_bDeleteImgList = FALSE;
HIMAGELIST hImg = HIMAGELIST(SendMessage(TB_GETIMAGELIST));
#ifdef _DEBUG
if( hImg == 0 ) {
TRACE0("CToolBarEx::OnPaint(): could not get image list\n");
}
#endif
if( ! hImg ) {
// comctl32.dll version prior to 4.70 doesn't know
// anything of the TB_GETIMAGELIST message
if( m_hbmImageWell != 0 ) {
// Yup - we have a valid image.
// But beware: Do not use this bitmap directly.
// We make the copy by ourself. CopyImage() (for
// instace) produces inacceptable copies under
// some circumstances ...
CImageList imglist;
CBitmap bmp;
// retrieve the size of the bitmap
BITMAP bmHdr;
::GetObject(m_hbmImageWell, sizeof(BITMAP), &bmHdr);
DWORD dwWidth, dwHeight = bmHdr.bmHeight;
if (bmHdr.bmBitsPixel > 8)
dwWidth = PADWIDTH(bmHdr.bmWidth * 3);
else
dwWidth = PADWIDTH(bmHdr.bmWidth);
// copy the bitmap
CClientDC cdc(this);
CDC dc1, dc2;
dc1.CreateCompatibleDC(&cdc);
dc2.CreateCompatibleDC(&cdc);
bmp.CreateCompatibleBitmap(&cdc, dwWidth, dwHeight);
CBitmap * pOBmp = dc1.SelectObject(&bmp);
HGDIOBJ hOObj = ::SelectObject(dc2.GetSafeHdc(), m_hbmImageWell);
dc1.BitBlt(0,0,dwWidth,dwHeight,&dc2,0,0,SRCCOPY);
::SelectObject(dc2.GetSafeHdc(), hOObj);
dc1.SelectObject(pOBmp);
dc1.DeleteDC();
dc2.DeleteDC();
imglist.Create(m_sizeImage.cx, m_sizeImage.cy,TRUE,dwWidth/m_sizeImage.cx,1);
imglist.SetBkColor(m_clrBtnFace);
imglist.Add(&bmp,m_clrBtnFace);
hImg = imglist.Detach();
bmp.DeleteObject();
m_bDeleteImgList = TRUE;
}
}
return hImg;
}

153
ToolBarEx.h Normal file
View file

@ -0,0 +1,153 @@
/////////////////////////////////////////////////////////////////////////////
// Copyright (C) 1997 by Joerg Koenig
// All rights reserved
//
// Distribute freely, except: don't remove my name from the source or
// documentation (don't take credit for my work), mark your changes (don't
// get me blamed for your possible bugs), don't alter or remove this
// notice.
// No warrantee of any kind, express or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// J.Koenig@adg.de (company site)
// Joerg.Koenig@rhein-neckar.de (private site)
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TOOLBAREX_H__1E0F37F5_4020_11D1_9FB1_444553540000__INCLUDED_)
#define AFX_TOOLBAREX_H__1E0F37F5_4020_11D1_9FB1_444553540000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// ToolBarEx.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CToolBarEx window
class CToolBarEx : public CToolBar
{
DECLARE_DYNAMIC(CToolBarEx)
// data members
private:
BOOL m_bFlatLook;
CSize m_sizeOffset; // real starting point of the image
COLORREF m_clrBtnFace;
COLORREF m_clrBtnHilight;
COLORREF m_clrBtnShadow;
int m_nLastBtn; // index of last formed button
UINT m_uTimerEvent;
CUIntArray m_Styles;
HWND m_hwndParent; // "real" parent (even in floating mode)
BOOL m_bDeleteImgList; // remember the way we've built the image list
CFont m_GuiFont;
// Construction
public:
CToolBarEx();
// Attributes
public:
void SetFlatLook( BOOL bFlat = TRUE ) {
if( bFlat != m_bFlatLook ) {
m_bFlatLook = bFlat;
if( ::IsWindow(GetSafeHwnd()) ) {
// force a repaint of all buttons
Invalidate();
// erase/draw the gripper
OnNcPaint();
}
}
}
BOOL IsFlatLook() const {
return m_bFlatLook;
}
// This function I've missed in CToolBar for more than one time ...
void GetSizes( CSize & szBtn, CSize & szImg ) const {
szBtn = m_sizeButton;
szImg = m_sizeImage;
}
// Get the window to which the toolbar initially was docked. This
// is not necessarily the window returned by CWnd::GetParent() or
// CControlBar::GetDockingFrame(). Both these functions don't
// return the expected window, if the toolbar is floating ...
CWnd * GetParentFrame() const {
return ::IsWindow(m_hwndParent) ? CWnd::FromHandle(m_hwndParent) : 0;
}
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CToolBarEx)
//}}AFX_VIRTUAL
protected:
virtual void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler );
// Implementation
public:
virtual ~CToolBarEx();
// Generated message map functions
protected:
//{{AFX_MSG(CToolBarEx)
afx_msg void OnPaint();
afx_msg void OnSysColorChange();
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnNcPaint();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
afx_msg LRESULT OnSetButtonSize(WPARAM, LPARAM);
afx_msg LRESULT OnSetBitmapSize(WPARAM, LPARAM);
DECLARE_MESSAGE_MAP()
private:
// Recalculate the starting point of the button's image.
void CalculateOffset() {
if( m_pStringMap != 0 && !m_pStringMap->IsEmpty() ) {
// there are strings assigned to at least one button
// center the image horizontal
m_sizeOffset.cx = (m_sizeButton.cx-m_sizeImage.cx)/2;
// the following value calculates as follows:
// The button must be big enough to hold the image:
// + 7 pixels on x
// + 6 pixels on y
// So the y-offset is "min" (6) / 2 == 3
m_sizeOffset.cy = 3;
} else {
// no button has text assigned: center the image on the button
m_sizeOffset.cx = (m_sizeButton.cx-m_sizeImage.cx)/2;
m_sizeOffset.cy = (m_sizeButton.cy-m_sizeImage.cy)/2;
}
}
// some special drawing functions:
void DrawDisabledButton( CDC &, const CRect & ) const;
void DrawSeparator( CDC &, CRect & ) const;
void DrawGripper( CDC & ) const;
HIMAGELIST GetImageList();
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TOOLBAREX_H__1E0F37F5_4020_11D1_9FB1_444553540000__INCLUDED_)

33
contacts.cbd Normal file
View file

@ -0,0 +1,33 @@
contact('LastName' = "Veteren's Affairs",
'FirstName' = "",
'MiddleInitial' = "",
'Title' = "",
'Address1' = "Federal Building",
'Address2' = "125 S. Main St.",
'City' = "Muskogee",
'Country' = "",
'State' = "OK",
'ZipCode' = "74401",
'Company' = "",
'Department' = "",
'Position' = "",
'Manager' = "",
'Additional1' = "",
'Additional2' = "",
'HomePhone' = "",
'HomeExt' = "",
'WorkPhone' = "",
'WorkExt' = "",
'CellPhone' = "",
'CellExt' = "",
'Pager' = "",
'PagerCard' = "",
'PagerExt' = "",
'FaxPhone' = "",
'FaxExt' = "",
'Email1' = "",
'Email2' = "",
'Web1' = "",
'Web2' = "",
'Notes' = "").

527
hlp/AfxCore.rtf Normal file
View file

@ -0,0 +1,527 @@
{\rtf1\ansi \deff0\deflang1033{\fonttbl{\f0\froman\fcharset0\fprq2 Tms Rmn;}{\f1\froman\fcharset2\fprq2 Symbol;}{\f2\fswiss\fcharset0\fprq2 Helv;}{\f3\fmodern\fcharset0\fprq1 Courier;}
{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f6\froman\fcharset0\fprq2 MS Serif;}{\f7\fswiss\fcharset0\fprq2 MS Sans Serif;}{\f8\froman\fcharset0\fprq2 Times;}{\f9\fswiss\fcharset0\fprq2 Helvetica{\*\falt Arial};}
{\f10\fswiss\fcharset0\fprq2 System;}{\f11\fmodern\fcharset0\fprq1 Courier New;}{\f12\froman\fcharset0\fprq2 New York;}{\f13\fswiss\fcharset0\fprq2 Geneva;}{\f14\fmodern\fcharset0\fprq1 Fixedsys;}{\f15\fmodern\fcharset255\fprq1 Terminal;}
{\f16\fswiss\fcharset0\fprq2 Small Fonts;}{\f17\fswiss\fcharset0\fprq2 MS Dialog;}{\f18\fswiss\fcharset0\fprq2 MS Dialog Light;}{\f19\fswiss\fcharset0\fprq2 MS SystemEx;}{\f20\fnil\fcharset2\fprq2 Marlett;}{\f21\fnil\fcharset2\fprq2 Wingdings;}
{\f22\fmodern\fcharset2\fprq1 MS LineDraw;}{\f23\fdecor\fcharset0\fprq2 Algerian;}{\f24\fswiss\fcharset0\fprq2 Arial Rounded MT Bold;}{\f25\froman\fcharset0\fprq2 Bookman Old Style;}{\f26\fdecor\fcharset0\fprq2 Braggadocio;}
{\f27\fswiss\fcharset0\fprq2 Britannic Bold;}{\f28\fscript\fcharset0\fprq2 Brush Script MT;}{\f29\fswiss\fcharset0\fprq2 Century Gothic;}{\f30\fdecor\fcharset0\fprq2 Colonna MT;}{\f31\fdecor\fcharset0\fprq2 Desdemona;}
{\f32\froman\fcharset0\fprq2 Footlight MT Light;}{\f33\fswiss\fcharset0\fprq2 Impact;}{\f34\fdecor\fcharset0\fprq2 Kino MT;}{\f35\froman\fcharset0\fprq2 Wide Latin;}{\f36\fscript\fcharset0\fprq2 Matura MT Script Capitals;}
{\f37\fdecor\fcharset0\fprq2 Playbill;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;
\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\nowidctlpar \fs20 \snext0 Normal;}{\s1\sb240\nowidctlpar \b\f2\ul
\sbasedon0\snext0 heading 1;}{\s2\sb120\nowidctlpar \b\f2 \sbasedon0\snext0 heading 2;}{\s3\li360\nowidctlpar \b \sbasedon0\snext17 heading 3;}{\s4\li360\nowidctlpar \ul \sbasedon0\snext17 heading 4;}{\s5\li720\nowidctlpar \b\fs20 \sbasedon0\snext17
heading 5;}{\s6\li720\nowidctlpar \fs20\ul \sbasedon0\snext17 heading 6;}{\s7\li720\nowidctlpar \i\fs20 \sbasedon0\snext17 heading 7;}{\s8\li720\nowidctlpar \i\fs20 \sbasedon0\snext17 heading 8;}{\s9\li720\nowidctlpar \i\fs20 \sbasedon0\snext17
heading 9;}{\*\cs10 \additive Default Paragraph Font;}{\*\cs15 \additive\f0\fs16\up6\lang1033 \sbasedon10 footnote reference;}{\s16\nowidctlpar \fs20 \sbasedon0\snext16 footnote text;}{\s17\li720\nowidctlpar \fs20 \sbasedon0\snext17 Normal Indent;}{
\s18\fi-240\li480\sb80\nowidctlpar\tx480 \f9 \sbasedon0\snext18 nscba;}{\s19\fi-240\li240\sa20\nowidctlpar \f9 \sbasedon0\snext19 j;}{\s20\li480\sa20\nowidctlpar \f9 \sbasedon0\snext20 ij;}{\s21\sb80\sa20\nowidctlpar \f9 \sbasedon0\snext21 btb;}{
\s22\fi-240\li2400\sb20\sa20\nowidctlpar \f9\fs20 \sbasedon0\snext22 ctcb;}{\s23\fi-240\li480\sa40\nowidctlpar\tx480 \f9 \sbasedon0\snext23 ns;}{\s24\sa120\nowidctlpar \f9\fs28 \sbasedon0\snext24 TT;}{\s25\fi-240\li2400\sa20\nowidctlpar \f9
\sbasedon0\snext25 crtj;}{\s26\fi-240\li480\nowidctlpar\tx480 \f9 \sbasedon0\snext26 nsca;}{\s27\sa20\nowidctlpar \f9 \sbasedon0\snext27 bt;}{\s28\li240\sb120\sa40\nowidctlpar \f9 \sbasedon0\snext28 Hf;}{\s29\li240\sb120\sa40\nowidctlpar \f9
\sbasedon0\snext29 Hs;}{\s30\li480\sb120\sa40\nowidctlpar \f9 \sbasedon0\snext30 RT;}{\s31\fi-2160\li2160\sb240\sa80\nowidctlpar\tx2160 \f9 \sbasedon0\snext31 c;}{\s32\li2160\sa20\nowidctlpar \f9 \sbasedon0\snext32 ct;}{\s33\li240\sa20\nowidctlpar \f9
\sbasedon0\snext33 it;}{\s34\li480\nowidctlpar \f9\fs20 \sbasedon0\snext34 nsct;}{\s35\fi-160\li400\sb80\sa40\nowidctlpar \f9 \sbasedon0\snext35 nscb;}{\s36\fi-2640\li2880\sb120\sa40\nowidctlpar\brdrb\brdrs\brdrw15 \brdrbtw\brdrs\brdrw15 \tx2880 \f9
\sbasedon0\snext36 HC2;}{\s37\fi-2640\li2880\sb120\sa20\nowidctlpar\tx2880 \f9 \sbasedon0\snext37 C2;}{\s38\fi-240\li2400\sa20\nowidctlpar \f9\fs20 \sbasedon0\snext38 ctc;}{\s39\li2160\sb160\nowidctlpar \f9 \sbasedon0\snext39 crt;}{
\s40\li480\sb20\sa40\nowidctlpar \f9 \sbasedon0\snext40 or;}{\s41\fi-259\li360\sb40\sa40\nowidctlpar\tx360 \f7\fs20 \sbasedon0\snext41 Ln1;}{\s42\li115\sb80\sa80\nowidctlpar \f7\fs20 \sbasedon0\snext0 *Intro;}{\s43\li115\sb80\sa80\keepn\nowidctlpar \b\f7
\sbasedon3\snext42 *Title;}{\s44\fi-245\li360\sb80\nowidctlpar \f7\fs20 \snext44 *Jl;}{\s45\li360\sb40\sa40\nowidctlpar \f7\fs20 \snext0 Lp1;}{\s46\fi-1800\li1915\sb60\sl-240\slmult0\nowidctlpar\tx1915 \f7\fs20 \sbasedon0\snext46 Tph;}{
\s47\li115\sb120\sa80\nowidctlpar \b\f7\fs20 \snext41 Proch;}{\*\cs48 \additive\super \sbasedon10 endnote reference;}}{\info{\title AFXCORE}{\subject MFC Core RTF Help}{\author AFX}{\creatim\yr1992\mo10\dy7\hr11\min4}{\version1}{\edmins1}{\nofpages0}
{\nofwords0}{\nofchars0}{\vern49221}}\widowctrl\ftnbj\aenddoc\hyphcaps0 \fet0\sectd \linex576\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3
\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}
{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \sl240\slmult0\widctlpar
\fs20 {\cs15\fs16\up6 #{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 #} main_index}}{\fs16\up6 }{\b\f2\fs24\up6 <<YourApp>> Help Index}{\b\f2
\par }{\f9
\par }{\b\f2 How To ...
\par }{\f2 \tab <<add your application-specific "how to" topics here>>}{\f9\ulw
\par
\par }{\b\f2 Commands
\par }{\f2 \tab }{\f2\uldb File menu}{\v\f2 menu_file}{\f2
\par \tab }{\f2\uldb Edit menu}{\v\f2 menu_edit}{\f2\uldb
\par }{\f2 \tab }{\f2\uldb Record menu}{\v\f2 menu_record}{\f2
\par \tab }{\f2\uldb View menu}{\v\f2 menu_view}{\f2
\par \tab }{\f2\uldb Window menu}{\v\f2 menu_window}{\f2
\par \tab }{\f2\uldb Help menu}{\v\f2 menu_help}{\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} menu_file}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain \s16\widctlpar
\fs20 {\cs15\fs16\up6 $} File menu commands}}{\f2 }{\b\f2 File menu commands}{\f2
\par
\par The File menu offers the following commands:
\par
\par }\trowd \trgaph108\trleft-108 \cellx1302\cellx8622 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb New}{\v\f2 HID_FILE_NEW}{\f2 \cell Creates a new document.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd \trgaph108\trleft-108 \cellx1302\cellx8622 \pard
\sl240\slmult0\widctlpar\intbl {\f2\uldb Open}{\v\f2 HID_FILE_OPEN}{\f2\uldb \cell }{\f2 Opens an existing document.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Close}{\v\f2 HID_FILE_CLOSE}{\f2\uldb \cell }{\f2
Closes an opened document.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Save}{\v\f2 HID_FILE_SAVE}{\f2\uldb \cell }{\f2 Saves an opened document using the same file name.\cell }\pard \widctlpar\intbl {\f2 \row
}\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Save As}{\v\f2 HID_FILE_SAVE_AS}{\f2\uldb \cell }{\f2 Saves an opened document to a specified file name.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Print}{\v\f2
HID_FILE_PRINT}{\f2\uldb \cell }{\f2 Prints a document.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Print Preview}{\v\f2 HID_FILE_PRINT_PREVIEW}{\f2\uldb \cell }{\f2
Displays the document on the screen as it would appear printed.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Print Setup}{\v\f2 HID_FILE_PRINT_SETUP}{\f2\uldb \cell }{\f2 Selects a printer and printer connection.
\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Send...}{\v\f2 HID_FILE_SEND_MAIL}{\f2\uldb \cell }{\f2 Sends the active document through electronic mail.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd
\trgaph108\trleft-108 \cellx1302\cellx8622 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Exit}{\v\f2 HID_APP_EXIT}{\f2 \tab
\par }{\f2\uldb \cell }{\f2 Exits <<YourApp>>.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} menu_edit}}{\b\f2 Edit menu commands}{\f2
\par
\par The Edit menu offers the following commands:
\par }\pard \fi-720\li720\sl240\slmult0\widctlpar {\f2
\par }\trowd \trgaph108\trleft-108 \cellx1497\cellx10212 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Undo}{\v\f2 HID_EDIT_UNDO}{\f2 \cell Reverse previous editing operation.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd \trgaph108\trleft-108 \cellx1497
\cellx10212 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Cut}{\v\f2 HID_EDIT_CUT}{\f2\uldb \cell }{\f2 Deletes data from the document and moves it to the clipboard.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb
Copy}{\v\f2 HID_EDIT_COPY}{\f2\uldb \cell }{\f2 Copies data from the document to the clipboard.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Paste}{\v\f2 HID_EDIT_PASTE}{\f2\uldb \cell }{\f2
Pastes data from the clipboard into the document.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Paste Link}{\v\f2 HID_EDIT_PASTE_LINK}{\f2\uldb \cell }{\f2
Pastes from the clipboard a link to data in another application.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Insert New Object}{\v\f2\uldb HID_OLE_INSERT_NEW}{\f2\uldb \cell }{\f2
Inserts and embeds an object, such as a chart or an equation in a document.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd \trgaph108\trleft-108 \cellx1497\cellx10212 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Links}{\v\f2 HID_OLE_EDIT_LINKS}{
\f2\uldb \cell }{\f2 List and edit links to embedded documents.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \fi-720\li720\sl240\slmult0\widctlpar {\f2
\par }\pard \sl240\slmult0\widctlpar {\f2 \tab \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} menu_view}}{\b\f2 View menu commands}{\f2
\par
\par The View menu offers the following commands:
\par
\par }\trowd \trgaph108\trleft-108 \cellx1272\cellx7452 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Toolbar}{\v\f2 HID_VIEW_TOOLBAR}{\f2\uldb \cell }{\f2 Shows or hides the toolbar.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd \trgaph108\trleft-108
\cellx1272\cellx7452 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Status Bar}{\v\f2 HID_VIEW_STATUS_BAR}{\f2\uldb \cell }\pard \fi-720\li720\sl240\slmult0\widctlpar\intbl {\f2 Shows or hides the status bar.
\par }\pard \sl240\slmult0\widctlpar\intbl {\f2 \cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} menu_window}}{\b\f2
Window menu commands}{\f2
\par
\par The Window menu offers the following commands, which enable you to arrange multiple views of multiple documents in the application window:
\par
\par }\trowd \trgaph108\trleft-108 \cellx1572\cellx7752 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb New Window}{\v\f2 HID_WINDOW_NEW}{\f2\uldb \cell }{\f2 Creates a new window that views the same document.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd
\trgaph108\trleft-108 \cellx1572\cellx7752 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Cascade}{\v\f2 HID_WINDOW_CASCADE}{\f2\uldb \cell }{\f2 Arranges windows in an overlapped fashion.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0
\widctlpar\intbl {\f2\uldb Tile}{\v\f2 HID_WINDOW_TILE}{\f2\uldb \cell }{\f2 Arranges windows in non-overlapped tiles.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Arrange Icons}{\v\f2 HID_WINDOW_ARRANGE}{
\f2\uldb \cell }\pard \fi-720\li720\sl240\slmult0\widctlpar\intbl {\f2 Arranges icons of closed windows.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Split}{\v\f2 HID_WINDOW_SPLIT}{\f2\uldb \cell }\pard
\fi-720\li720\sl240\slmult0\widctlpar\intbl {\f2 Split the active window into panes.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd \trgaph108\trleft-108 \cellx1572\cellx7752 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Window 1, 2, ...}{\v\f2
HID_WINDOW_ALL}{\f2\uldb \cell }\pard \fi-720\li720\sl240\slmult0\widctlpar\intbl {\f2 Goes to specified window.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \fi-720\li720\sl240\slmult0\widctlpar {\f2
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} menu_help}}{\b\f2 Help menu commands}{\f2
\par
\par The Help menu offers the following commands, which provide you assistance with this application:
\par
\par }\trowd \trgaph108\trleft-108 \cellx1077\cellx7257 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb Help Topics}{\v\f2 HID_HELP_INDEX}{\f2\uldb \cell }\pard \fi-720\li720\sl240\slmult0\widctlpar\intbl {\f2
Offers you an index to topics on which you can get help.\cell }\pard \widctlpar\intbl {\f2 \row }\trowd \trgaph108\trleft-108 \cellx1077\cellx7257 \pard \sl240\slmult0\widctlpar\intbl {\f2\uldb About}{\v\f2 HID_APP_ABOUT}{\f2\uldb \cell }\pard
\fi-720\li720\sl240\slmult0\widctlpar\intbl {\f2 Displays the version number of this application.\cell }\pard \widctlpar\intbl {\f2 \row }\pard \fi-720\li720\sl240\slmult0\widctlpar {\f2
\par
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_NEW}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{\cs15\fs16\up6 $
{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 $} File New command}}{\f2 }{\b\f2 New command (File menu)}{\f2
\par
\par Use this command to create a new document in <<YourApp>>. Select the type of new file you want to create in the }{\f2\uldb File New dialog box}{\v AFX_HIDD_NEWTYPEDLG}. {\f2
<< Remove previous sentence if your application supports only one document type. >>
\par
\par You can open an existing document with the }{\f2\uldb Open command}{\v HID_FILE_OPEN}{\f2 .
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc filenew.bmp\}
\par Keys:\tab CTRL+N
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_NEWTYPEDLG}}{\b\f2 File New dialog box
\par }{\f2
\par << Delete this help topic if your application supports only one document type. >>
\par
\par Specify the type of document you wish to create:
\par << List your application's document types here >>\page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_OPEN}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{
\cs15\fs16\up6 ${\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 $} File Open command}}{\f2 }{\b\f2 Open command (File menu)}{\f2
\par
\par Use this command to open an existing document in a new window. You can open multiple documents at once. Use the Window menu to switch among the multiple open documents. See }{\f2\uldb Window 1, 2, ... command}{\v\f2 HID_WINDOW_ALL}{\f2 .
\par
\par You can create new documents with the }{\f2\uldb New command}{\v HID_FILE_NEW}{\f2 .
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc fileopen.bmp\}
\par Keys:\tab CTRL+O
\par }\pard \li360\sl240\slmult0\widctlpar {\f2
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_FILEOPEN}}{\b\f2 File Open dialog box
\par }{\f2
\par The following options allow you to specify which file to open:
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 File Name
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Type or select the filename you want to open. This box lists files with the extension you select in the List Files of Type box.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 List Files of Type
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Select the type of file you want to open:
\par << List your application's file types here. >>
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Drives
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Select the drive in which <<YourApp>> stores the file that you want to open.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Directories
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Select the directory in which <<YourApp>> stores the file that you want to open.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Network...
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Choose this button to connect to a network location, assigning it a new drive letter.
\par
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_CLOSE}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{\cs15\fs16\up6 $
{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 $} File Close command}}{\f2 }{\b\f2 Close command (File menu)}{\f2
\par
\par Use this command to close all windows containing the active document. <<YourApp>> suggests that you save changes to your document before you close it. If you close a document without saving, you lose all changes made since the last time you saved it. B
efore closing an untitled document, <<YourApp>> displays the }{\f2\uldb Save As dialog box}{\v AFX_HIDD_FILESAVE}{\f2 and suggests that you name and save the document.
\par
\par You can also close a document by using the Close icon on the document's window, as shown below:
\par \{bml scmenu.bmp\}
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_SAVE}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain \s16\widctlpar
\fs20 {\cs15\fs16\up6 $} File Save command}}{\f2 }{\b\f2 Save command (File menu)}{\f2
\par
\par Use this command to save the active document to its current name and directory. When you save a document for the first time, <<YourApp>> displays the }{\f2\uldb Save As dialog box}{\v AFX_HIDD_FILESAVE}{\f2
so you can name your document. If you want to change the name and directory of an existing document before you save it, choose the }{\f2\uldb Save As command}{\v HID_FILE_SAVE_AS}{\f2 .
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc filesave.bmp\}
\par Keys:\tab CTRL+S
\par }\pard \li360\sl240\slmult0\widctlpar {\f2
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_SAVE_AS}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain
\s16\widctlpar \fs20 {\cs15\fs16\up6 $} File Save As command}}{\f2 }{\b\f2 Save As command (File menu)}{\f2
\par
\par Use this command to save and name the active document. <<YourApp>> displays the }{\f2\uldb Save As dialog box}{\v AFX_HIDD_FILESAVE}{\f2 so you can name your document.
\par
\par To save a document with its existing name and directory, use the }{\f2\uldb Save command}{\v HID_FILE_SAVE}{\f2 .
\par
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_SEND_MAIL}}{\b\f2 Send command (File menu)}{\f2
\par
\par Use this command to send the active document through electronic mail. This command presents a mail window with the active document attached to it. You may then fill out the To: field, Subject: field, etc., and add text to the body of the message if you
wish. When you are finished you may click the "Send" button to send the message.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_FILESAVE}}{\b\f2 File Save As dialog box
\par }{\f2
\par The following options allow you to specify the name and location of the file you're about to save:
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 File Name
\par }\pard \li360\sl240\slmult0\widctlpar {\f2
Type a new filename to save a document with a different name. A filename can contain up to eight characters and an extension of up to three characters. <<YourApp>> adds the extension you specify in the Save File As Type box.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Drives
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Select the drive in which you want to store the document.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Directories
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Select the directory in which you want to store the document.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Network...
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Choose this button to connect to a network location, assigning it a new drive letter.
\par
\par }\pard \sl240\slmult0\widctlpar {\f2 << Add other File Save As dialog box options depending on which ones your application chooses via the OFN_ flags of the OPENFILENAME structure used by the CFileDialog. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 #} HID_FILE_MRU_FILE1}}{\f2 }{\cs15\fs16\up6 K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} files: managing}}{\f2 }{\cs15\fs16\up6 ${\footnote
\pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 $} File 1, 2, 3, 4 command}}{\f2 }{\b\f2 1, 2, 3, 4 command (File menu)}{\f2
\par
\par Use the numbers and filenames listed at the bottom of the File menu to open the last four documents you closed. Choose the number that corresponds with the document you want to open.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_APP_EXIT}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} exit}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain \s16\widctlpar \fs20 {
\cs15\fs16\up6 $} File Exit command}}{\f2 }{\b\f2 Exit command (File menu)}{\f2
\par
\par Use this command to end your <<YourApp>> session. You can also use the Close command on the application Control menu. <<YourApp>> prompts you to save documents with unsaved changes.
\par }
\par {\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Mouse:\tab Double-click the application's Control menu button.
\par \tab \{bmc appexit.bmp\}
\par Keys:\tab ALT+F4
\par }\pard \sl240\slmult0\widctlpar \page {\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_UNDO}}{\b\f2 Undo/Can't Undo command (Edit menu)}{\f2
\par
\par << Your application's user interface for Undo may differ from the one described below. Modify this help text accordingly. >>
\par
\par Use this command to reverse the last editing action, if possible. The name of the command changes, depending on what the last action was. The Undo command changes to Can't Undo on the menu if you cannot reverse your last action.
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc editundo.bmp\}
\par Keys:\tab CTRL+Z or
\par \tab ALT-BACKSPACE\tab
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_REDO}}{\b\f2 Redo command (Edit menu)}{\f2
\par
\par << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_CUT}}{\b\f2 Cut command (Edit menu)}{\f2
\par
\par Use this command to remove the currently selected data from the document and put it on the clipboard. This command is unavailable if there is no data currently selected.
\par
\par Cutting data to the clipboard replaces the contents previously stored there.
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc editcut.bmp\}
\par Keys:\tab CTRL+X
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_COPY}}{\b\f2 Copy command (Edit menu)}{\f2
\par
\par Use this command to copy selected data onto the clipboard. This command is unavailable if there is no data currently selected.
\par
\par Copying data to the clipboard replaces the contents previously stored there.
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc editcopy.bmp\}
\par Keys:\tab CTRL+C
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_PASTE}}{\b\f2 Paste command (Edit menu)}{\f2
\par
\par Use this command to insert a copy of the clipboard contents at the insertion point. This command is unavailable if the clipboard is empty.
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Toolbar:\tab \{bmc editpast.bmp\}
\par Keys:\tab CTRL+V
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_VIEW_TOOLBAR}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} toolbar}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain \s16\widctlpar \fs20
{\cs15\fs16\up6 $} View Toolbar command}}{\f2 }{\b\f2 Toolbar command (View menu)}{\f2
\par
\par Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in <<YourApp>>, such as File Open. A check mark appears next to the menu item when the Toolbar is displayed.
\par
\par See }{\f2\uldb Toolbar}{\v\f2 AFX_HIDW_TOOLBAR}{\f2 for help on using the toolbar.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDW_TOOLBAR}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} toolbar}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain \s16\widctlpar \fs20
{\cs15\fs16\up6 $} toolbar}}{\f2 }{\b\f2 Toolbar}{\f2
\par \{bml hlptbar.bmp\}
\par
\par The toolbar is displayed across the top of the application window, below the menu bar. The toolbar provides quick mouse access to many tools used in <<YourApp>>,
\par
\par To hide or display the Toolbar, choose Toolbar from the View menu (ALT, V, T).
\par
\par << Add or remove toolbar buttons from the list below according to which ones your application offers. >>
\par
\par }\pard \sl240\slmult0\widctlpar\brdrb\brdrs\brdrw15\brsp20 \tx1080 {\b\f2 Click\tab To}{\f2
\par }\pard \fi-1080\li1080\sl240\slmult0\widctlpar\tx1080 {\f2 \{bmc filenew.bmp\}\tab Open a new document.
\par
\par \{bmc fileopen.bmp\}\tab Open an existing document. <<YourApp>> displays the Open dialog box, in which you can locate and open the desired file.
\par
\par \{bmc filesave.bmp\}\tab Save the active document or template with its current name. If you have not named the document, <<YourApp>> displays the Save As dialog box.
\par
\par \{bmc fileprnt.bmp\}\tab Print the active document.
\par
\par \{bmc editcut.bmp\}\tab Remove selected data from the document and stores it on the clipboard.
\par
\par \{bmc editcopy.bmp\}\tab Copy the selection to the clipboard.
\par
\par \{bmc editpast.bmp\}\tab Insert the contents of the clipboard at the insertion point.
\par
\par \{bmc editundo.bmp\}\tab Reverse the last editing. Note: You cannot undo some actions.
\par
\par \{bmc recfirst.bmp\}\tab Go to the first record in the current selection.
\par
\par \{bmc recprev.bmp\}\tab Go to the previous record in the current selection.
\par
\par \{bmc recnext.bmp\}\tab Go to the next record in the current selection.
\par
\par \{bmc reclast.bmp\}\tab Go to the last record in the current selection.
\par
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_VIEW_STATUS_BAR}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} status bar}}{\f2 }{\cs15\fs16\up6 $
{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} View Status Bar Command}}{\b\f2 Status Bar command (View menu)
\par }{\f2
\par Use this command to display and hide the Status Bar, which describes the action to be executed by the selected menu item or depressed toolbar button, and keyboard latch state. A check mark appears next to the menu item when the Status Bar is displayed.
\par
\par See }{\f2\uldb Status Bar}{\v\f2 AFX_HIDW_STATUS_BAR}{\f2 for help on using the status bar.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDW_STATUS_BAR}K{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 K} status bar}}{\f2 }{\cs15\fs16\up6 ${\footnote \pard\plain \sl240\slmult0
\widctlpar \fs20 {\cs15\fs16\up6 $} status bar}}{\b\f2 Status Bar}{\f2
\par \{bml hlpsbar.bmp\}
\par
\par The status bar is displayed at the bottom of the <<YourApp>> window. To display or hide the status bar, use the Status Bar command in the View menu.
\par
\par The left area of the status bar describes actions of menu items as you use the arrow keys to navigate through menus. This area similarly shows messages that describe the actions of toolbar buttons as you depress them, before releasing them. If after vie
wing the description of the toolbar button command you wish not to execute the command, then release the mouse button while the pointer is off the toolbar button.
\par
\par The right areas of the status bar indicate which of the following keys are latched down:
\par
\par }\pard \sl240\slmult0\widctlpar\tx1440 {\b\f2 Indicator\tab Description}{\f2
\par }\pard \fi-1440\li1440\sa120\sl240\slmult0\widctlpar\tx1440 {\f2 CAP\tab The Caps Lock key is latched down.
\par NUM\tab The Num Lock key is latched down.
\par SCRL\tab The Scroll Lock key is latched down.
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_NEW}}{\b\f2 New command (Window menu)}{\f2
\par
\par Use this command to open a new window with the same contents as the act
ive window. You can open multiple document windows to display different parts or views of a document at the same time. If you change the contents in one window, all other windows containing the same document reflect those changes. When you open a new w
indow, it becomes the active window and is displayed on top of all other open windows.
\par
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_CASCADE}}{\b\f2 Cascade command (Window menu)}{\f2
\par
\par Use this command to arrange multiple opened windows in an overlapped fashion.
\par
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_TILE}}{\b\f2 Tile command (Window menu)}{\f2
\par
\par Use this command to arrange multiple opened windows in a non-overlapped fashion.
\par
\par
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_TILE_HORZ}}{\b\f2 Tile Horizontal command (Window menu)}{\f2
\par
\par Use this command to vertically arrange multiple opened windows in a non-overlapped fashion.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_TILE_VERT}}{\b\f2 Tile Vertical command (Window menu)}{\f2
\par
\par Use this command to arrange multiple opened windows side by side.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_ARRANGE}}{\b\f2 Window Arrange Icons Command}{\f2
\par
\par Use this command to arrange the icons for minimized windows at the bottom of the main window. If there is an open document window at the bottom of the main window, then some or all of the icons may not be visible because they will be underneath this docu
ment window.\page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_SPLIT}}{\b\f2 Split Command (Window menu)
\par
\par }{\f2 Use this command to split the active window into panes. You may then use the mouse or the keyboard arrows to move the splitter bars. When you are finished, press the mouse button or enter to le
ave the splitter bars in their new location. Pressing escape keeps the splitter bars in their original location. << In a single document interface application, this command will appear on the View menu. >>\page }{\cs15\fs16\up6 #{\footnote \pard\plain
\sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_WINDOW_ALL}}{\b\f2 1, 2, ... command (Window menu)}{\f2
\par
\par <<YourApp>> displays a list of currently open document windows at the bottom of the Window menu. A check mark appears in front of the document name of the active window. Choose a document from this list to make its window active.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_HELP_INDEX}}{\b\f2 Index command (Help menu)
\par }{\f2
\par Use this command to display the opening screen of Help. From the opening screen, you can jump to step-by-step instructions for using <<YourApp>> and various types of reference information.
\par
\par Once you open Help, you can click the Contents button whenever you want to return to the opening screen.
\par
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_HELP_USING}}{\b\f2 Using Help command (Help menu)
\par }{\f2
\par Use this command for instructions about using Help.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_APP_ABOUT}}{\b\f2 About command (Help menu)
\par }{\f2
\par Use this command to display the copyright notice and version number of your copy of <<YourApp>>.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_CONTEXT_HELP}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Help Using Help Command}}{\b\f2 Context Help command
\par }{\f2 \{bml curhelp.bmp\}
\par
\par Use the Context Help command to obtain help on some portion of <<YourApp>>. When you choose the Toolbar's Context Help button, the mouse pointer will change to an arrow and question mark. Then click somewhere in the <<YourApp>> window, such as another T
oolbar button. The Help topic will be shown for the item you clicked.
\par
\par }{\b\f2 Shortcut
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Keys:\tab SHIFT+F1
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_HT_CAPTION}}{\b\f2 Title Bar}
\par
\par {\f2 << Show your application's title bar here. >>
\par
\par }\pard\plain \s42\fi-360\li360\widctlpar\tx360 \f7\fs20 {\f2 The title bar is located along the top of a window. It contains the name of the application and document.
\par }\pard\plain \widctlpar \fs20 {\f2
\par }\pard\plain \s42\fi-360\li360\widctlpar\tx360 \f7\fs20 {\f2 To move the window, drag the title bar. Note: You can also move dialog boxes by dragging their title bars.
\par }\pard\plain \widctlpar \fs20 {\f2
\par }\pard \fi-360\li360\widctlpar\tx360 {\f2 A title bar may contain the following elements:
\par }\pard\plain \s41\fi-360\li360\sb40\sa40\widctlpar\tx360 \f7\fs20 {\f2 \{bmc bullet.bmp\}\tab Application Control-menu button
\par \{bmc bullet.bmp\}\tab Document Control-menu button
\par \{bmc bullet.bmp\}\tab Maximize button
\par \{bmc bullet.bmp\}\tab Minimize button
\par \{bmc bullet.bmp\}\tab Name of the application
\par \{bmc bullet.bmp\}\tab Name of the document
\par \{bmc bullet.bmp\}\tab Restore button
\par }\pard\plain \sl240\slmult0\widctlpar \fs20 {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 #} scrollbars}}{\f2 }{\b\f2 Scroll bars}{\f2
\par
\par Displayed at the right and bottom edges of the document window. The scroll boxes inside the scroll bars indicate your vertical and horizontal location in the document. You can use the mouse to scroll to other parts of the document.
\par
\par << Describe the actions of the various parts of the scrollbar, according to how they behave in your application. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_SIZE}}{\b\f2 Size command (System menu)}
\par
\par {\f2 Use this command to display a four-headed arrow so you can size the active window with the arrow keys.
\par \{bml curarw4.bmp\}
\par
\par After the pointer changes to the four-headed arrow:
\par }\pard \fi-360\li360\sb60\sl240\slmult0\widctlpar {\f2 1.\tab Press one of the DIRECTION keys (left, right, up, or down arrow key) to move the pointer to the border you want to move.
\par 2.\tab Press a DIRECTION key to move the border.
\par 3.\tab Press ENTER when the window is the size you want.
\par }\pard \sl240\slmult0\widctlpar {\f2
\par Note: This command is unavailable if you maximize the window.
\par }
\par {\b\f2 Shortcut}{\b
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Mouse:\tab Drag the size bars at the corners or edges of the window.
\par }\pard \li360\sl240\slmult0\widctlpar {\f2
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_MOVE}}{\b\f2 Move command (Control menu)
\par }{\f2
\par Use this command to display a four-headed arrow so you can move the active window or dialog box with the arrow keys.
\par \{bmc curarw4.bmp\}
\par
\par Note: This command is unavailable if you maximize the window.
\par
\par }{\b\f2 Shortcut
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Keys:\tab CTRL+F7
\par
\par }\pard \sl240\slmult0\widctlpar\tx1440 {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_MINIMIZE}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} System Minimize Command}
}{\b\f2 Minimize command (application Control menu)
\par }\pard \sl240\slmult0\widctlpar {\f2
\par Use this command to reduce the <<YourApp>> window to an icon.
\par }\pard \fi-360\li360\sl240\slmult0\widctlpar {\b
\par }{\b\f2 Shortcut}{\f2
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Mouse:\tab Click the minimize icon \{bmc scmin.bmp\} on the title bar.
\par Keys:\tab ALT+F9
\par }\pard \fi-360\li1080\sl240\slmult0\widctlpar
\par \pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_MAXIMIZE}}{\b\f2 Maximize command (System menu)
\par }{\f2
\par Use this command to enlarge the active window to fill the available space.
\par }\pard \fi-360\li360\sl240\slmult0\widctlpar {\b\f2
\par Shortcut}{\f2
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Mouse:\tab Click the maximize icon \{bmc scmax.bmp\} on the title bar; or double-click the title bar.
\par Keys:\tab CTRL+F10 enlarges a document window.
\par }\pard \fi-360\li1080\sl240\slmult0\widctlpar
\par \pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_NEXTWINDOW}}{\b\f2 Next Window command (document Control menu)
\par }{\f2
\par Use this command to switch to the next open document window. <<YourApp>> determines which window is next according to the order in which you opened the windows.
\par
\par }{\b\f2 Shortcut
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Keys:\tab CTRL+F6
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_PREVWINDOW}}{\b\f2 Previous Window command (document Control menu)
\par }{\f2
\par Use this command to switch to the previous open document window. <<YourApp>> determines which window is previous according to the order in which you opened the windows.
\par
\par }{\b\f2 Shortcut
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Keys:\tab SHIFT+CTRL+F6
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_CLOSE}}{\b\f2 Close command (Control menus)
\par }{\f2
\par Use this command to close the active window or dialog box.
\par
\par Double-clicking a Control-menu box is the same as choosing the Close command.
\par \{bml appexit.bmp\}
\par
\par Note: If you have multiple windows open for a single document, the Close command on the document Control menu closes only one window at a time. You can close all windows at once with the Close command on the File menu.
\par
\par }{\b\f2 Shortcuts
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Keys: \tab CTRL+F4 closes a document window
\par \tab ALT+F4 closes the <<YourType>> window or dialog box
\par }\pard \sl240\slmult0\widctlpar {\f2 \tab \tab \tab \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_RESTORE}}{\b\f2 Restore command (Control menu)
\par }{\f2
\par Use this command to return the active window to its size and position before you chose the Maximize or Minimize command.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_SC_TASKLIST}}{\b\f2 Switch to command (application Control menu)
\par }{\f2
\par Use this command to display a list of all open applications. Use this "Task List" to switch to or close an application on the list.
\par
\par }{\b\f2 Shortcut
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Keys:\tab CTRL+ESC
\par }\pard \sl240\slmult0\widctlpar {\f2
\par }{\b\f2 Dialog Box Options
\par }{\f2 When you choose the Switch To command, you will be presented with a dialog box with the following options:
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Task List
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Select the application you want to switch to or close.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Switch To
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Makes the selected application active.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 End Task
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Closes the selected application.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Cancel
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Closes the Task List box.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Cascade
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Arranges open applications so they overlap and you can see each title bar. This option does not affect applications reduced to icons.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Tile
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Arranges open applications into windows that do not overlap. This option does not affect applications reduced to icons.
\par }\pard \sb60\sl240\slmult0\widctlpar {\b\f2 Arrange Icons
\par }\pard \li360\sl240\slmult0\widctlpar {\f2 Arranges the icons of all minimized applications across the bottom of the screen.
\par }\pard \sl240\slmult0\widctlpar {\f2 \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_VIEW_RULER}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} View Ruler Command}}{\b\f2
Ruler command (View menu)
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_FONT}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Choose Font Dialog}}{\b\f2 Choose Font dialog box
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_COLOR}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Choose Color Dialog}}{\b\f2 Choose Color dialog box
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_FIND}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Edit Find Command}}{\b\f2 Find command (Edit menu)
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_FIND}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Find Dialog}}{\b\f2 Find dialog box
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_REPLACE}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Edit Replace Command}}{\b\f2 Replace command (Edit menu)
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDD_REPLACE}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Replace Dialog}}{\b\f2 Replace dialog box
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_REPEAT}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Edit Repeat Command}}{\b\f2 Repeat command (Edit menu)
\par
\par }{\f2 Use this command to repeat the last editing command carried out. The Repeat menu item changes to Can't Repeat if you cannot repeat your last action.
\par
\par }{\b\f2 Shortcut
\par }\pard \fi-1080\li1440\sl240\slmult0\widctlpar\tx1440 {\f2 Key:\tab F4
\par }\pard \sl240\slmult0\widctlpar {\f2
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_CLEAR}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Edit Clear Command}}{\b\f2 Clear command (Edit menu)
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_EDIT_CLEAR_ALL}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Edit Clear All}}{\b\f2 Clear All command (Edit menu)
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_NEXT_PANE}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Next Pane Command}}{\b\f2 Next Pane
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_PREV_PANE}${\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 $} Prev Pane Command}}{\b\f2 Prev Pane
\par
\par }{\f2 << Write application-specific help here. >>
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HIDR_DOC1TYPE}}{\b\f2 Modifying the Document
\par }{\f2
\par << Write application-specific help here that provides an overview of how the user should modify a document using your application.
\par
\par If your application supports multiple document types and you want to have a distinct help topic for each, then use the help context i.d. generated by running the MAKEHELP.BAT file produced by AppWizard. Alternatively, run MAKEHM as follows:
\par
\par \tab makehm IDR_HIDR_,0x2000 resource.h
\par
\par If the IDR_ symbol for one of your document types is, for example, IDR_CHARTTYPE, then the help context i.d. generated by MAKEHM will be HIDR_CHARTTYPE.
\par
\par Note, AppWizard defines the HIDR_DOC1TYPE help context i.d. used by this help topic for the first document type supported by your appl
ication. AppWizard produces an alias in the .HPJ file for your application, mapping HIDR_DOC1TYPE to the HIDR_ produced by MAKEHM for that document type. >>
\par
\par \page
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \sl240\slmult0\widctlpar \fs20 {\cs15\fs16\up6 #} HID_HT_NOWHERE}}{\b\f2 No Help Available}
\par
\par {\f2 No help is available for this area of the window.
\par \page }{\cs15\fs16\up6 #{\footnote \pard\plain \s16\widctlpar \fs20 {\cs15\fs16\up6 #} AFX_HIDP_default
\par }}{\f2 }{\b\f2 No Help Available
\par }
\par {\f2 No help is available for this message box.
\par }
\par {\f2 << If you wish to author help specific
to each message box prompt, then remove the AFX_HIDP_xxx values from the [ALIAS] section of your .HPJ file, and author a topic for each AFX_HIDP_xxx value. For example, AFX_HIDP_INVALID_FILENAME is the help topic for the Invalid Filename message box. >>
\par
\par }\pard \widctlpar
\par }

98
hlp/AfxPrint.rtf Normal file
View file

@ -0,0 +1,98 @@
{\rtf1\ansi \deff0\deflang1024{\fonttbl{\f0\froman Times New Roman;}{\f1\froman Symbol;}{\f2\fswiss Arial;}{\f3\froman Tms Rmn;}{\f4\fswiss Helv;}{\f5\fswiss Helvetica;}{\f6\fswiss MS Sans Serif;}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue127;\red0\green127\blue127;\red0\green127\blue0;
\red127\green0\blue127;\red127\green0\blue0;\red127\green127\blue0;\red127\green127\blue127;\red192\green192\blue192;}{\stylesheet{\s244 \f3\fs16\up6\lang1033 \sbasedon0\snext0 footnote reference;}{\s245 \f3\fs20\lang1033
\sbasedon0\snext245 footnote text;}{\s246\li720 \i\f3\fs20\lang1033 \sbasedon0\snext255 heading 9;}{\s247\li720 \i\f3\fs20\lang1033 \sbasedon0\snext255 heading 8;}{\s248\li720 \i\f3\fs20\lang1033 \sbasedon0\snext255 heading 7;}{\s249\li720
\f3\fs20\ul\lang1033 \sbasedon0\snext255 heading 6;}{\s250\li720 \b\f3\fs20\lang1033 \sbasedon0\snext255 heading 5;}{\s251\li360 \f3\ul\lang1033 \sbasedon0\snext255 heading 4;}{\s252\li360 \b\f3\lang1033 \sbasedon0\snext255 heading 3;}{\s253\sb120
\b\f4\lang1033 \sbasedon0\snext0 heading 2;}{\s254\sb240 \b\f4\ul\lang1033 \sbasedon0\snext0 heading 1;}{\s255\li720 \f3\fs20\lang1033 \sbasedon0\snext255 Normal Indent;}{\f3\fs20\lang1033 \snext0 Normal;}{\s2\fi-240\li480\sb80\tx480 \f5\lang1033
\sbasedon0\snext2 nscba;}{\s3\fi-240\li240\sa20 \f5\lang1033 \sbasedon0\snext3 j;}{\s4\li480\sa20 \f5\lang1033 \sbasedon0\snext4 ij;}{\s5\sb80\sa20 \f5\lang1033 \sbasedon0\snext5 btb;}{\s6\fi-240\li2400\sb20\sa20 \f5\fs20\lang1033 \sbasedon0\snext6 ctcb;}
{\s7\fi-240\li480\sa40\tx480 \f5\lang1033 \sbasedon0\snext7 ns;}{\s8\sa120 \f5\fs28\lang1033 \sbasedon0\snext8 TT;}{\s9\fi-240\li2400\sa20 \f5\lang1033 \sbasedon0\snext9 crtj;}{\s10\fi-240\li480\tx480 \f5\lang1033 \sbasedon0\snext10 nsca;}{\s11\sa20
\f5\lang1033 \sbasedon0\snext11 bt;}{\s12\li240\sb120\sa40 \f5\lang1033 \sbasedon0\snext12 Hf;}{\s13\li240\sb120\sa40 \f5\lang1033 \sbasedon0\snext13 Hs;}{\s14\li480\sb120\sa40 \f5\lang1033 \sbasedon0\snext14 RT;}{\s15\fi-2160\li2160\sb240\sa80\tx2160
\f5\lang1033 \sbasedon0\snext15 c;}{\s16\li2160\sa20 \f5\lang1033 \sbasedon0\snext16 ct;}{\s17\li240\sa20 \f5\lang1033 \sbasedon0\snext17 it;}{\s18\li480 \f5\fs20\lang1033 \sbasedon0\snext18 nsct;}{\s19\fi-160\li400\sb80\sa40 \f5\lang1033
\sbasedon0\snext19 nscb;}{\s20\fi-2640\li2880\sb120\sa40\brdrb\brdrs\brdrw15 \brdrbtw\brdrs\brdrw15 \tx2880 \f5\lang1033 \sbasedon0\snext20 HC2;}{\s21\fi-2640\li2880\sb120\sa20\tx2880 \f5\lang1033 \sbasedon0\snext21 C2;}{\s22\fi-240\li2400\sa20
\f5\fs20\lang1033 \sbasedon0\snext22 ctc;}{\s23\li2160\sb160 \f5\lang1033 \sbasedon0\snext23 crt;}{\s24\li480\sb20\sa40 \f5\lang1033 \sbasedon0\snext24 or;}{\s25\fi-259\li360\sb40\sa40\tx360 \f6\fs20\lang1033 \sbasedon0\snext25 Ln1;}{\s26\li115\sb80\sa80
\f6\fs20\lang1033 \sbasedon0\snext0 *Intro;}{\s27\li115\sb80\sa80\keepn \b\f6\lang1033 \sbasedon252\snext26 *Title;}{\s28\fi-245\li360\sb80 \f6\fs20\lang1033 \snext28 *Jl;}{\s29\li360\sb40\sa40 \f6\fs20\lang1033 \snext0 Lp1;}{
\s30\fi-1800\li1915\sb60\sl-240\tx1915 \f6\fs20\lang1033 \sbasedon0\snext30 Tph;}{\s31\li115\sb120\sa80 \b\f6\fs20\lang1033 \snext25 Proch;}}{\info{\title AFXPRINT}{\subject MFC Print RTF Help}{\author AFX}{\creatim\yr1992\mo10\dy7\hr12\min33}{\version1}
{\edmins46}{\nofpages1}{\nofwords65536}{\nofchars65536}{\vern16433}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0 \widowctrl\ftnbj \sectd \linex0\endnhere \pard\plain \sl240 \f3\fs20\lang1033 {\f4 \page }{\f4 #{\footnote
\pard\plain \sl240 \f3\fs20\lang1033 # HID_FILE_PRINT}}{\fs16\up6 K{\footnote \pard\plain \s245 \f3\fs20\lang1033 {\fs16\up6 K} printing and print preview}}{\f4 }{\fs16\up6 ${\footnote \pard\plain \s245 \f3\fs20\lang1033 {\fs16\up6 $} File Print command}
}{\f4 }{\b\f4 Print command (File menu)}{\b\f4
\par }{\f4
\par }{\f4 Use this command to print a document. This command presents a }{\f4\uldb Print dialog box}{\v AFX_HIDD_PRINT}{\f4
, where you may specify the range of pages to be printed, the number of copies, the destination printer, and other printer setup options.}{\b\f4
\par }{\b\f4
\par }{\b\f4 Shortcuts}{\b\f4
\par }\pard \fi-1080\li1440\sl240\tx1440 {\f4 Toolbar:}{\f4 \tab }{\f4 \{}{\f4 bmc }{\f4 fileprnt.bmp}{\f4 \}}{\f4
\par }{\f4 Keys:}{\f4 \tab }{\f4 CTRL+P}{\f4
\par }\pard \sl240 {\f4
\par }{\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # AFX_HIDD_PRINT}}{\b\f4 Print }{\b\f4 dialog box}{\b\f4
\par }{\f4
\par }{\f4 The following options allow you to specify how the document should be printed:}{\f4
\par }\pard \sb60\sl240 {\b\f4 Printer}{\b\f4
\par }\pard \li360\sl240 {\f4 This is the active printer and printer connection. Choose the Setup option to change the printer and printer connection.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Setup}{\b\f4
\par }\pard \li360\sl240 {\f4 Displays a }{\f4\uldb Print Setup dialog box}{\v AFX_HIDD_PRINTSETUP}{\f4 , so you can select a printer and printer connection.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Print Range}{\b\f4
\par }\pard \li360\sl240 {\f4 Specify the pages you want to print:}{\f4
\par }\trowd \trgaph108\trleft402 \cellx1647\cellx8622\pard \sl240\intbl {\b\f4 All}{\b\f4 \cell }{\f4 Prints the entire document.}{\f4 \cell }\pard \intbl {\f4 \row }\trowd \trgaph108\trleft402 \cellx1647\cellx8622\pard \sl240\intbl {\b\f4 Selection}{\b\f4
\cell }{\f4 Prints the currently selected text.}{\f4 \cell }\pard \intbl {\f4 \row }\trowd \trgaph108\trleft402 \cellx1647\cellx8622\pard \sl240\intbl {\b\f4 Pages}{\b\f4 \cell }{\f4 Prints the range of pages you specify in }{\f4 the From and To boxes.}{
\f4 \cell }\pard \intbl {\f4 \row }\pard \sb60\sl240 {\b\f4 Copies}{\b\f4
\par }\pard \li360\sl240 {\f4 Specify the number of copies you want to print for the above page range.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Collate Copies}{\b\f4
\par }\pard \li360\sl240 {\f4 Prints copies in page number order, instead of separated multiple copies of each page.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Print Quality}{\b\f4
\par }\pard \li360\sl240 {\f4 Select the quality of the printing. Generally, lower quality printing takes less time to produce.}{\f4
\par }\pard \sl240 {\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # AFX_HIDD_PRINTDLG}}{\b\f4 P}{\b\f4 rint Progress Dialog}{\b\f4
\par }{\f4
\par }{\f4 The Printing dialog box is shown during the time that <<YourApp>> is sending output to the printer. The page number indicates the progre}{\f4 ss of the printing.}{\f4
\par }{\f4
\par }{\f4 To abort printing, choose Cancel.}{\f4
\par }{\f4
\par }{\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # HID_FILE_PRINT_PREVIEW}}{\fs16\up6 K{\footnote \pard\plain \s245 \f3\fs20\lang1033 {\fs16\up6 K} printing and print preview}}{\f4 }{\fs16\up6 ${\footnote \pard\plain \s245
\f3\fs20\lang1033 {\fs16\up6 $} File Print Preview command}}{\f4 }{\b\f4 Print Preview command (File menu)}{\f4
\par }{\f4
\par }{\f4 Use this command to display the active document as it would appear when printed. When you choose this command, the main window will be replaced with a print preview window in which one or two pages will be displayed in their printed format. The }{
\f4\uldb print preview toolbar}{\v\f4 AFX_HIDW_PREVIEW_BAR}{\f4 offers you options to view either one or two pages at a time; move back and forth through the document; zoom in and out of pages; and initiate a print job.}{\f4
\par }{\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # AFX_HIDW_PREVIEW_BAR}}{\fs16\up6 K{\footnote \pard\plain \s245 \f3\fs20\lang1033 {\fs16\up6 K} printing and print preview}}{\f4 }{\fs16\up6 ${\footnote \pard\plain \s245
\f3\fs20\lang1033 {\fs16\up6 $} print preview toolbar}}{\f4 }{\b\f4 Print Preview toolbar}{\b\f4
\par }{\f4
\par }{\f4 The print preview toolbar offers you the following options:}{\f4
\par }\pard \sb60\sl240 {\b\f4 Print}{\b\f4
\par }\pard \li360\sl240 {\f4 Bring up the print dialog box, to start a print job.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Next Page}{\b\f4
\par }\pard \li360\sl240 {\f4 Preview the next printed page.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Prev Page}{\b\f4
\par }\pard \li360\sl240 {\f4 Preview the previous printed page.}{\f4
\par }\pard \sb60\sl240 {\b\f4 One Page / Two Page}{\b\f4
\par }\pard \li360\sl240 {\f4 Preview one or two printed pages at a time.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Zoom In}{\b\f4
\par }\pard \li360\sl240 {\f4 Take a closer look at the printed page.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Zoom Out}{\b\f4
\par }\pard \li360\sl240 {\f4 Take a larger look at the printed page.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Close}{\b\f4
\par }\pard \li360\sl240 {\f4 Return from print preview to the editing window.}{\f4
\par }\pard \sl240 {\f4
\par }{\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # HID_FILE_PRINT_SETUP}}{\fs16\up6 K{\footnote \pard\plain \s245 \f3\fs20\lang1033 {\fs16\up6 K} printing and print preview}}{\f4 }{\fs16\up6 ${\footnote \pard\plain \s245
\f3\fs20\lang1033 {\fs16\up6 $} File Print Setup command}}{\f4 }{\b\f4 Print Setup command (File menu)}{\b\f4
\par }{\f4
\par }{\f4 Use this command to select a printer and a printer connection. This command presents a }{\f4\uldb Print Setup dialog box}{\v AFX_HIDD_PRINTSETUP}{\f4 , where you specify the printer and its connection.}{\b\f4
\par }{\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # AFX_HIDD_PRINTSETUP}}{\b\f4 Print}{\b\f4 Setup dialog box}{\b\f4
\par }{\f4
\par }{\f4 The following options allow you to select the destination printer and its connection.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Printer}{\b\f4
\par }\pard \li360\sl240 {\f4
Select the printer you want to use. Choose the Default Printer; or choose the Specific Printer option and select one of the current installed printers shown in the box. You install printers and configure ports using the Windows Control Panel. }{\f4
\par }\pard \sb60\sl240 {\b\f4 Orientation}{\b\f4
\par }\pard \li360\sl240 {\f4 Choose Portrait or Landscape.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Paper Size}{\b\f4
\par }\pard \li360\sl240 {\f4 Select the size of paper that the document is to be printed on.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Paper Source}{\b\f4
\par }\pard \li360\sl240 {\f4 Some printers offer multiple trays for different paper sources. Specify the tray here.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Options}{\b\f4
\par }\pard \li360\sl240 {\f4 Displays a dialog box where you can make additional choices about printing, specific to the type of printer you have selected.}{\f4
\par }\pard \sb60\sl240 {\b\f4 Network...}{\b\f4
\par }\pard \li360\sl240 {\f4 Choose this button to connect to a network location, assigning it a new drive letter.}{\f4
\par }\pard \sl240 {\f4 \page }{\f4 #{\footnote \pard\plain \sl240 \f3\fs20\lang1033 # HID_FILE_PAGE_SETUP}}{\f4 ${\footnote \pard\plain \sl240 \f3\fs20\lang1033 $ File Page Setup Command}}{\b\f4 Page Setup command (File menu)}{\b\f4
\par }{\b\f4
\par }{\f4 << Write application-specific help here. >>}{\f4
\par }\pard
\par }

BIN
hlp/AppExit.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
hlp/Bullet.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
hlp/CB32.HLP Normal file

Binary file not shown.

196
hlp/CB32.LOG Normal file
View file

@ -0,0 +1,196 @@
Microsoft (R) Help Compiler
HCRTF 4.03.0002
Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved.
cb32.hpj
HC3037: Warning: D:\Code\CB32\hlp\CB32.hm :
The map value for "HID_VIEW_COLPOS" is the same as the map value for "HID_EDIT_SELECTALL".
HC1002: Note:
Using existing phrase table: CB32.ph.
HC3025: Warning: topic #1 of D:\Code\Cb32\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "menu_record".
HC3025: Warning: topic #3 of D:\Code\Cb32\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_OLE_EDIT_LINKS".
HC3025: Warning: topic #3 of D:\Code\Cb32\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_EDIT_PASTE_LINK".
HC3025: Warning: topic #3 of D:\Code\Cb32\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_OLE_INSERT_NEW".
HC1010: Note:
The following mapped Topic IDs were not used in any topic:
HIDD_APAGE
HIDD_CPAGE
HIDD_NPAGE
HIDD_OPAGE
HIDD_PPAGE
HID_ENTRY_EDIT
HID_ENTRY_PREF
HID_TBAR_WEB
AFX_HIDP_GET_NOT_SUPPORTED
HID_RECORD_FIRST
HID_EDIT_SELECT_ALL
HID_FILE_UPDATE
AFX_HIDW_RESIZE_BAR
AFX_HIDP_SQL_NO_DATA_FOUND
AFX_HIDP_SQL_EMPTY_COLUMN_LIST
AFX_HIDP_SQL_ODBC_LOAD_FAILED
AFX_HIDP_FAILED_TO_CREATE
HID_TRAY_EXIT
HID_TRAY_SHOW
HID_VIEW_WNDPOS
AFX_HIDD_BUSY
AFX_HIDP_ARCH_NONE
HID_RECORD_LAST
HID_RECORD_NEXT
HID_RECORD_PREV
AFX_HIDD_OBJECTPROPERTIES
HIDD_SETPAGE
HID_DIAL_CELL
HID_DIAL_HOME
HID_DIAL_WORK
HID_ENTRY_ADD
AFX_HIDP_FILE_TOO_MANY_OPEN
HIDD_FIND
AFX_HIDP_FILE_ACCESS_DENIED
HIDD_GETNEW
HID_FILE_SAVE_COPY_AS
AFX_HIDD_CONVERT
AFX_HIDP_ASK_TO_DISCARD
AFX_HIDP_SQL_FIELD_SCHEMA_MISMATCH
AFX_HIDP_SQL_LOCK_MODE_NOT_SUPPORTED
HID_FORMAT_FONT
AFX_HIDP_FILE_HARD_IO
AFX_HIDD_CHANGESOURCE
HID_EDIT_SELECTALL
AFX_HIDP_FILE_NOT_FOUND
AFX_HIDW_DOCKBAR_TOP
AFX_HIDP_DAO_DFX_BIND
HID_TBAR_DIAL
AFX_HIDP_SQL_ODBC_V2_REQUIRED
AFX_HIDP_SQL_NO_ROWS_AFFECTED
HID_OLE_EDIT_CONVERT
AFX_HIDP_SQL_SQL_CONFORMANCE
AFX_HIDD_INSERTOBJECT
HID_URL1
HID_URL2
AFX_HIDP_SQL_RECORDSET_READONLY
AFX_HIDP_PARSE_RADIO_BUTTON
HID_EDIT_PASTE_SPECIAL
AFX_HIDP_DAO_ROWTOOSHORT
AFX_HIDP_SQL_INCORRECT_ODBC
AFX_HIDP_NO_ERROR_AVAILABLE
AFX_HIDW_DOCKBAR_BOTTOM
AFX_HIDP_FILE_DIR_FULL
HID_EMAIL_ADD1
HID_EMAIL_ADD2
AFX_HIDP_DAO_BADBINDINFO
HID_VIEW_COLSET
AFX_HIDP_SQL_UPDATE_DELETE_FAILED
AFX_HIDP_PARSE_DATETIME
HID_OLE_EDIT_CHANGE_ICON
AFX_HIDP_ARCH_ENDOFFILE
AFX_HIDP_SQL_SQL_NO_TOTAL
AFX_HIDP_SQL_CONNECT_FAIL
AFX_HIDP_SQL_API_CONFORMANCE
HID_OLE_EDIT_PROPERTIES
AFX_HIDP_FILE_DISKFULL
HID_EDIT_FIND_NEXT
AFX_HIDW_DOCKBAR_LEFT
AFX_HIDP_FILE_REMOVE_CURRENT
HID_TBAR_EMAIL
AFX_HIDP_ARCH_BADCLASS
AFX_HIDP_SQL_NO_POSITIONED_UPDATES
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
HID_OLE_VERB_1
AFX_HIDP_ARCH_BADINDEX
HID_WIZBACK
HID_WIZNEXT
AFX_HIDP_PARSE_CURRENCY
AFX_HIDP_FILE_NONE
AFX_HIDP_FAILED_TO_CONVERT
HID_HELP_FINDER
AFX_HIDP_FILE_EOF
HIDR_TRAYMENU
AFX_HIDP_FILE_LOCKING
AFX_HIDP_SQL_ILLEGAL_MODE
AFX_HIDD_PREVIEW_TOOLBAR
HIDR_CONTEXTMENU
AFX_HIDP_SQL_NO_CURRENT_RECORD
AFX_HIDP_FILE_BAD_PATH
AFX_HIDP_FILE_BAD_SEEK
AFX_HIDP_SQL_ROW_UPDATE_NOT_SUPPORTED
HIDR_CB32TYPE
AFX_HIDP_FAILED_MAPI_LOAD
AFX_HIDP_FAILED_MAPI_SEND
HID_APP_PREFS
AFX_HIDP_FILE_SHARING
HID_IMPORT_CSV
HID_IMPORT_TAB
HID_FILE_PRINT_DIRECT
HID_FILE_IMPORT
AFX_HIDP_SQL_DYNASET_NOT_SUPPORTED
HID_DIAL_FAX
AFX_HIDP_SQL_ROW_FETCH
AFX_HIDP_SET_NOT_SUPPORTED
AFX_HIDD_CHANGEICON
HID_VIEW_FLATBAR
AFX_HIDP_ARCH_BADSCHEMA
AFX_HIDD_FILEBROWSE
AFX_HIDD_EDITLINKS
AFX_HIDP_SQL_DATA_TRUNCATED
HID_INDICATOR_CLOCK
HID_WIZFINISH
AFX_HIDP_INVALID_MAPI_DLL
AFX_HIDD_PREVIEW_SHORTTOOLBAR
AFX_HIDP_DAO_OBJECT_NOT_OPEN
AFX_HIDP_ARCH_WRITEONLY
HID_OLE_EDIT_LINKS
AFX_HIDP_SQL_MULTIPLE_ROWS_AFFECTED
HID_EDIT_PASTE_LINK
AFX_HIDP_DAO_ENGINE_INITIALIZATION
AFX_HIDW_DOCKBAR_FLOAT
AFX_HIDW_DOCKBAR_RIGHT
AFX_HIDP_PARSE_BYTE
AFX_HIDP_PARSE_UINT
AFX_HIDP_ARCH_GENERIC
AFX_HIDP_SQL_SNAPSHOT_NOT_SUPPORTED
AFX_HIDD_PASTESPECIAL
AFX_HIDP_FILE_GENERIC
HID_EXPORT_CSV
HID_EXPORT_TAB
AFX_HIDP_FILE_INVALID_FILE
AFX_HIDP_ARCH_READONLY
AFX_HIDP_SQL_RECORDSET_FORWARD_ONLY
HID_OLE_INSERT_NEW
HID_DIAL_PAGER
AFX_HIDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED
HIDW_COMBO
HIDD_COLPAGE
HIDD_CONVERT
AFX_HIDP_DAO_COLUMNUNAVAILABLE
HID_VIEW_FIND_NEXT
HID_EDIT_FIND_COMBO
HID_ENTRY_DELETE
72 Topics
48 Jumps
16 Keywords
21 Bitmaps
Created D:\Code\Cb32\hlp\CB32.HLP, 39,625 bytes
Bitmaps: 5,348 bytes
Phrase+Zeck compression decreased help file by 14,330 bytes.
Compile time: 0 minutes, 1 second
2 notes, 5 warnings

9
hlp/CB32.cnt Normal file
View file

@ -0,0 +1,9 @@
:Base CB32.hlp
1 Menus
2 File menu=menu_file
2 Edit menu=menu_edit
2 View menu=menu_view
2 Window menu=menu_window
2 Help menu=menu_help
1 <<add your application-specific topics here>>
2 <<add your topic jumps here>>=main_index

60
hlp/CB32.hm Normal file
View file

@ -0,0 +1,60 @@
// MAKEHELP.BAT generated Help Map file. Used by CB32.HPJ.
// Commands (ID_* and IDM_*)
HID_EDIT_FIND_NEXT 0x103E9
HID_VIEW_FLATBAR 0x18003
HID_EDIT_SELECTALL 0x18004
HID_VIEW_COLPOS 0x18004
HID_ENTRY_ADD 0x18005
HID_ENTRY_EDIT 0x18006
HID_ENTRY_DELETE 0x18007
HID_FILE_IMPORT 0x18023
HID_IMPORT_CSV 0x18024
HID_IMPORT_TAB 0x18025
HID_EXPORT_CSV 0x18026
HID_EXPORT_TAB 0x18027
HID_ENTRY_PREF 0x18028
HID_APP_PREFS 0x18029
HID_VIEW_FIND_NEXT 0x1802D
HID_EDIT_FIND_COMBO 0x1802E
HID_VIEW_WNDPOS 0x18031
HID_VIEW_COLSET 0x18032
HID_TRAY_SHOW 0x18033
HID_TRAY_EXIT 0x18034
HID_DIAL_HOME 0x18036
HID_DIAL_WORK 0x18037
HID_DIAL_CELL 0x18038
HID_DIAL_PAGER 0x18039
HID_DIAL_FAX 0x1803A
HID_EMAIL_ADD1 0x1803B
HID_EMAIL_ADD2 0x1803C
HID_URL1 0x1803D
HID_URL2 0x1803E
HID_TBAR_DIAL 0x1803F
HID_TBAR_EMAIL 0x18040
HID_TBAR_WEB 0x18041
HID_INDICATOR_CLOCK 0x1E706
// Prompts (IDP_*)
// Resources (IDR_*)
HIDR_MAINFRAME 0x20080
HIDR_CB32TYPE 0x20081
HIDR_TRAYMENU 0x20090
HIDR_CONTEXTMENU 0x20091
// Dialogs (IDD_*)
HIDD_ABOUTBOX 0x20064
HIDD_APAGE 0x20083
HIDD_PPAGE 0x20084
HIDD_OPAGE 0x20085
HIDD_NPAGE 0x20086
HIDD_CONVERT 0x20087
HIDD_FIND 0x20089
HIDD_COLPAGE 0x2008B
HIDD_SETPAGE 0x2008D
HIDD_GETNEW 0x20092
HIDD_CPAGE 0x20093
// Frame Controls (IDW_*)
HIDW_COMBO 0x50081

61
hlp/CB32.hpj Normal file
View file

@ -0,0 +1,61 @@
[OPTIONS]
LCID=0x409 0x0 0x0 ;English (U.S.)
CONTENTS=main_index
TITLE=CB32 Application Help
COMPRESS=true
WARNING=2
BMROOT= ..,.
ROOT= ..,.
HLP=CB32.HLP
ERRORLOG=CB32.LOG
[FILES]
afxcore.rtf
afxprint.rtf
[ALIAS]
HIDR_MAINFRAME = main_index
HIDD_ABOUTBOX = HID_APP_ABOUT
HID_HT_SIZE = HID_SC_SIZE
HID_HT_HSCROLL = scrollbars
HID_HT_VSCROLL = scrollbars
HID_HT_MINBUTTON = HID_SC_MINIMIZE
HID_HT_MAXBUTTON = HID_SC_MAXIMIZE
AFX_HIDP_INVALID_FILENAME = AFX_HIDP_default
AFX_HIDP_FAILED_TO_OPEN_DOC = AFX_HIDP_default
AFX_HIDP_FAILED_TO_SAVE_DOC = AFX_HIDP_default
AFX_HIDP_ASK_TO_SAVE = AFX_HIDP_default
AFX_HIDP_FAILED_TO_CREATE_DOC = AFX_HIDP_default
AFX_HIDP_FILE_TOO_LARGE = AFX_HIDP_default
AFX_HIDP_FAILED_TO_START_PRINT = AFX_HIDP_default
AFX_HIDP_FAILED_TO_LAUNCH_HELP = AFX_HIDP_default
AFX_HIDP_INTERNAL_FAILURE = AFX_HIDP_default
AFX_HIDP_COMMAND_FAILURE = AFX_HIDP_default
AFX_HIDP_PARSE_INT = AFX_HIDP_default
AFX_HIDP_PARSE_REAL = AFX_HIDP_default
AFX_HIDP_PARSE_INT_RANGE = AFX_HIDP_default
AFX_HIDP_PARSE_REAL_RANGE = AFX_HIDP_default
AFX_HIDP_PARSE_STRING_SIZE = AFX_HIDP_default
AFX_HIDP_FAILED_INVALID_FORMAT = AFX_HIDP_default
AFX_HIDP_FAILED_INVALID_PATH = AFX_HIDP_default
AFX_HIDP_FAILED_DISK_FULL = AFX_HIDP_default
AFX_HIDP_FAILED_ACCESS_READ = AFX_HIDP_default
AFX_HIDP_FAILED_ACCESS_WRITE = AFX_HIDP_default
AFX_HIDP_FAILED_IO_ERROR_READ = AFX_HIDP_default
AFX_HIDP_FAILED_IO_ERROR_WRITE = AFX_HIDP_default
AFX_HIDP_STATIC_OBJECT = AFX_HIDP_default
AFX_HIDP_FAILED_TO_CONNECT = AFX_HIDP_default
AFX_HIDP_SERVER_BUSY = AFX_HIDP_default
AFX_HIDP_BAD_VERB = AFX_HIDP_default
AFX_HIDP_FAILED_MEMORY_ALLOC = AFX_HIDP_default
AFX_HIDP_FAILED_TO_NOTIFY = AFX_HIDP_default
AFX_HIDP_FAILED_TO_LAUNCH = AFX_HIDP_default
AFX_HIDP_ASK_TO_UPDATE = AFX_HIDP_default
AFX_HIDP_FAILED_TO_UPDATE = AFX_HIDP_default
AFX_HIDP_FAILED_TO_REGISTER = AFX_HIDP_default
AFX_HIDP_FAILED_TO_AUTO_REGISTER = AFX_HIDP_default
[MAP]
#include <C:\DevStudio\VC\MFC\include\afxhelp.hm>
#include <D:\Code\CB32\hlp\CB32.hm>

320
hlp/CB32.ph Normal file
View file

@ -0,0 +1,320 @@
(Control
(Edit
(File
(Help
(System
(View
(Window
(application
(document
<< Write application-specific help here. >>
<<YourApp>>
<<YourApp>>,
<<YourApp>>.
AFX_HIDP_xxx
About
AppWizard
Arrange Icons
Bar
Cascade
Choose
Choose this button to connect to a network location, assigning it a new drive letter.
Clear
Close
Commands
Context
Control
Control-menu
Copies
Copy
DIRECTION
Directories
Drives
Exit
File
File Name
File New dialog box
File menu commands
Find
Go to the
HIDR_DOC1TYPE
Help
Horizontal
Icons
Keys:
List
Lock
MAKEHM
Minimize
Modify
Mouse:
Name
Name of the
Network...
New
No Help Available
No help is available for this
Note: This command is unavailable if you maximize the window.
Open
Open a
Pane
Prev
Prev Pane
Preview
Print
Print Setup dialog box
Quality
Remove
Repeat
Replace
Save
Save As dialog box
Scroll
Select
Setup
Shortcut
Shortcuts
Split
Status Bar
Toolbar
Toolbar,
Toolbar:
Undo
Use
Vertical
View
When
Window
Write
according
across
action
action.
actions
active
active.
affect
all
allow
also
and
another
appear
appears
application
application's
application,
application-specific
application.
applications
area
arrange
arrow
assigning
author
available
bar.
bars
before
bottom
box
box.
button
button,
button.
buttons
can
cannot
change
changes
changes.
check
choose
click
clipboard
clipboard.
closes
command
command,
command.
commands,
commands:
connect
connection.
contain
contents
create
current
currently
data
depending
describe
describes
description
destination
determines
dialog
different
directory
display
displayed
displayed.
displays
document
document,
document.
documents
documents.
down.
drive
each
editing
electronic
example,
existing
extension
fashion.
field,
filename
files
first
following
for
four-headed
from
generated
have
help.
here.
hide
i.d.
icon
icons.
indicate
insert
instructions
interface
into
item
its
keyboard
keys
last
latched
letter.
location
location,
location.
main
mark
maximize
may
menu
menu)
menu.
message
minimized
mouse
move
multiple
name.
network
next
non-overlapped
not
number
offers
one
only
open.
opened
opening
option
options
options:
other
overlapped
page
page.
pages
panes.
parts
point.
pointer
presents
previous
previously
print preview toolbar
printed
printed.
printer
printers
printing
printing,
printing.
provides
range
record
reduced
replaces
return
reverse
same
screen
screen.
selected
selected.
selection
selection.
should
shown
single
size
some
specific
specified
specify
splitter
status
stored
stores
such
suggests
supports
switch
that
the
their
then
there
there.
they
this
through
time
time.
title
toolbar.
topic
topics
type
type.
types
unavailable
used
using
various
version
views
want
where
which
will
window,
window.
windows
windows.
wish
with
you
your

BIN
hlp/CurArw2.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
hlp/CurArw4.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

BIN
hlp/CurHelp.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/EditCopy.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/EditCut.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/EditPast.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/EditUndo.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/FileNew.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

BIN
hlp/FileOpen.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

BIN
hlp/FilePrnt.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/FileSave.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/HlpSBar.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
hlp/HlpTBar.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
hlp/RecFirst.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/RecLast.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/RecNext.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/RecPrev.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/ScMenu.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
hlp/Scmax.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
hlp/Scmin.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

BIN
res/CB32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

13
res/CB32.rc2 Normal file
View file

@ -0,0 +1,13 @@
//
// CB32.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

BIN
res/CB32Doc.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
res/Toolbar.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
res/hand1.cur Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B